Improve error handling during package installation#80
Open
realfakenerd wants to merge 2 commits into
Open
Conversation
ghostdevv
requested changes
Jun 10, 2026
ghostdevv
left a comment
Collaborator
There was a problem hiding this comment.
hey, thanks for the PR! I'm curious what the motivation is? did this solve/help debug a tangible issue for you?
Contributor
Author
|
Hey man @ghostdevv! sorry for the delay, lot of things happening at the same time in my life. Well it was more of a preventive measure, while looking at the installation logic i noticed it was a bit optimistic and could fail silently. I wanted to make the process more robust. I am still learning rust and collaborating on github, so if i made something wrong, tell me :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR enhances the
install_package_if_neededlogic insrc/svelte.rsto make the LSP installation process more robust and resilient to network or permission failures.Previously, the installation logic was overly optimistic, potentially failing silently and leading to downstream crashes when trying to spawn the language server from a non-existent or corrupted directory.
Changes
matchstatement onzed::npm_install_package. If the installation fails and no cached version is available, it now returns a descriptive critical error.fs::metadatato verify that thepackage_pathdirectory actually exists on disk before marking the package as successfully installed.