Show an error when a dependency of the current file has an error #4409
llakala
started this conversation in
Ideas & suggestions
Replies: 2 comments 2 replies
-
This is a fantastic idea! Love it. I think we should only show it for files that are currently open, to avoid lots of noise. If possible only in currently visible files, but I don't know if LSP can do that. Where would we put the diagnostic? I wanted to say we could put it on the module that starts the import chain to the one that has the error, but there may not always be one. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Lovely idea, this thing catches me quite frequently :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If you're currently editing a file, and a module you're importing has an error, the current file won't show any errors - it'll look like the file is totally fine, even if it's obviously not. This is because the file can't compile, as a dependency couldn't compile.
In my imagined fix, the current file would show an error on the import (or on every line of the file -- implementation detail), saying "This file can't compile and show errors, as the dependency
dependency_name
has errors. Fix those errors first so this file can compile!" Maybe even a code action to open that other file - but that's just a bonus.Beta Was this translation helpful? Give feedback.
All reactions