ionide / proj-info

Parse and evaluate MsBuild project files
MIT License
64 stars 37 forks source link

Get more logs out of msbuild #189

Closed TheAngryByrd closed 1 year ago

TheAngryByrd commented 1 year ago

WHAT

πŸ€– Generated by Copilot at 9274475

This pull request introduces a new logger for MSBuild events using LogProvider and enhances the error reporting with more detailed messages. It affects the Library.fs file in the Ionide.ProjInfo project.

πŸ€– Generated by Copilot at 9274475

Sing, O Muse, of the skillful coder who devised A new logger, using the LogProvider library, To capture the events of MSBuild, the mighty tool That shapes the projects of mortals with its power.

πŸ“πŸ› οΈπŸš€

WHY

We were missing log output failure reasons on the Graph path. Additionally we can now log more output. This should help narrow down why project loads fail for people.

Log output
[18:44:19.266 INF] [Ionide.ProjInfo.WorkspaceLoaderViaProjectGraph] Started loading projects 18 ["c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\src\\Compiler\\FSharp.Compiler.Service.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\src\\fsc\\fscProject\\fsc.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\src\\FSharp.Core\\FSharp.Core.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\src\\FSharp.DependencyManager.Nuget\\FSharp.DependencyManager.Nuget.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\benchmarks\\FCSBenchmarks\\BenchmarkComparison\\HistoricalBenchmark.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\src\\fsi\\fsiProject\\fsi.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\benchmarks\\FCSBenchmarks\\CompilerServiceBenchmarks\\FSharp.Compiler.Benchmarks.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\src\\FSharp.Compiler.Interactive.Settings\\FSharp.Compiler.Interactive.Settings.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\buildtools\\fsyacc\\fsyacc.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\buildtools\\AssemblyCheck\\AssemblyCheck.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\benchmarks\\FCSBenchmarks\\BenchmarkComparison\\HistoricalBenchmark.Runner\\HistoricalBenchmark.Runner.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\buildtools\\fslex\\fslex.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\FSharp.Compiler.ComponentTests\\FSharp.Compiler.ComponentTests.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\service\\data\\CSharp_Analysis\\CSharp_Analysis.csproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\src\\FSharp.Build\\FSharp.Build.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\FSharp.Compiler.Service.Tests\\FSharp.Compiler.Service.Tests.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\FSharp.Test.Utilities\\FSharp.Test.Utilities.fsproj", "c:\\Users\\jimmy\\Repositories\\public\\TheAngryByrd\\fsharp\\tests\\service\\data\\TestTP\\TestTP.fsproj"]
[18:44:19.292 INF] [MsBuild] Build started.
[18:44:19.303 DBG] [MsBuild] Static graph loaded in 0.544 seconds: 26 nodes, 50 edges
[18:44:19.461 DBG] [MsBuild] net session >nul 2>&1
[18:44:19.504 ERR] [MsBuild] The specified task executable location "C:\Program Files\dotnet\sdk\7.0.202\FSharp\fsc.exe" is invalid.
[18:44:20.890 DBG] [MsBuild] net session >nul 2>&1
[18:44:20.897 ERR] [MsBuild] The specified task executable location "C:\Program Files\dotnet\sdk\7.0.202\FSharp\fsc.exe" is invalid.
[18:44:21.497 DBG] [MsBuild] net session >nul 2>&1
[18:44:21.498 ERR] [MsBuild] The specified task executable location "C:\Program Files\dotnet\sdk\7.0.202\FSharp\fsc.exe" is invalid.

HOW

πŸ€– Generated by Copilot at 9274475