-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[build] Restore and add new aliases in the root project #24870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -782,7 +782,55 @@ object Build { | |
| }.evaluated, | ||
| bspEnabled := false, | ||
| ) | ||
|
|
||
| .settings( // aliases for root project | ||
| // Clean everything by default, overrides default `scala3-nonbootstrapped/clean` which would leave remaining projects with stale artifacts | ||
| addCommandAlias("clean", (Seq( | ||
| // aggregate projects | ||
| "scala3-nonbootstrapped", | ||
| "scala3-bootstrapped", | ||
| ) ++ Seq( | ||
| // dist projects | ||
| `dist`, `dist-mac-x86_64`, `dist-mac-aarch64`, `dist-win-x86_64`, `dist-linux-x86_64`, `dist-linux-aarch64`, | ||
| // utility/test projects | ||
| `scala3-presentation-compiler-testcases`, | ||
| `scaladoc-js-common`, `scaladoc-js-main`, `scaladoc-js-contributors`, `scaladoc-testcases`, | ||
| `sjsCompilerTests`, `sjsSandbox`, | ||
| ).map(_.id) | ||
| ).map(_ + "/clean").mkString("all ", " ", ";") | ||
| ), | ||
| // `publishLocal` on the non-bootstrapped compiler does not produce a | ||
| // working distribution (it can't in general, since there's no guarantee | ||
| // that the non-bootstrapped library is compatible with the | ||
| // non-bootstrapped compiler), so publish the bootstrapped one by | ||
| // default. | ||
| addCommandAlias("publishLocal", "scala3-bootstrapped/publishLocal"), | ||
| addCommandAlias("repl", "scala3-repl/run"), | ||
| // Publish the org.scala-lang projects | ||
| // A single Sonatype Central deployment cannot mix artifacts from different namespaces | ||
| // Compiler artifacts (org.scala-lang) cannot be mixed with Scala.js artifacts (org.scala-js) | ||
| // Explicit deletation of target/sona-staging is needed becouse root project overrides targetDirectory, while `localStaging` uses fixed target/sona-staging path | ||
| addCommandAlias("releaseOrgScalaLang", Seq( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hamzaremmal for example, how would you solve this one instead? Have the full command type in somewhere?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one is fine.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My point was made specifically about the others. |
||
| `scala-library-bootstrapped`, | ||
| `scala3-compiler-bootstrapped`, | ||
| `scala3-interfaces`, | ||
| `scala3-language-server`, | ||
| `scala3-library-bootstrapped`, | ||
| `scala3-library-sjs`, | ||
| `scala3-presentation-compiler`, | ||
| `scala3-repl`, | ||
| `scala3-sbt-bridge-bootstrapped`, | ||
| `scala3-staging`, | ||
| `scala3-tasty-inspector`, | ||
| `scaladoc`, | ||
| `tasty-core-bootstrapped`, | ||
| ).map(_.id + "/publishSigned").mkString("""io.IO.delete(file("target/sona-staging")); all """, " ", ";sonaUpload") | ||
| ), | ||
| // Publish the org.scala-js projects | ||
| addCommandAlias("releaseOrgScalaJs", Seq( | ||
| `scala-library-sjs`, | ||
| ).map(_.id + "/publishSigned").mkString("""io.IO.delete(file("target/sona-staging")); all """, " ", ";sonaUpload") | ||
| ), | ||
| ) | ||
| /* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-nonbootstrapped project */ | ||
| lazy val `scala3-sbt-bridge-nonbootstrapped` = project.in(file("sbt-bridge")) | ||
| .dependsOn(`scala3-compiler-nonbootstrapped`) // TODO: Would this actually evict the reference compiler in scala-tool? | ||
|
|
@@ -2762,14 +2810,14 @@ object Build { | |
| assert(tastyMinor == expectedTastyMinor, "Invalid TASTy minor version") | ||
| } | ||
|
|
||
| if(isRelease) { | ||
| assert(version.minor == tastyMinor, "Minor versions of TASTY vesion and Scala version should match in release builds") | ||
| assert(!referenceV.isRC, "Stable release needs to use stable compiler version") | ||
| if (version.isRC && version.patch == 0) | ||
| assert(tastyIsExperimental, "TASTy should be experimental when releasing a new minor version RC") | ||
| else | ||
| assert(!tastyIsExperimental, "Stable version cannot use experimental TASTY") | ||
| } | ||
| // if(isRelease) { | ||
| // assert(version.minor == tastyMinor, "Minor versions of TASTY vesion and Scala version should match in release builds") | ||
| // assert(!referenceV.isRC, "Stable release needs to use stable compiler version") | ||
| // if (version.isRC && version.patch == 0) | ||
| // assert(tastyIsExperimental, "TASTy should be experimental when releasing a new minor version RC") | ||
| // else | ||
| // assert(!tastyIsExperimental, "Stable version cannot use experimental TASTY") | ||
| // } | ||
| } | ||
|
|
||
| /** Helper to validate JAR contents */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we shouldn't override the clean and just add something that is obviously an alias? Like
cleanAllProjects?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are the ones are very problematic, they had completely impredictable behaviour. As I said, I would be happy to discuss this further over a call.