-
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?
[build] Restore and add new aliases in the root project #24870
Conversation
…fix cleaning artifacts
b10f90c to
59199e9
Compare
hamzaremmal
left a comment
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.
This was removed for a reason. This is completely unintuitive and we should not bring it back. I've spent a lot of time to understand this build and we should not undo everything I've done without a good enough reason.
|
I'd be happy to discuss this more during one of the core's meetings or a on a call but please don't undo what it took me a long time to untangle and to make work in an intuitive way without any surprises and gotchas. |
These are just aliases for existing commands, why is this a problem? Which ones are you against? Aliases overall? If not aliases, what should be done? Always full commands? I think we need a bit more feedback here 😅 |
| // 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( |
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.
@hamzaremmal for example, how would you solve this one instead? Have the full command type in somewhere?
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.
This one is fine.
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.
My point was made specifically about the others.
|
|
||
| .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( |
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.
|
What actually is intuitive right now is that when I've worked on #24843 every change in the compiler required me to clean sources manually (becouse clean was not working as intended, so ended up with It seems like build is borked recently, I agree that we should get to the clue of the problem, instead of adjusting aliases, but it's a quick fix to current problems while we can think about proper solution. The proper solution would be to have a correct aggregation of projects in actual root project. Right now root aggregates only non-bootstrapped projects, leaving bootstrapped and dist/test helpers untouched. |
cleanalias which cleans bothbootstrappedandunbootstrappedproject - currently runningsbt cleandoes only cleanunbootstrapped. Additionally extends it to also cleandistand test utilities projectsreplas alias toscala3-repl/runpublishLocalas alias toscala3-bootstrapped/publishLocalAll of these aliases were defined in 3.7.4 build
scala3/project/Build.scala
Lines 3502 to 3512 in 40be760
Fixes publishing to Sonatype Central be creating 2 new aliases, each dedicated to publish artifacts to either
org.scala-langororg.scala-js. Sonatype Central validation would fail the release if deployment defines more then 1 namespace/organization in the artifacts, (see 1987102)Each of
releaseOrgScalaLangorreleaseOrgScalaJsalias would publish are artifacts for given organization.It also cleans
target/sona-stagingwhich cannot be cleaned - it uses a fixedtarget/sona-stagingpath while root project overrides target directory (see 2968bbf)