ionide-vscode-fsharp icon indicating copy to clipboard operation
ionide-vscode-fsharp copied to clipboard

Incremental builds disrupted by opening Ionide

Open ntwilson opened this issue 2 years ago • 5 comments

Describe the bug

If I navigate to my project, run dotnet build, and then run dotnet build a second time, the second build is incremental and finishes very quickly. If I run dotnet build, and then code . and wait for Ionide to finish initializing, then run dotnet build a second time, the second build rebuilds all of the projects in my solution. Leaving my VS Code window open makes it so that every build I run rebuilds everything from scratch. I'm still working on a minimal sample reproduction (edit: see comment for reproduction), and will update this issue once I have one. Any ideas where to look or what to try would be appreciated! Of note is that my solution has an auto-generated Entity Framework (C#) project in it. That fills the ionide log with tons and tons of errors as well.

Machine info

  • OS: Windows 10
  • .NET SDK version: 5.0.400
  • Ionide version: reproduced on both 5.7.1 and 5.6.0

ntwilson avatar Sep 01 '21 17:09 ntwilson

Hey @ntwilson :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our OpenCollective and consider backing us.

https://opencollective.com/ionide

PS.: We offer backer support for all backers. Don't forget to add backer label when you start backing us :smile:

It does seem to be related to including or referencing a C# project. I was able to partially reproduce the problem in a minimal 2 project solution: https://github.com/ntwilson/ionide-incr-build-repro though in that solution it only fails the incremental build the first time after opening VS Code/Ionide, and in my original problem, it fails the incremental build every time when VS Code/Ionide is open.

ntwilson avatar Sep 01 '21 18:09 ntwilson

Ah! I've discovered that if I use global.json to downgrade the dotnet sdk version from 5.0.400 to 5.0.303, the problem disappears and incremental builds come back. Is this repo the right place for this issue?

ntwilson avatar Sep 02 '21 14:09 ntwilson

unclear. it's likely that any root fixes would come in via the ionide/proj-info repo (which ionide consumes by way of the fsharp/fsautocomplete project), but there's a large set of changes in that repo that haven't yet been fully integrated into FSAC yet that could very well fix the problem described here, so I'm not really motivated to dig into the specifics of this problem until that work lands.

baronfel avatar Sep 02 '21 14:09 baronfel

Hi @baronfel, can you point me to what changes I should be watching for? I just tested SDK version 6.0.100 and Ionide v 5.9.0, and still see the same problem. Thanks!

ntwilson avatar Nov 10 '21 23:11 ntwilson