You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 imports bar.ncl which in turn imports baz.ncl, and modifying baz.ncl triggers some semi-random diagnostics in foo.ncl
The gif doesn't show it, but all the errors in foo.ncl are
import of /tmp/tmp.MTYXidOIhu/bar.ncl failed: This import could not be resolved because its content has failed to typecheck correctly.
These 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 on bar.ncl.
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.
The text was updated successfully, but these errors were encountered: