-
Notifications
You must be signed in to change notification settings - Fork 549
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
Project loading should happen asynchronously #6128
Comments
@mkaput this is no longer the case, no? We just try to init unmanaged corelib in case metadata fails now |
This is more about recovering from breakage when metadata did succeed already. Take a following scenario as an example:
I don't want to lose all the analysis information due to this problem because it is easily recoverable: if we know something about the code already, and this information is reliable, let's persist that information instead of wiping it. Mind that with |
Primarily, calling
scarb metadata
should be an asynchronous process that does not block project model updates like it does currently.Requirements
detect_crates_for
method and replace it with a proper abstraction. See the description for old issue New Project Model MVP #6124 for more clues.Implement this in such a way, that when doing Rewrite fromtower-lsp
tolsp-server
#6132 we won't have to change a lot here. Primarily, this means that this system should escape async world as early as possible. Usespawn_blocking
like we attempt to do inwith_db
method.scarb metadata
,cairo_project.toml
parsing) if another instance is already running (but if one is running: always schedule at most 1 extra run to pick any changes that could happen while the previous run was running). DISCLAIMER: it wasn't done as it wouldn't result in any meaningful benefit after LS: Get rid of needlessscarb metadata
calls #6689scarb metadata
fail) shouldn't cause wiping of all analysis state. Check out what RA does here. DISCLAIMER: this is already done in the old project model, just make sure it works with a new oneHandle detached files well (i.e. one without matchingstarkware-libs/cairols-issues#16Scarb.toml
/cairo_project.toml
well).The text was updated successfully, but these errors were encountered: