Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Lazy Load Projects #1191

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

purkhusid
Copy link

@purkhusid purkhusid commented Nov 3, 2023

WHAT

🤖 Generated by Copilot at aeb6c8c

This pull request enhances the workspacePeek command and its response types to provide more information about F# projects in the workspace. It also improves the integration of the Ionide.ProjInfo.WorkspacePeek library with the Workspace module and the AdaptiveFSharpLspServer type.

🤖 Generated by Copilot at aeb6c8c

To peek at the projects in F#
We use FsprojPeek to fetch
The compile items and paths
From the workspacePeek graphs
And handle them in AdaptiveFSharpLspServer's catch

📂🛠️🧹

WHY

This is WIP of trying to lazy load projects. See: ionide/ionide-vscode-fsharp#1957

HOW

🤖 Generated by Copilot at aeb6c8c

  • Add a new record type FsprojPeek to represent a project file with its path and compile items (link, link)
  • Use the FsprojPeek type instead of a string list for the Fsprojs field of the WorkspacePeekFoundDirectory type, which represents a directory with F# projects (link, link)
  • Map the fsprojs list returned by the Ionide.ProjInfo.WorkspacePeek function to the FsprojPeek type using the Path and CompileItems fields in the CommandResponse and LspHelpers modules, which handle the workspacePeek command and request (link, link)
  • Extract the Path field from the FsprojPeek type when returning or matching on the list of projects from a WorkspacePeekFoundDirectory value in the LspHelpers and AdaptiveFSharpLspServer modules, which use the workspacePeek command and request to get the list of project paths from the current workspace (link, link)

@baronfel
Copy link
Contributor

It's a very interesting idea - the primary question I have is how this impacts things like background compilation and error reporting. Ideally, if you change something in project A, projects that depend on A will re-check - this requires them to be loaded in the workspace. I worry that a single-project load wouldn't capture these dependencies. I think we could find a sweet spot, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants