-
Notifications
You must be signed in to change notification settings - Fork 143
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
base: main
Are you sure you want to change the base?
Conversation
drafts/FS-1146-scoped-nowarn.md
Outdated
8. `--nowarn` compiler flags are not considered for processing `#warnon` directives. This means that for a warning number `n` that is disabled by a compiler flag | ||
|
||
a) `#warnon` for `n` without previous `#nowarn` for `n` is an error. | ||
|
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 understand the perspective of protecting against user mistakes, by calling it an error.
But I do not like the UX for the following scenario:
- A huge project, and I want to ignore a warning in just 1 file out of many.
Would the recommendation be to use:
--nowarn 123
on project level#nowarn 123
in top of the file- immediately followed by
#warnon 123
right below it ?
I am wondering if the repetitive #nowarn
would be needed.
The F# compilation could be changed to allow the following pairs:
- Valid pairs of
#nowarn
and#warnon
- A pair of project level
--nowarn
and a file level#warnon
And produce an error in remaining cases
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.
@T-Gro Thanks for the feedback. This RFC is still in an early phase and therefore marked draft.
My plan was to get a bit further in understanding the implications of these items on the implementation and then open a discussion thread for this RFC.
If it is ok for you I would wait with a response until then.
Edit: I think the current proposal has dealt with that concern now.
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? |
RFC proposal for scoped nowarn.
Click here to view the latest version.
For discussions, #786 has been started.