-
Notifications
You must be signed in to change notification settings - Fork 1k
Address #1058: Document scalac compiler options. #1063
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
_data/compiler-options.yml
Outdated
schema: | ||
type: Boolean | ||
description: "Warn when non-Unit expression results are unused." | ||
note: "To reduce noises for common idiom, warning are suppressed if type of results are `this.type`." |
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.
This note is for scala/bug#10761
.definition-list dd { | ||
margin-left: 2em; | ||
} | ||
.definition-list .deprecated { |
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.
Hope someone polish these deprecated
and note
styles.
_data/compiler-options.yml
Outdated
|
||
Those influencing to language semantics are likely to be deprecated in Scala 2.13 (see [scala/scala-dev#430](https://github.com/scala/scala-dev/issues/430)). | ||
|
||
Some optimization-related options, e.g. `-opt:**` and `-opt-inline-form` are included in this section, since **REASON_HERE**. |
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.
I found -opt:**
and -opt-inline-form
are in private settings (-ish) section for `-Y' in the source therefore put them in this section.
Is it OK to categorize -opt:**
and -opt-inline-form
as private settings?
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.
yes I think so 😄
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.
I think that should say -opt-inline-from
, not -form
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.
Added reason and fixed typo.
Wow, this is amazing work @exoego. How did you generate the yml file? Can that be done for future versions of Scala? |
ba8fa3d
to
f9ab9e5
Compare
I used a generator added in my fork of scala, which can be executed via
I believe so, as this PoC-ish generator demonstrated. Manual modification of several minutes are required, since the YAML file is supposed to contain extra useful information (such as why The generator is super quickie and dirty... |
7375ca2
to
3f5ea02
Compare
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.
This looks great to me. Have you tried submitting a PR to scala/scala adding the exporter?
I like the idea of having all the scalac compiler options here. I propose that we also add the scala version that generated them, so that people don't expect it to be up-to-date with the latest release.
I think this already provides value as-is, so the automation of this process for every Scala relase could happen in another PR. I'm fine having slightly outdated compile options be online; changes to the options are unlikely and I think most people will see value in documenting them in our website. This is also good for Google searches.
I'm requesting the review of @SethTisue to complement my approval.
(crazy busy lately, but I'll get to this) |
Someone needed this today. Also, |
I don't know what the hang-up is, but someone needs this literally every day. |
apologies. I should have merged this first and worried about maybe improving it further later. thank you, @exoego! this looks great already. |
That is a huge improvement over nothing! Of course, it's already out of date. But that just gives folks an excuse to head over to StackOverflow and ask a question and earn five points. In fact, I'm going over there now to ask what is |
This PR addresses #1058.
The metadata (
YAML
) and style (HTML
/Markdown
/SCSS
) are separated, so that one can change look-and-feel easily.Almost all descriptions are extracted from source and manually edited.