dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.88k stars 784 forks source link

Can build solution with dotnet build but not using VS #14975

Open halcwb opened 1 year ago

halcwb commented 1 year ago

Please provide a succinct description of the issue.

Trying to build this solution: http://github.com/halcwb/GenPres2 fails using VS:

image

Somehow, the swensen quotation tests can no longer build??

But when running dotnet build everything runs fine.

Provide the steps required to reproduce the problem:

  1. Clone repro
  2. Use VS to build

Expected behavior

Should build like with dotnet build

Actual behavior

Doesn't build

Known workarounds

Use dotnet build

Microsoft Visual Studio Community 2022 Version 17.5.3 VisualStudio.17.Release/17.5.3+33516.290 Microsoft .NET Framework Version 4.8.09032

Installed Version: Community

ASP.NET and Web Tools 17.5.318.41597 ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.5.318.41597 Azure App Service Tools v3.0.0

C# Tools 4.5.0-6.23128.14+651d32d8017cfcc60fcbd67383601fa9a3deb145 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

ILSpy.AddIn 1.0 Integration of the ILSpy Decompiler into Visual Studio.

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager 6.5.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

TypeScript Tools 17.0.20105.2003 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.5.0-6.23128.14+651d32d8017cfcc60fcbd67383601fa9a3deb145 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.5.0-beta.23053.5+794b7c259d9646a7eb685dad865aa27da7940a21 Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2 AI-assisted development for Visual Studio.

vzarytovskii commented 1 year ago

Works with 6.0.x, doesn't work with 7.0.202, same error as in VS. Parser doesn't like the following anymore for some reason

test<@
                ([|10N|] |> ml) / ([|5N|] |> ml) =? ([|2N|] |> x)
            @>

It expects a whitespace before the <, I believe we mightve broken it when tinkering with changes to <^ when adding support for statics in interfaces and simplifying SRTP syntax.

Immediate fix would be to add whitespace before <, proper fix to parser will need more investigation.