-
Notifications
You must be signed in to change notification settings - Fork 144
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
FS-1146-scoped-nowarn RFC proposal #782
Conversation
So, here is a full proposal. |
Heads up: The following section will need a rewrite showing the logic and a few samples (I assume those can be taken from tests from the implementation PR once it lands): |
Can this PR be merged? |
@T-Gro @vzarytovskii If you get a chance could you assess and merge if you see fit? thanks |
drafts/FS-1146-scoped-nowarn.md
Outdated
|
||
2. `#warnon` shall have warning numbers as arguments in the same way as `#nowarn` (including non-string arguments (RFC-1147)). | ||
|
||
> *Note:* Legacy oddities such as warning numbers in triple-quoted strings shall continue to be valid, for compatibility reasons. However, "multiline #nowarn" (with indented warning numbers in the following lines) is considered a bug and will not be supported any more, because it is against the spec and totally against the idea of pragmas. Tools must be able to easily interpret pragmas. Also, spaces between the hash sign and the nowarn/warnon (line `# nowarn 25`) shall not be allowed. |
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.
Does this affect also code targetting langversion:9 and lower?
If there are more decisions like this, it would be good to have them all consolidated in a single paragraph which can then become part of the release notes, including examples.
(i.e. would prefer to have all changes of behavior for correct and incorrect code samples prepared in a single place now)
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 consolidated all compatibility items in one section.
drafts/FS-1146-scoped-nowarn.md
Outdated
|
||
# Detailed specification | ||
|
||
1. The compiler shall recognize a new *compiler directive* `#warnon` (to be added to §12.4 of the F# spec). |
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.
Apart from the spec and from https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/compiler-directives#preprocessor-directives , will any other doc pages need updating?
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.
The last section of the RFC mentions all the places that I found.
This includes a small entry in the formatting guidelines.
This RFC looks good, it can be merged - the remaining comments are about preparing explicit single-place documentation for breaking changes. |
Thanks. |
Draft was OK initially, but please move it to https://github.com/fsharp/fslang-design/tree/main/RFCs now. |
done |
RFC proposal for scoped nowarn.
Click here to view the latest version.
For discussions, #786 has been started.