core icon indicating copy to clipboard operation
core copied to clipboard

No red squiggles are showing up in Visual Studio

Open Jooseppi12 opened this issue 2 years ago • 4 comments

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 avatar Mar 23 '22 10:03 Jooseppi12

@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.

Jand42 avatar Apr 04 '22 08:04 Jand42

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

Jand42 avatar Apr 05 '22 10:04 Jand42

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.

granicz avatar Jul 31 '23 23:07 granicz

(Filed the issue from my last comment above as #1348.)

granicz avatar Aug 07 '23 09:08 granicz