Skip to content

sbt-dotty: Fix the binary suffix used for publishing #12452

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

Merged
merged 1 commit into from
May 12, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented May 12, 2021

The compiler we publish is compiled with a non-bootstrapped compiler, so
its scalaBinaryVersion suffix is computed from the version number of the
non-bootstrapped compiler, for 3.0.0-RC3 this was
3.0.0-RC3-nonboostrapped and we correctly return 3.0.0-RC3 as a
binary version, but for 3.0.0 this is 3.0.0-nonbootstrapped for which
we return again 3.0.0-nonbootstrapped when we really want just 3.
This is why we incorrectly published https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3.0.0-nonbootstrapped/

Fixed by special-casing RCs and milestones which are the only special
suffixes that get their own binary suffix.

This fix is specific to the release-3.0.0 branch since the master branch
does not use sbt-dotty anymore (and will need its own fix to publish
3.0.1-RC1 correctly due to a different issue with how sbt computes
the suffix for 3.0.1-RC1-nonbootstrapped).

The compiler we publish is compiled with a non-bootstrapped compiler, so
its scalaBinaryVersion suffix is computed from the version number of the
non-bootstrapped compiler, for 3.0.0-RC3 this was
`3.0.0-RC3-nonboostrapped` and we correctly return `3.0.0-RC3` as a
binary version, but for 3.0.0 this is `3.0.0-nonbootstrapped` for which
we return again `3.0.0-nonbootstrapped` when we really want just `3`.
This is why we incorrectly published https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3.0.0-nonbootstrapped/

Fixed by special-casing RCs and milestones which are the only special
suffixes that get their own binary suffix.

This fix is specific to the release-3.0.0 branch since the master branch
does not use sbt-dotty anymore (and will need its own fix to publish
3.0.1-RC1 correctly due to a different issue with how sbt computes
the suffix for `3.0.1-RC1-nonbootstrapped`).
@smarter smarter requested review from anatoliykmetyuk and adpi2 May 12, 2021 19:52
@smarter smarter mentioned this pull request May 12, 2021
8 tasks
@smarter
Copy link
Member Author

smarter commented May 12, 2021

mill fails because it's also incorrectly setting the scalaBinaryVersion for 3.0.0-bin-..., which we can ignore since it shouldn't happen for the release. However I don't understand the scodec failure, I see it's been worked around in a9f1fa6 to not affect the release build so we can also ignore it, but I don't understand why it worked previously since it's using an experimental feature without the corresponding language.experimental flag being enabled., oh well.

@smarter smarter merged commit a098c13 into scala:release-3.0.0 May 12, 2021
@smarter smarter deleted the fix-binaryVersion branch May 12, 2021 21:06
@smarter
Copy link
Member Author

smarter commented May 12, 2021

mill fails because it's also incorrectly setting the scalaBinaryVersion for 3.0.0-bin-..., which we can ignore since it shouldn't happen for the release.

I was wrong, that also fails in release builds because the community build is still done with 3.0.0-bin-SNAPSHOT, it didn't fail before because both our own build and mill were using the same incorrect suffix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants