-
Notifications
You must be signed in to change notification settings - Fork 803
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 ParsedHashDirectives to take non string arguments #17206
Conversation
❗ Release notes required
Warning No PR link found in some release notes, please consider adding it.
|
fde5c2d
to
e32f4a9
Compare
did you (also) mean #17240? It is mentioned in the Considering this is a language change now (if I understand it correctly |
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 really like this change, just a few questions:
(Warning 203, Line 3, Col 1, Line 3, Col 11, "Invalid warning number 'FS'") | ||
(Warning 203, Line 6, Col 1, Line 6, Col 13, "Invalid warning number 'FS'") |
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.
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.
Deleted the original because I was spouting garbage.
replaced with:
Okay, I looked a bit harder, it is as you would suspect "by design"; back in the olden days, I.e pre-dotnet SDK "ACME" would have originally failed, however, because in the dotnet SDK different build targets use
<NoWarn></NoWarn>
for disabling warnings
For example:
- C# uses CS, F# uses FS, Nuget uses NU.
Probably it would have been smarter to filter that out in the build target, but we missed that opportunity, so now a valid nowarn value is:
FSn or n - where n is any valid 32bit decimal integer or XXXX
And any other value is ignored, because it could be targeted at a different build target.
Considering the long ident change, does this mean EDIT: checking your referenced issues, the answer is: yes 👍. I've tried to capture all these changes here: fsharp/fslang-suggestions#1368. |
Sigh!!!!, I didn't intend for that to work. |
@abelbraaksma huge thanks for taking care of the fslang suggestion, I miss having an active PM to keep me on the true path of righteousness. |
You're too kind!!! Are you offering me job? 😆jk. But seriously, no worries, I'm happy to help :).
Not entirely. It could just be that simple paths that are in scope are allowed without quotes, anything else needs quotes. Just like you don't need quotes on the commandline, unless you have spaces in the file names. But we can decide that in the lang suggestion, of course. Another way for this change is that you keep the information after you parse it. That way, it is not that all hash directives can now understand all kinds of arguments. That way, you can pick and choose per directive. |
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.
Some suggestions, nits below:
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.
Marking this as waiting for RFC then. Otherwise LGTM :)
Now with #17140 merged. Looking forward to have this in 👍🏻 |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Nitpick: this should have had some tests in https://github.com/dotnet/fsharp/tree/main/tests/service/data/SyntaxTree/ParsedHashDirective |
@KevinRansom
I am not sure if I am overlooking something, I am therefore reaching out for advice. When I touch the function anyway, should I consider 1 or 2 above? |
Requires fslang approval : fsharp/fslang-suggestions#1368
Fixes: #17209 , #17240