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

Document the use of * as a placeholder and deprecate the use of ? #108

Closed
smarter opened this issue Jun 30, 2019 · 8 comments
Closed

Document the use of * as a placeholder and deprecate the use of ? #108

smarter opened this issue Jun 30, 2019 · 8 comments

Comments

@smarter
Copy link
Contributor

smarter commented Jun 30, 2019

In #91 * was introduced as an alternative placeholder syntax, as part of a long-term plan for repurposing ? for wildcards in Scala (see http://dotty.epfl.ch/docs/reference/changed-features/wildcards.html). To allow cross-compilation, we recently added -Ykind-projector to Dotty to support the * placeholder. However, the documentation of kind-projector does not mention this new syntax, and the old one isn't deprecated, so people are unlikely to start using it. Could this be fixed ?

/cc @milessabin

@LukaJCB
Copy link
Member

LukaJCB commented Jun 30, 2019

I can go through cats and change all of the use cases there soonish.

@milessabin
Copy link
Member

I'll PR a doc change ASAP.

@dwijnand
Copy link
Contributor

dwijnand commented Jul 1, 2019

And a runtime deprecation warning, right? (Ideally logging only once per compilation unit, rather for each instance.)

@gabro
Copy link

gabro commented Jul 2, 2019

I would also suggest a scalafix rule that could be applied by scala steward once the old syntax gets removed

@VladKopanev
Copy link

I have added an issue for IDEA scala pluggin to support new placeholder : https://youtrack.jetbrains.net/issue/SCL-15756

@milessabin
Copy link
Member

PR with a simple switch from ? to * in the docs and examples here: #109.

There ought to be a more explanatory paragraph in the README, but I wasn't sure quite how to structure it: putting it right at the beginning is a bit disruptive for someone who just wants to learn about the plugin. OTOH there isn't really a particularly natural break to insert it later, and tacking it on right at the end makes it a bit hard to discover.

@sugakandrey
Copy link

sugakandrey commented Jul 10, 2019

@VladKopanev thanks for notification, I've added support for *-syntax to scala-plugin. It is only available in nightly builds right now, but it will be available in 2019.2 release builds as well.
IntelliJ users can migrate to new syntax via Run inspection by Name action, choosing Deprecated kind-projector syntax inspection and then applying Replace with `*`-syntax quickfix on the whole project in batch. .

@jrduncans
Copy link

Any progress here? Kind of awkward now that IntelliJ has shipped with a warning that ? is deprecated, but there's nothing on the kind-projector site about it.

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

No branches or pull requests

9 participants