core
core copied to clipboard
No red squiggles are showing up in Visual Studio
Starting from any of the templates, adding the following to the code:
[<Inline "(5 +">]
let testError = X<unit>
yields an error (as the inline JS is not valid), but in VS there are no red squiggles showing.
@Jooseppi12 See #1161. Squiggles do show up for a moment, but VS overrides errors from build quickly from those coming from normal F# code service. Maybe error subcategory can help, I have tried "compile" but not successfully.
After more investigation and experimenting, I don't think we can do this is current Visual Studio. IntelliSense errors always seem to hide build errors. This needs standardized F# analyzers to implement properly. See RFC https://github.com/fsharp/fslang-design/blob/main/tooling/FST-1033-analyzers.md
To add to the issue, if you recompile (in VS or via dotnet build) after failing with the inline error, the code happily compiles:
1>Target CoreCompile:
1> Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
Compiling with dotnet ws build keeps getting the error about the inline, correctly.
(Filed the issue from my last comment above as #1348.)