Skip to content
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

standardize on -Vprint:... (still support -Xprint:... as alias) #22828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented Mar 18, 2025

(I think we should try to make progress on observing the -V, -W, -X, -Y distinctions internally and in docs, etc)

(prompted by participating in the compiler spree today and noticing that the contributing guide was still recommending -Xprint)

@SethTisue SethTisue changed the title standardize on -Vprint:... (still support -Xprint:... as alias) standardize on -Vprint:... (still support -Xprint:... as alias) Mar 18, 2025
@SethTisue SethTisue marked this pull request as ready for review March 18, 2025 02:33
@soronpo
Copy link
Contributor

soronpo commented Mar 18, 2025

I don't know if it was ever discussed before, but "-Y" and "-V" look too similar and it's always confusing to me.

@som-snytt
Copy link
Contributor

It's -V for "verbose" to aid discoverability. Similarly -W for "warning".

Nominally, -X options may change behavior, such as -Xmax-inlines or -Xkind-projector. -Y for "private" also represented "forking" behaviors (now "experimental" as a feature), with the mnemonic that it looks like a fork in the road.

There are fine distinctions: -Xmigration could be -Wmigration, for example. I liked -Xlint for legacy reasons (and the pun).

@soronpo
Copy link
Contributor

soronpo commented Mar 21, 2025

-Y for "private"

I wish this was -P, so it will look different

@SethTisue
Copy link
Member Author

this ship has sailed, I think

fwiw, I have not personally ever noticed any difficulty distinguishing V from Y

@som-snytt
Copy link
Contributor

-P is for plugin.

But it's not too late to take this back to the committee on world alphabets. So long as we're working on upsilon or the Greek y, let's clean up eta and epsilon. Really no reason to have two symbols when a diacritic will do. We don't blame the ancient Greeks enough. Also democracy, they could have nailed that down better.

@som-snytt
Copy link
Contributor

som-snytt commented Mar 21, 2025

I'm reminded that there are usability improvements at #17563

where -Vprint defaults to typer as in Scala 2, and -Vphases:elimByName highlights the phase in the huge list.

Those features are useful to the casual user or contributor, not necessarily the PhD wrapping up their research. So I agree that the sense of what is useful or confusing depends on context.

(Also -Z was reserved for options to the typelevel fork, or possibly the zio. Missed opportunity!)

Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

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

standardise

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.

3 participants