Skip to content

Commit

Permalink
Cross compile generate-reference-doc on Scala 3 LTS & Next
Browse files Browse the repository at this point in the history
  • Loading branch information
Gedochao committed Feb 23, 2024
1 parent 1d0b07c commit fc744c4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,9 @@ jobs:
jvm: "temurin:17"
- name: Check that reference doc is up-to-date
run: |
./mill -i generate-reference-doc.run --check || (
./mill -i 'generate-reference-doc[]'.run --check || (
echo "Reference doc is not up-to-date. Run"
echo " ./mill -i generate-reference-doc.run"
echo " ./mill -i 'generate-reference-doc[]'.run"
echo "to update it, then commit the result."
exit 1
)
Expand Down
2 changes: 1 addition & 1 deletion .scala-steward.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ updates.ignore = [
{ groupId = "com.github.plokhotnyuk.jsoniter-scala", artifactId="jsoniter-scala-core", version="2.13.5.2" }
]
postUpdateHooks = [{
command = ["./mill", "-i", "generate-reference-doc.run"],
command = ["./mill", "-i", "'generate-reference-doc[]'.run"],
commitMessage = "Generate the reference doc"
}]
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ will save you from getting a load of comments and speed up the code review.
- ensure everything compiles at every commit (`./mill -i __.compile`);
- ensure everything is well formatted at every commit (`scala-cli fmt .` or `scalafmt`);
- ensure imports are well-ordered at every commit (`./mill -i __.fix`);
- ensure reference docs are up-to date at every commit (`./mill -i generate-reference-doc.run`);
- ensure reference docs are up-to date at every commit (`./mill -i 'generate-reference-doc[]'.run`);
- ensure all tests pass at every commit (refer to the [dev docs](DEV.md) on how to run tests);
- nobody expects you to run all the unit and integration tests for all platforms locally, that'd take too long;
- just make sure the test suites relevant to your changes pass on your local machine.
Expand Down
11 changes: 7 additions & 4 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ object integration extends CliIntegration {
}
}

object `docs-tests` extends Cross[DocsTests](Scala.allScala3){
object `docs-tests` extends Cross[DocsTests](Scala.allScala3) {
def defaultCrossSegments = Seq(Scala.defaultInternal)
}

Expand Down Expand Up @@ -180,10 +180,13 @@ object packager extends ScalaModule with Bloop.Module {
def mainClass = Some("packager.cli.PackagerCli")
}

object `generate-reference-doc` extends SbtModule with ScalaCliScalafixModule {
def scalaVersion = Scala.defaultInternal
object `generate-reference-doc` extends Cross[GenerateReferenceDoc](Scala.allScala3) {
def defaultCrossSegments = Seq(Scala.defaultInternal)
}

trait GenerateReferenceDoc extends CrossSbtModule with ScalaCliScalafixModule {
def moduleDeps = Seq(
cli(Scala.defaultInternal)
cli(crossScalaVersion)
)
def repositoriesTask = T.task(super.repositoriesTask() ++ customRepositories)
def ivyDeps = Agg(
Expand Down

0 comments on commit fc744c4

Please sign in to comment.