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

Make scarb-based projects' loading based on scarb workspaces #6676

Open
piotmag769 opened this issue Nov 18, 2024 · 0 comments · May be fixed by #6689
Open

Make scarb-based projects' loading based on scarb workspaces #6676

piotmag769 opened this issue Nov 18, 2024 · 0 comments · May be fixed by #6689
Assignees
Labels
ide This issue refers to CairoLS or editor extensions

Comments

@piotmag769
Copy link
Collaborator

Disclaimer: this mainly concerns Scarb-based projects, as loading cairo_project.toml-based project is cheap.

Problem: currently, we load project model on every didOpen cairo file notification, even when the file that was opened was in a Scarb workspace we already loaded into our project model. This makes us call scarb metadata more than needed, which is hightly inefficient.

Solution: keep track of workspaces we loaded into our project model. If a config file corresponding to the file that was opened is Scarb.toml and it belongs to a known workspace, then don't reload the project model.

Concern about detached files: this logic will reinforce ignoring detached files on the server side.

@piotmag769 piotmag769 added the ide This issue refers to CairoLS or editor extensions label Nov 18, 2024
@piotmag769 piotmag769 moved this to Todo in CairoLS Nov 18, 2024
@piotmag769 piotmag769 self-assigned this Nov 18, 2024
@piotmag769 piotmag769 added this to the LS: New Project Model milestone Nov 18, 2024
@piotmag769 piotmag769 linked a pull request Nov 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide This issue refers to CairoLS or editor extensions
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant