Uh oh!
There was an error while loading. Please reload this page.
Let TransparentCompiler respect hash directives like #nowarn - #16667
Conversation
… handle HashDirectives in files correctly
|
Uh oh!
There was an error while loading. Please reload this page.
0101
commented
Feb 7, 2024
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. |
majocha
commented
Feb 7, 2024
Maybe this code could work in the |
…cs without a specific location
dawedawe
commented
Feb 8, 2024
The last push is just to correct the first approach taken. |
dawedawe
commented
Feb 8, 2024
Thanks for the pointer. I think we are good now. |
0101
commented
Feb 8, 2024
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 :) |
0101
commented
Feb 8, 2024
dawedawe
commented
Feb 8, 2024
Mmh, some expected |
0101
commented
Feb 9, 2024
The tests are now in |
Uh oh!
There was an error while loading. Please reload this page.
…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: