zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.22k stars 3.09k forks source link

Error stuck when working with monorepo #19387

Open aevsai opened 1 month ago

aevsai commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Hi, I have encountered with annoying issue that fixed error remains highlighted. I am using pnpm and turborepo for workspace management. I have local packages that is being rebuilt on changes and app that uses them.

How to reproduce error:

  1. open zed
  2. run turborepo with app that depends on a local package build
  3. use something from the local package and you would get error as it not imported Screenshot 2024-10-17 at 20 28 12
  4. import the required item from the package, but you get another error saying it is not exported Screenshot 2024-10-17 at 20 06 22
  5. add the export in the package. since the package’s code has changed, turborepo will rebuild it
  6. return to you file. the import error is resolved and is no longer highlighted in import line, but the line where imported element being used still highlighted Screenshot 2024-10-17 at 20 28 50
  7. close and reopen zed, line is not highlighted anymore Screenshot 2024-10-17 at 20 31 32

And one more fact: if element was exported before zed was open, everything works just fine

Environment

Zed: v0.157.5 (Zed) OS: macOS 14.6.1 Memory: 18 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


zed-2.log zed.log

aevsai commented 2 weeks ago

btw helps reloading language server with shift+cmd+p -> restart language server