Skip to content

Align compiler options to VWXY scheme #12751

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

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Jun 8, 2021

@lrytz lrytz force-pushed the vwxy branch 2 times, most recently from b368c22 to c7d0b75 Compare June 9, 2021 14:39
@som-snytt
Copy link
Contributor

Let me know if I should do something. I have to say, it's so much easier to find verbose output under -V than trying -help then -X then -Y trying to find the option I need.

There is still the issue of "support". History shows that all options are equally ephemeral like all software.

@romanowski romanowski requested a review from smarter June 14, 2021 20:42
@smarter
Copy link
Member

smarter commented Jun 14, 2021

@romanowski I won't be able to get to this for several days so it'd be better if someone else reviewed it.

@smarter smarter removed their request for review June 14, 2021 20:53
@romanowski romanowski requested a review from odersky June 14, 2021 21:07
protected def isVerbose(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
s.name.startsWith("-V") && s.name != "-V"
protected def isWarning(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
s.name.startsWith("-W") && s.name != "-W" || s.name == "-Xlint"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one option of a kind -V and -W each added in this PR. Is it worth creating these two categories? What's the motivation?

Copy link
Contributor

@som-snytt som-snytt Jun 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets a thousand flowers bloom and still be manageable. https://github.com/lampepfl/dotty/issues/12785

If I want more output merely (not change in behavior), -V is more succinct than checking -X and -Y (which become a long list eventually). Everyone needs -Vprint at some point, not just compiler coders.

(But here, I just wanted to say -Wconf.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another motivation is alignment with Scala 2.

@anatoliykmetyuk anatoliykmetyuk merged commit 51f3487 into scala:master Jun 23, 2021
@Kordyjan Kordyjan added this to the 3.0.2 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants