-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[SUPERSEDED] Replace -warn-option with -Woption #7686
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
Conversation
4bd424f to
9d519a2
Compare
|
Sorry about the conflict -- checksensible needs an update. |
|
|
||
| // Warning semantics. | ||
| val fatalWarnings = BooleanSetting("-Xfatal-warnings", "Fail the compilation if there are any warnings.") | ||
| val fatalWarnings = BooleanSetting("-Werror", "Fail the compilation if there are any warnings.") withAbbreviation "-Xfatal-warnings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ on maintaining -Xfatal-warnings as an alias. I haven't checked throughout, but it would be good to list the settings that have been renamed (if Any) without leaving an alias in place, for future reference.
|
|
this looks fantastic. I would ❤️❤️❤️ to see this make RC1 collecting like flags under |
|
@som-snytt and |
|
@smarter might like to look this over? |
|
Thanks for the encouragement. I realize I could blow all the good will by suggesting we drop It's usually spelled "optimiser" because it is so parsimonious with its optimal code, that is, a real miser. |
|
I'm all for |
|
I may be too lazy to do I also had reservations about As a semi-casual user, I really don't like sifting through the (Edit: "semi-casual user" has a type inference problem and has to boost Apparently people don't do this anymore, but it's nice to Also: "An extraterrestrial race arrives on Earth with seemingly good intentions, only to slowly reveal their true machinations the more ingrained into society they become. " |
|
What are the stability guarantees around regular options, |
|
I'm sorting what is a "user-facing" verbose option, There will be an update on the options page. Maybe sort the options by Odersky level? With additional levels for "macro nerd", "I report issues on scala/bug", "casual contributer", "I am LARS (lrytz, adriaanm, retronym, smarter)". That would be |
dc330ea to
b147b74
Compare
|
/rebuild |
|
It’s a good point that we should document the stability somewhere. I don’t think we ever did. -X goes through deprecation, -Y is why are you even using this it could change at any time. The new -W should be more stable than -X |
|
They've really spiffied up the docs for javac. I was looking for battle-hardened terminology, but they are still a bit imprecise about "extra" or "non-standard" options, not all of which begin with Maybe I'll submit a PR to promote I had already made I would be hard-pressed to say what is a "standard option." I was going to suggest: "an option useful for ordinary compilation." But |
|
@tpolecat @DavidGregory084 as the chiselers of the compiler-options tablet which is handed down from the mountain, any feedback on this? |
|
This all seems good to me. I will bring in @som-snytt as a consultant for the 2.13 edition. |
|
The current options page puts |
|
I think in general it would be nice if the options had clearer deprecation cycles as they are the public API of scalac, but it's not a particularly onerous task to support several Scala versions at the moment and it doesn't look like this would make things significantly harder 🙂 This looks like a good change to me in any case 💯 |
|
Rebased over at an other PR. @som-snytt, assuming that LGTY, could you update your branch to the HEAD of my pr7686-rebased branch? |
Add standard option `-Werror` with `-Xfatal-warnings` alias. As with javac, it appears on the `-help` output. Rename `-Ywarn-foo-bar` as `-Wfoo-bar`, with the previous name as a abbreviation or alias. `-W` shows warnings, including all the `-Xlint` and `-Wunused`. Use underscore to mean all phases Move option note to bottom of message -V for verbose nee debug options Former flags future and experimental are more former. Move output options to -V. Options which modify output remain -Y. -Yprint-trees:text,compact,format,text+format replaces -Yshow-trees-stringified, et al. Reporter says -Werror Briefer choices list Briefer multichoices list Tweak expressions More -V
Also remove dependency on jackson for yaml output.
|
Rebased and squashed. I'll try to give the task list some attention. That is mostly sanity-checking and documentation. |
|
As 2.13.0-RC1 is getting closer, I am concerned about the state of this PR. |
|
Here's a rebase in another PR - #7908 |
|
@eed3si9n Thanks! That gives me renewed confidence that I, too, may one day achieve the rebase! "All your rebase are belong to us." |
|
Merged the Rebased. |
|
@adriaanm kind of annoying. It makes it much harder to manage branches, because this will appear forever in my list of unmerged. I don't think github has a way to make them disappear. |
|
I deciphered your comment as gratitude for the other branch. Had I understood better, I'd have gladly closed the other PR and waited for you to achieve rebase. |
|
@som-snytt submitting a PR so desirable you nerd-sniped Eugene and Adriaan into finishing it for you is an achievement no one can ever take away from you |
|
Sorry about the confusion. I tend to send alternative PRs as a form of code review, so feel free to let me know if it becomes too much. |
|
Sometimes I underestimate the power of sarcasm. I'll reopen this ASAP, rebased, with the other follow-up from the checklist. Git rebase offers that nothing changed, try --skip, so maybe it knows what it is doing; it's a little bit of work to get there. |
I nearly resolved to clear the scala/bug backlog this year. Fixes scala/bug#3899 Fixes scala/bug#7686 Fixes scala/bug#9668
in fact, I drove by today while revivifying PRs in the old neighborhood. The detour was worth the bon-mots. |
Add standard option
-Werrorwith-Xfatal-warningsalias.As with javac, it appears on the
-helpoutput.Rename
-Ywarn-foo-baras-Wfoo-bar, with the previousname as a abbreviation or alias.
-Wshows warnings, including all the-Xlintand-Wunused.Use underscore to mean all phases
Move option note to bottom of message
-Vfor verbose nee debug optionsFormer flags future and experimental are more former.
Move output options to -V. Options which modify output
remain -Y. -Yprint-trees:text,compact,format,text+format
replaces -Yshow-trees-stringified, et al.
As rashly proposed.