Skip to content
1 change: 0 additions & 1 deletion .mill-version

This file was deleted.

96 changes: 23 additions & 73 deletions build.mill
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
import os.copy.over
import $ivy.`io.github.quafadas::millSite::0.0.24`
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
import $ivy.`com.goyeau::mill-scalafix::0.4.0`
import $file.playwrightVersion // used to cache in GHA
//| mill-version: 1.0.3
//| mill-jvm-version: 21
//| mvnDeps:
//| - com.goyeau::mill-scalafix::0.6.0


import io.github.quafadas.millSite._
import os.copy.over
// import io.github.quafadas.millSite._
import mill._, scalalib._, publish._, scalanativelib._
import mill.scalalib.scalafmt.ScalafmtModule
import de.tobiasroeser.mill.vcs.version._
import mill.util.*

import com.goyeau.mill.scalafix.ScalafixModule
import java.text.Format

object V{
val scalaLts = "3.3.5"
Copy link
Preview

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scalaVersion variable (3.7.2) is inconsistent with scalaLts (3.3.5). Since scalaVersion is used in FormatFixPublish and scalaLts is used in individual modules, this creates version inconsistency across the project.

Suggested change
val scalaLts = "3.3.5"
val scalaLts = "3.7.2"

Copilot uses AI. Check for mistakes.


val pwV = build.pwV
val http4sVersion = "0.23.30"
val circeVersion = "0.14.10"
val scalaVersion = "3.7.2"
}

trait FormatFix extends ScalafmtModule with ScalafixModule with ScalaModule

trait FormatFixPublish extends ScalaModule with FormatFix with PublishModule{
override def scalaVersion = "3.6.4"
override def scalaVersion = V.scalaVersion

override def scalacOptions: Target[Seq[String]] = super.scalacOptions() ++ Seq("-Wunused:all")
override def scalacOptions = super.scalacOptions() ++ Seq("-Wunused:all")

def publishVersion = VcsVersion.vcsState().format()

override def pomSettings = T {
override def pomSettings = Task {
PomSettings(
description = "An experimental live server for scala JS projects",
organization = "io.github.quafadas",
Expand All @@ -46,79 +48,27 @@ trait FormatFixPublish extends ScalaModule with FormatFix with PublishModule{

trait Testy extends TestModule.Munit with FormatFix {

override def defaultCommandName(): String = "test"

def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps() ++ Seq(
ivy"org.typelevel::munit-cats-effect::2.0.0",
ivy"org.scalameta::munit::1.1.0",
ivy"com.lihaoyi::os-lib:0.11.4"
)

}

object routes extends FormatFixPublish {
override def defaultTask(): String = "testForked"

def scalaVersion: T[String] = V.scalaLts

def ivyDeps = Agg(
ivy"org.http4s::http4s-core:${V.http4sVersion}",
ivy"org.http4s::http4s-client:${V.http4sVersion}",
ivy"org.http4s::http4s-server:${V.http4sVersion}",
ivy"org.http4s::http4s-dsl::${V.http4sVersion}",
ivy"com.outr::scribe-cats::3.15.0"
def mvnDeps = super.mvnDeps() ++ sjsls.mvnDeps() ++ Seq(
mvn"org.typelevel::munit-cats-effect::2.0.0",
mvn"org.scalameta::munit::1.1.0",
mvn"com.lihaoyi::os-lib:0.11.4"
)

override def artifactName = "frontend-routes"

object test extends Testy with ScalaTests{
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps()
}

}

object sjsls extends FormatFixPublish {

override def scalaVersion = V.scalaLts
// object site extends SiteModule {

def ivyDeps = super.ivyDeps() ++ Seq(
ivy"org.http4s::http4s-ember-server::${V.http4sVersion}",
ivy"org.http4s::http4s-ember-client::${V.http4sVersion}",
ivy"org.http4s::http4s-scalatags::0.25.2",
ivy"io.circe::circe-core::${V.circeVersion}",
ivy"io.circe::circe-generic::${V.circeVersion}",
ivy"co.fs2::fs2-io::3.11.0",
ivy"com.lihaoyi::scalatags::0.13.1",
ivy"com.monovore::decline::2.5.0",
ivy"com.monovore::decline-effect::2.5.0",
// def scalaVersion = sjsls.scalaVersion

)

def moduleDeps = Seq(routes)

def artifactName = "sjsls"

object test extends Testy with ScalaTests {
def ivyDeps = super.ivyDeps() ++ sjsls.ivyDeps() ++ Seq(

ivy"com.microsoft.playwright:playwright:${playwrightVersion.pwV}",
ivy"com.microsoft.playwright:driver-bundle:${playwrightVersion.pwV}"
)
}
//def scalaNativeVersion = "0.4.17" // aspirational :-)

}

object site extends SiteModule {

def scalaVersion = sjsls.scalaVersion

override def moduleDeps = Seq(sjsls)
}
// override def moduleDeps = Seq(sjsls)
// }

// SN deps which aren't yet there.
/**
1 targets failed
project.resolvedIvyDeps
project.resolvedmvnDeps
Resolution failed for 2 modules:
--------------------------------------------
com.outr:scribe-cats_native0.4_3:3.13.5
Expand Down
10 changes: 5 additions & 5 deletions mill
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# You can give the required mill version with --mill-version parameter
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION
#
# Original Project page: https://github.com/lefou/millw
# Script Version: 0.4.12
# Project page: https://github.com/lefou/millw
# Script Version: 0.4.10
Copy link
Preview

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script version is being downgraded from 0.4.12 to 0.4.10, which suggests moving to an older version of the mill wrapper script. This could introduce bugs or remove features that were available in the newer version.

Suggested change
# Script Version: 0.4.10
# Script Version: 0.4.12

Copilot uses AI. Check for mistakes.

#
# If you want to improve this script, please also contribute your changes back!
#
Expand All @@ -14,7 +14,7 @@
set -e

if [ -z "${DEFAULT_MILL_VERSION}" ] ; then
DEFAULT_MILL_VERSION=0.12.5
DEFAULT_MILL_VERSION="0.11.4"
fi


Expand Down Expand Up @@ -49,9 +49,9 @@ fi
# If not already set, read .mill-version file
if [ -z "${MILL_VERSION}" ] ; then
if [ -f ".mill-version" ] ; then
MILL_VERSION="$(tr '\r' '\n' < .mill-version | head -n 1 2> /dev/null)"
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)"
elif [ -f ".config/mill-version" ] ; then
MILL_VERSION="$(tr '\r' '\n' < .config/mill-version | head -n 1 2> /dev/null)"
MILL_VERSION="$(head -n 1 .config/mill-version 2> /dev/null)"
fi
fi

Expand Down
26 changes: 26 additions & 0 deletions routes/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package build.routes

import build.*
import mill._
import mill.scalalib._
import mill.scalalib.publish._

object `package` extends FormatFixPublish {

def scalaVersion: T[String] = V.scalaLts

def mvnDeps = Seq(
mvn"org.http4s::http4s-core:${V.http4sVersion}",
mvn"org.http4s::http4s-client:${V.http4sVersion}",
mvn"org.http4s::http4s-server:${V.http4sVersion}",
mvn"org.http4s::http4s-dsl::${V.http4sVersion}",
mvn"com.outr::scribe-cats::3.15.0"
)

override def artifactName = "frontend-routes"

object test extends Testy with ScalaTests{
def mvnDeps = super.mvnDeps() ++ sjsls.mvnDeps()
Copy link
Preview

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reference to 'sjsls.mvnDeps()' will fail because sjsls is now defined in a separate package file (sjsls/package.mill) and is not directly accessible from this context. You need to import or reference the sjsls module properly.

Suggested change
def mvnDeps = super.mvnDeps() ++ sjsls.mvnDeps()
def mvnDeps = super.mvnDeps() ++ build.sjsls.mvnDeps()

Copilot uses AI. Check for mistakes.

}

}
37 changes: 37 additions & 0 deletions sjsls/package.mill
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package build.sjsls

import build.*
import mill._
import mill.scalalib._
import mill.scalalib.publish._

object `package` extends FormatFixPublish {

override def scalaVersion = V.scalaLts

def mvnDeps = super.mvnDeps() ++ Seq(
mvn"org.http4s::http4s-ember-server::${V.http4sVersion}",
mvn"org.http4s::http4s-ember-client::${V.http4sVersion}",
mvn"org.http4s::http4s-scalatags::0.25.2",
mvn"io.circe::circe-core::${V.circeVersion}",
mvn"io.circe::circe-generic::${V.circeVersion}",
mvn"co.fs2::fs2-io::3.11.0",
mvn"com.lihaoyi::scalatags::0.13.1",
mvn"com.monovore::decline::2.5.0",
mvn"com.monovore::decline-effect::2.5.0",

)

def moduleDeps = Seq(routes)

def artifactName = "sjsls"

object test extends Testy with ScalaTests {
def mvnDeps = super.mvnDeps() ++ sjsls.mvnDeps() ++ Seq(
mvn"com.microsoft.playwright:playwright:${V.pwV}",
mvn"com.microsoft.playwright:driver-bundle:${V.pwV}"
)
}
//def scalaNativeVersion = "0.4.17" // aspirational :-)

}
Loading