-
Notifications
You must be signed in to change notification settings - Fork 833
Let TransparentCompiler respect hash directives like #nowarn #16667
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
… handle HashDirectives in files correctly
|
|
If we can fix it like this then why not! But some diagnostics refactoring might be needed eventually. We're already processing them with this config applied in fsharp/src/Compiler/Service/TransparentCompiler.fs Lines 1128 to 1134 in 93b8f0c
Maybe it's possible to somehow make use of that. |
|
Maybe this code could work in the |
…cs without a specific location
|
The last push is just to correct the first approach taken. |
Thanks for the pointer. I think we are good now. |
|
Huh, looks like it was close 😀
That would make sense if we need some prior state for the processing. But probably we're fine at this stage just with proper filtering and formatting can still happen at the end when we're creating the result. |
Oh yeah, just a little shake and shuffle was needed :) |
|
Mmh, some expected |
|
The tests are now in |
…yScopedPragmas was wrong
Description
This fixes the issue shown in this PR
As @0101 said, we need
FSharpDiagnosticOptionsdepending on theParsedInputof a file. But we loose that pretty deep in the call stack. Instead of changing returns all over the place, this PR makes use of the cachedFSharpParsedFileto fix this.I hope this is an acceptable tradeoff to move the TransparentCompiler forward.
(I don't think this needs release notes)
Checklist
Test cases added
Performance benchmarks added in case of performance changes
Release notes entry updated: