-
Notifications
You must be signed in to change notification settings - Fork 790
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
Allow #nowarn to support the FS prefix on error codes to disable warnings #17209
Comments
This is a related issue, but about the commandline, which, coincidentally, you fixed ;): #3631 Should this be part of the larger issue with In particular, see this comment, where the suggestion is to allow integers, instead of strings (which I've seen suggested before, btw): fsharp/fslang-suggestions#278 (comment) I've been wanting to tackle this, esp since I've use cases for the warn-on/off scenario, and the |
@abelbraaksma this wasn't really intended to be a rework of the error/warning systems, it was mainly intended to allow ParsedHashDirectives to support argument types other than strings. The motivation for that is to perhaps add functionality similar to:
Conveniently it allows #nowarn to easily take int args and fsargs which gives me a concrete use case. And allows us to make the #nowarn and command line arguments consistent too. As well as
|
I understand, thanks for explaining. I felt this is as good as any an opportunity to formalize this part of the syntax, using your PR as a guide (there's nothing prescriptive in the spec about it). I tried to capture this and the other ideas in the lang suggestion here: fsharp/fslang-suggestions#1368 |
Execute the code in fsi:
And observe the warning:
As a keen developer you will observe the error ID FS3221 and say I know
#nowarn "FS3221"
will fix this right smartly.If you subject this smart idea to reality by executing code similar to:
Reality will reward you with this - quite surprising - error message:
After some time reading around you might decide to try:
Which will do what you originally wanted.
Let's make FS# work correctly, you know it makes sense.
The text was updated successfully, but these errors were encountered: