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

LS does not handle build directory being deleted while it is running #3954

Open
GearsDatapacks opened this issue Dec 4, 2024 · 1 comment
Labels
bug Something isn't working help wanted Contributions encouraged priority:medium

Comments

@GearsDatapacks
Copy link
Member

Steps to reproduce:

  • Create a new gleam project, and open it with a code editor (I have tested in vscode and zed)
  • Open the app_name.gleam file. The LSP works normally
  • Run gleam clean in that project
  • Save the file in the editor.

The LSP then reports an error:

An error occurred while trying to read this file:

    project/build/packages/gleam_stdlib/gleam.toml

The error message from the file IO library was:

    No such file or directory (os error 2)

This seems to be because it doesn't properly fetch the source files for dependency packages when saving, even if they don't exist. Running gleam check|build|run, or restarting the language server fixes this.

@GearsDatapacks GearsDatapacks added the bug Something isn't working label Dec 4, 2024
@lpil
Copy link
Member

lpil commented Dec 5, 2024

Thank you

@lpil lpil changed the title LSP fails to read file LS does not handle build directory being deleted while it is running Dec 5, 2024
@lpil lpil added help wanted Contributions encouraged priority:medium labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Contributions encouraged priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants