ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
852 stars 277 forks source link

Incremental builds disrupted by opening Ionide #1572

Open ntwilson opened 2 years ago

ntwilson commented 2 years ago

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

open-collective-bot[bot] commented 2 years ago

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:

ntwilson commented 2 years ago

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 commented 2 years ago

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?

baronfel commented 2 years ago

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.

ntwilson commented 2 years ago

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!