ionide / FsAutoComplete

F# language server using Language Server Protocol
Other
391 stars 151 forks source link

Handle Project Reloads when adding files to wildcard patterns #1155

Open TheAngryByrd opened 10 months ago

TheAngryByrd commented 10 months ago

We should add logic to handle Wildcarded files in fsproj files such as:

<Compile Include="CodeFixes/*.fsi" />
<Compile Include="CodeFixes/*.fs" />

In Adaptive, the additional dependencies is where it makes sense to watch for these files. We probably only want to do it upon Add or Delete but not modify.

Current workarounds:

TheAngryByrd commented 10 months ago

Some initial investigation:

MsBuild expands out wildcarded Compile nodes on the parsing step. I could use an XPath to get these nodes but it won't for things that have variables like <Compile Include="$(RootPath)/Codefixes/*.fs" /> I'm not sure how to get MsBuild to return some partially applied path without expanding the wildcard and replacing variables without doing a lot of manual work.