Skip to content
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

Remove deprecated ? syntax #186

Merged
merged 1 commit into from Apr 30, 2021
Merged

Conversation

smarter
Copy link
Contributor

@smarter smarter commented Apr 30, 2021

Scala 2.13.6 and 2.12.14 will interpret ? as a wildcard when using the
-Xsource:3 flag (cf scala/scala#9560). This
means that the old kind-projector syntax will no longer work, so it
seems like a good time to remove it. This will also allow us to compile
more of the community-build with -Xsource:3 enabled (cf
scala/scala-dev#769).

Sincet this is a breaking change, we also bump the version to
0.12.0-SNAPSHOT.

Scala 2.13.6 and 2.12.14 will interpret `?` as a wildcard when using the
`-Xsource:3` flag (cf scala/scala#9560)). This
means that the old kind-projector syntax will no longer work, so it
seems like a good time to remove it. This will also allow us to compile
more of the community-build with `-Xsource:3` enabled (cf
scala/scala-dev#769).

Sincet this is a breaking change, we also bump the version to
0.12.0-SNAPSHOT.
Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

This plugin is widespread, but not transitive, so I think the breaking change won't hurt much. And I suspect the Venn diagram of kind projectors and fatal warners has a good overlap, so it may even just drop in for most people.

@SethTisue
Copy link
Member

@neko-kai care to explain your objection?

@neko-kai
Copy link
Contributor

@SethTisue Same as before in #120, I'm still using ? and would not like to make the syntax jump to * only to make another one to _ in the future – with the last jump likely cutting off Scala 2 cross-compilation.
This change cuts off ? syntax without adding support for _ in Scala 2. You've confirmed before that the latter is possible to add to Scala 2 too, with two-way implication that I must make the contribution, but I think now frankly I will not be able to find the time or the motivation to do this in any reasonable timeframe. This change will force me to either change to * (instead of preferrable _) or keep using an old version of kind-projector indefinitely. Neither are really a big deal, but I can still probably voice my objection and a preference for direct _-as-placeholder support with -Xsource:3. (But again I probably won't be able to add the code myself which makes my argument weaker)

Copy link
Contributor

@larsrh larsrh left a comment

Choose a reason for hiding this comment

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

Staying on an old version of kind-projector appears like an acceptable workaround to me.

@larsrh larsrh merged commit 59a6169 into typelevel:main Apr 30, 2021
@larsrh
Copy link
Contributor

larsrh commented Apr 30, 2021

I can release on Monday, unless someone thinks it's urgent.

smarter added a commit to smarter/scala that referenced this pull request Apr 5, 2022
Like scala#9721, the goal here is to ease
cross-compilation between Scala 2 and 3 code as we prepare for `_` as wildcard
to be deprecated in Scala 3 (cf scala/scala3#5379).

This is technically a source-breaking change, but using a type named ? without
backticks is deprecated since 2.13.6 (scala#9626) and defining a type named ? without
backticks is disallowed since 2.13.7 (scala#9735). The only known user of ? as a type
name was the kind-projector plugin, but support for this syntax was removed from
the plugin a year ago (typelevel/kind-projector#186),
so I believe this change won't be disruptive.
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.

None yet

6 participants