-
Notifications
You must be signed in to change notification settings - Fork 937
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
"javac returned nonzero exit code" error with no stacktrace or details in SBT 0.13.8+ #2256
Comments
Yes, things changed in 0.13.8 with #1702 |
Upon startup, javac may report errors because (for instance) because it received incorrect flags. These errors were not correctly parsed by the JavaErrorParser and were never reported to the user. This commit fixes this problem by adding a new parsing rule in JavaErrorParser: errors that start with the prefix "javac:" are now correctly parsed and reported to the user. Fixes sbt#2256
Upon startup, javac may report errors because (for instance) because it received incorrect flags. These errors were not correctly parsed by the JavaErrorParser and were never reported to the user. This commit fixes this problem by adding a new parsing rule in JavaErrorParser: errors that start with the prefix "javac:" are now correctly parsed and reported to the user. Fixes sbt#2256
Just curious, do you know when this is going to hit an SBT release? Is there a workaround? We've got at least one module that for now needs to be pure-Java, and this problem is kind of annoying. It feels weird pinning us to 0.13.7 just for this (though I'm not sure if we're really using any features in 0.13.8+ beyond bug fixes) |
@shajra Hopefully soon. You can try the nightly from here in the meantime - https://dl.bintray.com/sbt/ivy-snapshots/org.scala-sbt/sbt-launch/0.13.10-20151229-205306/ |
@eed3si9n good to know. Using a nightly is probably more awkward than just downgrading temporarily to 0.13.7, but at least now I know where the nightlies are. Also, I have this thread of conversation to point coworkers to if they are curious about the state of things. Thanks. |
@eed3si9n actually, I shouldn't assume. What's the best way to use that URL for the SBT 0.13.10 snapshot? We're using Paul's "sbt-extras" script. |
I personally don't use the script, so I'm not sure if it works with the nightlies (it might you can try it first). My recommendation would be to try manual installation - http://www.scala-sbt.org/0.13/tutorial/Manual-Installation.html |
@shajra-cogscale Use Or you can use my branch: https://github.com/dwijnand/sbt-extras/tree/sbt-launch-snapshot-repo (diff) |
@dwijnand thanks, that's what I ended up doing. Also, I put in the snapshots repository in our proxy. I think that gets us through this until 0.13.10 properly releases. |
Okay, I played around with the snapshot release of 0.13.10, and I think it helps, but maybe doesn't solve the problem completely. We're on Java 8, and turned on -Xlint:all to start with (which seems to have some non-standard reporting syntax), and here's some output shown for 0.13.7 that's still being suppressed with the 0.13.10 snapshot:
I think the fix doesn't catch this because it's not prefixed with "javac:", but I need to look at the patch and code more closely. It kind of sucks that we're matching on strings. Perhaps we need to include "warning:" and "error:" in the match too? |
Just a note, this particular warning is suppressed with -Xlint:all,-processing. I think I really need to make a minimal project that fails for each of the checks in javac's -Xlint, so we can see that we've captured everything with any fix. |
Consider the following invalid
javacOptions
config:With SBT 0.13.7, this results in the following error message:
In SBT 0.13.8+, on the other hand, the error details are missing, making this hard to debug:
I think that SBT's handling of
javac
error output must have changed in 0.13.8 because there are reports from other users that describe similar symptoms:The text was updated successfully, but these errors were encountered: