FsAutoComplete icon indicating copy to clipboard operation
FsAutoComplete copied to clipboard

Use msbuild evaluation to drive some views (like Solution Explorer)

Open TheAngryByrd opened this issue 2 years ago • 2 comments

While discussing an issue on FSharp.Formatting. @baronfel brought up

the act of loading the project file is evaluation, and after evaluation you have access to all properties that are statically-known (including those delivered by SDKs)

Currently in AdaptiveLSPServer, we do a full reload on changes to the project files, so say changing file order in ionide, This would require a reload for the view to refresh. For smaller projects this may not be noticeable but for for larger projects it feels laggy. Perhaps we could drive some of these views from an "evaluated" project file. References might disappear or maybe we can have some type of delta/merge logics so it doesn't look laggy.

TheAngryByrd avatar Mar 01 '23 14:03 TheAngryByrd

Example of slow moving file: Moving-file-slow

TheAngryByrd avatar Mar 06 '23 00:03 TheAngryByrd

Here's a model of the interactions here to discuss tomorrow:

sequenceDiagram
    actor User
    participant Ionide
    participant FSAC
    participant ProjectSystem
    participant MSBuild
    
    User->>Ionide: Add file to project
    Ionide->>FSAC: fsproj/addFile
    FSAC->>FSAC: modifies project file directly
    ProjectSystem->>MSBuild: evaluate project file with changes
    MSBuild->>ProjectSystem: send MSBuild evaluation results
    ProjectSystem->>FSAC: send updated project information
    FSAC->>Ionide: send 'project loaded' notification
    Ionide->>Ionide: update solution explorer with new project file list

baronfel avatar Mar 09 '23 20:03 baronfel