quint
quint copied to clipboard
Misleading error when importing the same module twice with different paths
I just struggled with a problem in a scenario like this:
module A {
import other.* from "./other"
}
module B {
import other.* from "../wrongPath/other"
}
Because I got a QNT405 Module not found
error for the first import, which is actually correct. Since my spec was big and, because of the import error, filled with name resolution errors, I didn't see the actual error on the second import which had a wrong path. So it took me a while to understand what was going on.
I think this is not a corner case at all. What I did was to move my imported file to a different folder, and then only remembered to update the first occurrence of the import statement, forgetting the one way below.
My expectation is that only the path error was reported (QNT013), and no QNT405 appeared at all.