-
Notifications
You must be signed in to change notification settings - Fork 55
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
Also set javacOption
#72
Comments
If Someone™️ wants to do the work to add a JavacOptions DSL I don't have any objection in principle, but since I rarely use mixed projects personally I wasn't planning to do it myself. 😛 BTW, how do you think that |
Yeah, it's somewhat a question of philosophy. If The sbt-tpolecat Way is to individually add lints instead of doing the lazy
That's a good question. I'm a little confused I guess. If you want to disable fatal warnings for part of your build for whatever reason, how would you do that with sbt-tpolecat? |
At the moment there are different modes for the plugin, and default "option sets" for each mode. For the "development" mode we have: tpolecatDevModeOptions := ScalacOptions.default for "CI" mode we have: tpolecatCiModeOptions := tpolecatDevModeOptions.value + ScalacOptions.fatalWarnings for "release" mode we have: tpolecatReleaseModeOptions := tpolecatCiModeOptions.value + ScalacOptions.optimizerMethodLocal If you want to enable a certain mode you can either use a command:
or set an environment variable:
If no environment variable is set then you get the default mode (CI mode). So at the moment, if you want to disable fatal warnings, you can either fiddle with the option sets to set them how you like in each mode, or set The reason that the default mode is the CI mode is that existing users didn't want the behaviour to change (i.e. fatal warnings should be enabled in the default configuration for this plugin). |
To answer this specific question, you could do something like:
Or you could set the more specific option key just for the default mode |
Ok, thanks, that's helpful. So |
I have a PR open with sbt to make removing options nicer (sbt/sbt#6856) but unfortunately it's stuck on a legal review of the CLA at the moment 😢 |
Good places to look to understand what we need to configure here: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html Annoyingly the page for the javac command keeps moving in each JDK release 😆 |
sbt-typelevel-settings currently sets:
and
I started a PR to add these to sbt-tpolecat. Would the idea be to go all-out and add
class JavacOption
and stuff?The text was updated successfully, but these errors were encountered: