-
Notifications
You must be signed in to change notification settings - Fork 1k
Scala 2 compiler options page needs updating #1711
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
Comments
I'm actually happy to help with this. Without "actually" knowing, I can use each of the options in turns and see if they give any deprecation warnings. But how shall I update the docs?
Also "I" am not going to know if there are any available options that are currently missing from the page, without some help to where I might find an authoritative list. |
@gavinbaumanis thanks for taking an interest in this! over in the scala/scala repo, running I think that's probably the key piece of information you were missing in order to dig deeper into this...? |
@SethTisue : Awesome - thanks very much! |
In the -opt section of compiler-options.yml is the following;
They DO NOT appear in the page; Is the [deprecated text in the YML automatically handled? |
Also, please, I have found a discrepancy between the YML and the documentation page; But the documentation page has; Not only is the text different, but the JVM values don't line-up either. Do I flag these differences too - while I am looking for deprecated values? |
I don't know. You might need to look at the code that processes compiler-options.yml
I don't know. I certainly hope we aren't manually altering things. We shouldn't be, having it be automatic is the only sustainable approach.
it appears to me from https://github.com/scala/scala/blob/2.13.x/src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala#L58-L64 that
I would say the ambition level here is up to you — any amount of forward progress on this that you make is good. The more accurate the page gets the better, but as they say, the perfect is the enemy of the good. (If you end up with some undone work, an additional ticket with a list would be welcome; perhaps someone else would choose to tackle it.) |
@SethTisue : Thanks Seth.
|
@SethTisue
Which would seem to be saying that it should produce the documentation of;
Which it does do for sbt. However the documentation;
In
If I am reading this correctly - I THINK the deprecation warning is missing from the HTML docs because the word "deprecated" is NOT is the description : and test used in the compiler / sbt is supplied via; Do I have this right / am I missing something? And; is there a way I can locally produce the documentation for testing locally? Thanks. |
I haven't seen this code before, but your reasoning seems plausible to me. I'm pretty sure nobody is working on any TODOs or FIXMEs in this area, it hasn't been touched in a while. I'll @-mention @exoego in case he wants to add anything.
in the scala/scala repo,
so running |
relevant ticket I happened across: scala/bug#11642 it seems to indicate that perhaps the |
Yes, the tool was supposed to make yml reflect Another bug in flight is scala/bug#11873 to optimise the optimiser groups. |
@gavinbaumanis interested in returning to this...? |
Someone asked on SO how do I see options for 2.11? It would nice to have a fancy drop-down. |
(a low-tech solution could be to add a section to the current version that links to the source on GitHub for the last 2.11.x and 2.12.x versions that existed. or even link to Wayback Machine versions) |
@gavinbaumanis interested in returning to this? |
I am returning to this now. Thanks @SethTisue. |
@SethTisue : Do you want a giant issue / document at the end of this - or do you want individual issues raised for the things that I find? |
uh, I guess a single issue for now, and then I suppose we might choose later to split things out |
@SethTisue : OK so I am editing the code to correct the documentation (I am happy to go through it and see if I can do it) - Or am I just flagging the issues I have found between the two different flavours (*.YML and the docs)? |
@gavinbaumanis the ambition level is up to you — any amount of improvement is better than nothing. Is the automatic generation aspect even currently working? If not, that seems like the single most important thing to address. |
@SethTisue : I am happy to try it all! : Though, I have had a look at the code and it is beyond me at the moment to fix without context / help. Do you know anyone who knows about the document generation engine - that I could ask directly - at the times I get stuck? Thanks. |
I believe @exoego is the original author. @som-snytt and I can try to help as well. Usually the best way to get help is to open a draft PR in scala/scala and ask for it there. Chat rooms are catch-as-catch-can, but asking things on https://gitter.im/scala/contributors definitely works at least some of the time. |
Is there a new volunteer who would like to tackle this? |
Hi @SethTisue, I don't mind getting started on this. |
How can I get started on it? |
@Shorla are you able to run |
@SethTissue I tried running it with docs/mdoc, it said commamd not found. |
Responding to an old comment about |
The PR for optimizer flags has landed, so at least there is no need to republish the options page. But that would be another example of a canonical form with variants (which may or may not be deprecated). @Shorla there is a "task" under sbt in the scala/scala build. I think it was mentioned in the long thread above. Ideal case is just to run it and ... does it update the file in this sibling repo? Something like that. |
Old volunteers also welcome. The Scala project is not "newist". |
clone the scala/scala repo, then start sbt, then enter there's a little bit of code for it in |
Another idea at scala/scala3#15406 (comment) is to automate help doc for options. Maybe a widget to reveal per-option help. That would let you add an option, add help text, and not touch markdown.
|
I think so, yes. Visually deemphasized, but present so they show up in searches (whether via Google, or when searching within the page). |
https://docs.scala-lang.org/overviews/compiler-options/index.html
mentions;
-optimize or -optimise Enables optimizations.
This option is now deprecated.
(probably need to check all others, too.)
The text was updated successfully, but these errors were encountered: