-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Allow using -Xsource-features
without -Xsource:3
#11123
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: 2.13.x
Are you sure you want to change the base?
Conversation
Some of the backports, like `-Xsource-features:case-apply-copy-access`, are useful even for projects that are on Scala 2 for the time being. We don't need to force them to use `-Xsource:3` and deal with these new warnings.
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.
At a high level (a high moral level), this turns migration options into forking options. If you make it easier for them not to upgrade, then they'll never pay the upgrade fee! Or is this a clever plan to keep them paying for consultation on old versions?
The idiom of having everything behind efficient flag currentRun.isScala3
, to avoid incurring unnecessary cycles, is maybe overblown.
The other question is whether there are feature interactions, but we would have noticed by now; I don't know if many projects do cherry-pick these or which actually cause problems (I imagine inference options).
I see the changes to boolean exprs factor out the feature flag; I recall that some of those conditions needed "fine tuning", probably a test would break if the condition is wrong; I did proofread for correct number of r's in words such as inferring and overridden.
Thanks for thinking this through. @SethTisue what do you think? |
I lean mildly against merging this, on the grounds that (as Som has already said in different words) it grows the matrix of possible flag combinations that we have to support, and for relatively little gain but I do really mean the "mildly" |
@SethTisue is nothing if not mild. I think a neutral opinion is in favor of the contributor, who must have reasons, unless @lrytz changes his mind. It occurs to me to wonder if a build might be configured with the source features, but there is no effect until source 3. Who would do that? Oh, maybe features in common settings, but only certain subprojects are migrating. I wonder if the plugin formerly known as tpolecat has an opinion about these settings. |
Yeah, it's |
Maybe just add an alias |
As a middle ground, I could leave in the |
|
Some of the backports, like
-Xsource-features:case-apply-copy-access
, are useful even for projects that are on Scala 2 for the time being.We don't need to force them to use
-Xsource:3
and deal with these new warnings.