-
Notifications
You must be signed in to change notification settings - Fork 202
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
When fatal warnings set Java ones are also shown as errors #2341
Comments
@tgodzik Would you mind if I took a stab at this one? |
Sure! We should probably filter Java files around
|
Hi @tgodzik I'm having trouble reproducing this issue. I'm currently running bloop version
|
I created a simple sbt project:
And it seems to repro in Metals via BSP. The only thing I see is that the Java warning is not show neither as error nor as warning in the CLI if there is no additional actual error. |
I see. Thanks for sharing that. Weirdly with this project setup I still don't see the unchecked warning being reflected as an error in metals via BSP (I'm using the vscode extension and am looking at the "output" logs view) -- this is true regardless if there are additional errors in the java file. e.g.
Here is my sample project. It should be identical to what you shared above except I had to use the |
You can check the bloop configuration files inside .bloop to see if they indeed have fatal warnings set |
Fatal warnings are set in the bloop settings JSON file. I'm not sure what's going on. I tried cloning this repo mentioned in #6348 and the cast error still only shows as a warning in my metals output. |
I've tried including "fatal warnings" (e.g. incomplete pattern matching) within scala files that are in the same project with the java file with the unchecked cast but it still only shows as a warning. I want to help but there isn't much to go off of if I can't reproduce it locally. |
You could try writing a test and see if it reproduces there or on the CI. But I can't really see how this would not reproduce, I'm put of ideas. |
With this configuration:
and this file:
src/main/java/com/example/Service.java:
Bloop will show the cast warning as error.
This is caused by the fact that we actually turn fatal warnings off to get all the artifacts compiler, we later upgrade diagnostics to errors. We probably don't check the source of them.
The text was updated successfully, but these errors were encountered: