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

Support Scala 3.3.0-RC1 #3

Closed
gvolpe opened this issue Jan 25, 2023 · 8 comments
Closed

Support Scala 3.3.0-RC1 #3

gvolpe opened this issue Jan 25, 2023 · 8 comments

Comments

@gvolpe
Copy link

gvolpe commented Jan 25, 2023

Any chances of publishing a milestone or RC for this Scala version? A lot of folks are interested in the new -Wunused:imports flag :)

scala/scala3#16157

@ghik
Copy link
Owner

ghik commented Jan 25, 2023

@gvolpe
Copy link
Author

gvolpe commented Jan 25, 2023

Happy to do so! Expect one later this evening :)

@ghik
Copy link
Owner

ghik commented Jan 25, 2023

Fixed in 0.2.3

@ghik ghik closed this as completed Jan 25, 2023
@kubukoz
Copy link

kubukoz commented Jan 27, 2023

As a fellow plugin author, I'd like to suggest backpublishing (publishing an artifact under an existing version) - it can be kinda annoying when the plugin keeps getting updates that don't change anything for existing Scala versions, especially if you're trying to support Scala milestones.

I made this: https://github.com/polyvariant/better-tostring/blob/main/project/BackpublishPlugin.scala - for projects publishing with sbt-typelevel, but maybe it can easily be modified to work for your build as well. The downside is that you make these releases locally and not from CI (that should be possible as well, though)

@ghik
Copy link
Owner

ghik commented Jan 27, 2023

@kubukoz yeah, I used to backpublish silencer but it became sufficiently annoying to publish locally that I dropped it. Maybe I'll look into it again, thanks for the reference.

@kyri-petrou
Copy link
Contributor

Out of curiosity, are there any additional checks that this plugin does in Scala versions 3.3.x and above, as opposed to using the new -Wvalue-discard compiler flag?

@gvolpe
Copy link
Author

gvolpe commented Jan 31, 2023

@kyri-petrou I can only speak as a user of this plugin, and can confirm -Wvalue-discard doesn't catch discarded IO values, whereas zerowaste does: https://gist.github.com/gvolpe/088f6d1a1a8071304b6ae2db444d687c

You can see this program fails to compile, but if you comment out the using plugin line, it'll compile without issues. Unrelated, but it looks like a lot of these new flags are still quite buggy --- e.g. the -Wunused:imports flag gives some false-positives.

@kyri-petrou
Copy link
Contributor

@gvolpe that's quite interesting.. For some reason I can't get the flag to work at all when using scala-cli. In any way, I'll stick with zerowaste plugin until the compiler flags are in a more mature state 👍

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 a pull request may close this issue.

4 participants