Open thufschmitt opened 5 months ago
I think #1944 makes this deterministic, but I think the behavior can still be improved. Some (but not all) errors in the imported file trigger an error in the file that imports them, so now it's quite easy to make an error in bar.ncl
show up by fiddling with baz.ncl
, but it's pretty hard to make an error in foo.ncl
show up...
Describe the bug
Modifying a file that is a transitive import of another one leads to some weird typecheck-related diagnostics from the parent one.
The gif below illustrates that:
foo.ncl
importsbar.ncl
which in turn importsbaz.ncl
, and modifyingbaz.ncl
triggers some semi-random diagnostics infoo.ncl
The gif doesn't show it, but all the errors in
foo.ncl
areThese errors seem to be very state-dependant. Sometimes an invalid file will trigger them, sometimes not. And sometimes a valid file will trigger them. They are also only triggered on
foo.ncl
, never onbar.ncl
.To Reproduce
baz.ncl
Expected behavior
One of
bar.ncl
orfoo.ncl
bar.ncl
shows an error, andfoo.ncl
too (but something else than a typechecking error)Environment
Additional context Add any other context about the problem here.