-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #8571: A new source version and migration scheme #8700
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
Unlike originally proposed in scala#8571, we now just use -source, the separate -migration setting is gone. We replace it by having source versions for migrations. So, right now, we have 3.0, 3.1, 3.0-migration and 3.1-migration. A X-migration source level means that migration warnings and changes in preparation for the X source level are enabled. So, the scenarios in scala#8571 would map as follows: - I want to cross compile between Scala 2 and Scala 3: not yet implemented, but it would be -source 2x3 - I want help with migration to Scala 3: -source 3.0-migration - I want help with migration to the cross-compilable subset: not yet implemented, but it would be -source 2x3-migration - I want to make sure my code is future-proof for 3.1: -source 3.1 - I want help making my code future-proof for 3.1: -source 3.1-migration - My compiler's version is3.1, but I want to stick to the more lenient 3.0 version for the moment: -source 3.0. - My compiler's version is 3.1, but I want to stick to the cross-compilable subset: not yet implemented, but it would be -source 2x3
Previously it was `-foo:bar` for a choice setting but `-foo bar` for a string setting. It does not really make sense to demand a difference. The `:` syntax is required only for multi-string settings. Fow now, we allow either a `:` or a space for choice settings.
Compared to the scheme I proposed in #8571, the upside of the PR is that we no longer have a |
The warning breaks build from Tasty, I am not sure how.
Ignoring the cross-compiling variants for now, this creates new in-between scala versions (3.0, 3.1-migration, 3.1). I don't really understand what the
|
@lrytz
It's not the usual deprecation cycle. For the next few versions we need an accelerated scheme to get from one version to the next. After we have stabilized (maybe in 3.1 or 3.2), we will fall back to deprecation cycles, and then we might not need intermediate |
I think the added complexity of these in-between versions should be avoided if possible.
These could be warnins in
So that would allow using new features of
That's like scala 2's |
@lrytz All these things are already implemented and used in the migrations. We do not want to change them, they are an essential part of the tooling. The question is only how to specify what should be done. The previous scheme relied on a combinaton of |
I like this proposal much more than the previous iteration because it doesn't commit to giving meaning to the |
Co-Authored-By: Nicolas Stucki <[email protected]>
Going to merge this later today in order to avoid merge conflicts in CB projects (many of these projects had their build settings changed from |
Unlike originally proposed in #8571, we now just use -source, the separate
-migration setting is gone. We replace it by having source versions for migrations.
So, right now, we have
3.0, 3.1, 3.0-migration and 3.1-migration.
A X-migration source level means that migration warnings and changes in preparation
for the X source level are enabled.
So, the scenarios in #8571 would map as follows: