Skip to content

Cleanup our list of compiler flags #10236

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

Closed
smarter opened this issue Nov 8, 2020 · 6 comments
Closed

Cleanup our list of compiler flags #10236

smarter opened this issue Nov 8, 2020 · 6 comments

Comments

@smarter
Copy link
Member

smarter commented Nov 8, 2020

We should go through https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala and clean it up, in particular there's a bunch of flags which don't do anything (because they were never implemented or because they were dropped) which should just be removed, there's flags which try to do something but never worked (-Xno-value-classes) and there are flags which don't separate words by hyphens (-noindent). It might also be worth reclassifying some flags (if -Ysemanticdb is officially supported it should be -Xsemanticdb or -semanticdb)

@smarter
Copy link
Member Author

smarter commented Nov 8, 2020

-explain-types prints compiler implementation details about constraint solving, it should be a -Y flag I think

@som-snytt
Copy link
Contributor

It's almost the weekend, although it's hard to tell; I'll PR this, with an interest in introducing -Wconf and also aligning with 2.13 -VWXY scheme. I don't know if I can trust polling numbers, but I wonder if settings should retain aliases such as -Xprint for -Vprint. (Aliases encourage recidivism.) The advantage of the scheme is that -V means more verbosity without changing behavior (modulo forcing types), similarly -W for warnings. Then -XY are about behaviors.

@anatoliykmetyuk
Copy link
Contributor

TODO:

  • Align as much as possible w/2.13

@sjrd
Copy link
Member

sjrd commented Dec 4, 2020

I just submitted a first batch at #10655. In addition, here are some more thoughts:

  • Make -priorityclasspath a -Y option?
  • Remove -Xignore-scala2-macros?
  • Get rid of -Yemit-tasty-in-class and the handling of .hasTasty files?
  • Get rid of -Yno-inline? It's used by the doc tool, but disabling inlining can change inferred result types and otherwise produce a different language. We shouldn't do that.

@smarter
Copy link
Member Author

smarter commented Dec 4, 2020

Make -priorityclasspath a -Y option?

I think we should try to remove it, I'm not sure it actually does anything in the one test where it's used right now.

Remove -Xignore-scala2-macros?

That's still useful for making progress when trying to port code.

Get rid of -Yemit-tasty-in-class and the handling of .hasTasty files?

Yes it's not maintained so might be broken anyway.

Get rid of -Yno-inline?

Wow. Yes, definitely :). It's the same level of cannot-possibly-work as -Xno-value-classes

@sjrd
Copy link
Member

sjrd commented Dec 10, 2020

Status update: everything is done, except

I don't think the last item is critical for M3 or even for the final release. Those options should be renamed while keeping the old aliases anyway, so we won't break anything if we do it later. Therefore, I am not going to work on this, as I believe my time is better used elsewhere at the moment.

@som-snytt You expressed interest in making those ports at some point. Are you still interested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants