Skip to content

Fix binary version computation of Scala nightly versions #1139

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

Conversation

alexarchambault
Copy link
Collaborator

@alexarchambault alexarchambault commented Feb 3, 2021

The Scala nighly versions look like 2.13.5-bin-f956b11 for example, and can be downloaded from here. AFAIU, their binary version should look like X.Y, just like stable versions, so that the binary version of 2.13.5-bin-f956b11 would be 2.13. This PR fixes that.

This would be useful for com-lihaoyi/Ammonite#1150, where using Scala 2 nightlies would allow to bump the Scala 3 version (from 3.0.0-M1 to 3.0.0-M3).

I'm not really sure if / where I should add tests for that.

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks reasonable. I wonder if we should limit it to a major of 2. I can't point you right now to the best place for a test. I think we cover this only partially in intergration tests, but I think a simple unit test for def scalaBinaryVersion should do it.

@alexarchambault alexarchambault force-pushed the scala-nightlies-binary-version branch from 809e8ae to 4d5e95a Compare March 30, 2021 17:44
@smarter
Copy link
Contributor

smarter commented Mar 30, 2021

Note that for Scala 3 the binary version should always be 3: https://github.com/sbt/librarymanagement/pull/374/files

@alexarchambault
Copy link
Collaborator Author

@smarter Even for the RCs?

@smarter
Copy link
Contributor

smarter commented Mar 30, 2021

For all RCs that will happen after 3.0.0 is out yes (so 3.0.1-RC1 is _3, but 3.0.0-RC1 is _3.0.0-RC1), because they won't break binary compatibility (but if they break tasty compatibility we'll bump the tasty version number).

@alexarchambault
Copy link
Collaborator Author

Right, I meant for the current RCs, yes.

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Change looks good to me. We need to fix the tests, though.

@adpi2
Copy link
Contributor

adpi2 commented Apr 7, 2021

I am currently trying to fix the tests in #1259

@lefou
Copy link
Member

lefou commented Apr 10, 2021

Superseded by #1259 (contains the same commits).

@lefou lefou closed this Apr 10, 2021
@alexarchambault alexarchambault deleted the scala-nightlies-binary-version branch May 2, 2021 11:08
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.

4 participants