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
Add -source future, remove existentials in 3.0 #42
Conversation
@@ -57,7 +57,8 @@ object TpolecatPlugin extends AutoPlugin { | |||
ScalacOption("-language:experimental.macros", removedIn = Some(V3_0_0)), // Allow macro definition (besides implementation and application) | |||
ScalacOption("-language:higherKinds", removedIn = Some(V3_0_0)), // Allow higher-kinded types | |||
ScalacOption("-language:implicitConversions", removedIn = Some(V3_0_0)), // Allow definition of implicit functions called views | |||
ScalacOption("-language:existentials,experimental.macros,higherKinds,implicitConversions", addedIn = Some(V3_0_0)), // the four options above, dotty style | |||
ScalacOption("-source future", addedIn = Some(V3_0_0)), // Emit warnings for features that are planned to be removed (e.g. extending non-open classes outside their files). | |||
ScalacOption("-language:existentials,experimental.macros,higherKinds,implicitConversions,strictEquality", addedIn = Some(V3_0_0)), // Require CanEqual for equality checks + the four options above, dotty style |
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.
I'm now wondering if we should split this: if someone wants to opt out of a single option, they need to first remove the whole thing, then add all the other options again. If we split this into separate -language:foo
flags, it's much easier to remove only the ones you want removed.
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.
Also, I just hit scala/scala3#10850 so I no longer like the strict equality option for now.
Sorry @kubukoz I would love to merge this but I'm nervous about defaulting to |
Yeah, after some consideration I'm not a fan. I'll update this to split |
@DavidGregory084 I did the above, turns out the flags were identical as the 2.x ones so there was no need to treat them separately. I removed |
This is great, thanks so much @kubukoz! |
Just a FYI: I had to add a little filter (2m/ciris-hocon@e61f34a) to not use |
Same... I'm not sure how I feel about it. |
Yea, its tricky. For projects that actually use Scala 3 syntax |
ScalacOption("-language:experimental.macros"), // Allow macro definition (besides implementation and application) | ||
ScalacOption("-language:higherKinds"), // Allow higher-kinded types | ||
ScalacOption("-language:implicitConversions"), // Allow definition of implicit functions called views | ||
ScalacOption("-source future", addedIn = Some(V3_0_0)), // Emit warnings for features that are planned to be removed (e.g. extending non-open classes outside their files). |
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.
-source:future
can also be used. And it would not be split across two elements later on.
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.
Oh that's cool!
Maybe we can look at crossScalaVersions and see if it had at least one of both? Also, this probably impacts library authors more than application developers... Nevertheless it'd be nice if we didn't force all the maintainers to make changes in such an update. |
Sometimes |
hmm, even with things like the new wildcard imports ( |
Yup: scala/scala#9582 It seems |
Yes, looking at the PR queue from scala-steward I am a bit undecided on this now 😆 Nobody has come to yell at me yet though! |
This will only be temporary. See typelevel/sbt-tpolecat#42 and typelevel/sbt-tpolecat#44
This will only be temporary. See typelevel/sbt-tpolecat#42 and typelevel/sbt-tpolecat#44
Remove -source future (rolls back part of #42)
Closes #41