-
Notifications
You must be signed in to change notification settings - Fork 337
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
Metals 1.4 fails compilation with Wartremover installed #6889
Comments
It looks to be the same problem as scalacenter/bloop#1421 and is a blocker for upgrading for us. We'll revert to 1.3.5 until such time that we have a solution. |
Also looks like there's a solution coming. scalacenter/bloop#2485 |
We ran into the same issue. There is an even smaller reproduction (hello world essentially) that I reported on discord. I'll paste it here. Maybe someone will find it useful:
scalaVersion := "2.13.15"
wartremoverWarnings := Warts.all
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.2.3")
object Main extends App |
Thanks! I think I already have a fix. As soon as it's merged I will release bloop, then probably metals also |
@tgodzik can we close this as part of scalacenter/bloop#2485, or just waiting on a release? |
I wanted to fix one thing before the release, should be this week. I will close this issue with the update of default Bloop version |
@tgodzik Just curious if this fix is coming shortly? |
I will release bloop tomorrow and you can check it out first. |
I think Another thing: the screenshot above was taken in Ubuntu (WSL actually). Bloop is available on arm since 2.0 but coursier doesn't want to launch it so |
I am doing 2.0.5 release to fix things, but not sure about the second issue. Does it work if you do |
Actually that second issue disappeared so nevermind. Also I just tested with 2.0.5 and at least it starts 🎉 |
The update to Bloop 2.0.5 was merged. If testing the nightly, you need to reimport the build for it to effect things. I will do a release next week. |
We still don't have a 1.4.1 Metals release, so not sure this should be marked done? I realize it's a bloop issue, but Metals is specific about what version of bloop. I realize we can override, but users won't know to do that when they encounter the issue. |
I agree. For what it's worth I confirm that it works with the pre-release |
just tried with metals 1.4.1 and the only way to actually get rid of the errors was nuking all |
Did you reimport the build? You can always try to run with a verbose compilation and see if that shows what parameters are exactly used to compile. |
i restarted bloop as requested by metals, i imported the build, i did a clean compile, i tried "clean and restart build server" "restart build server". then i stopped code, killed bloop in the terminal and restarted code, then tried all of the above again. after that i did the nuking and imported the build again for good measure, and everything was fine. of course it may have been the doctor lying to me :) |
Wait am I the only who nukes those folders on a daily bases? 🙈 |
The should not be necessary, but |
Oh is that a new button? I'll try and report back... |
@tgodzik makes me wonder - if "clean and restart build server" nukes the .bloop and .metals folders, then why would me doing that manually make any difference? i'll check if it see the same behaviour on one of my other projects. edit |
It doesn't fully remove .bloop and .metals, only the Bloop artifacts, everything else should not cause any issues. It's just Metals indexes and some information about when was the project last imported etc. And also bloop json files, which should be correct also |
Compiler quits with Wartremover Enabled
During today's upgrade from 1.3.5 to 1.4.0, I noticed that compilation of our projects just stopped compiling after a couple of projects. After looking at the bloop errors, I decided to remove WartRemover from our environment to see if that was cousing the issue. Once removed, Metals started working again.
I removed the following:
I've included the errors we were seeing.
reports.zip
Here are another set of errors after removing wartremover, but Metals does seem to work.
reports_removed_wartremover.zip
Expected behavior
I expect Metals to be tolerant of Wartremover, and continue to compile all of the code.
Operating system
Linux
Editor/Extension
VS Code
Version of Metals
v1.4.0
Extra context or search terms
wartremover
The text was updated successfully, but these errors were encountered: