-
Notifications
You must be signed in to change notification settings - Fork 82
Labels
Description
This issue documents what happens when a user is first presented with an updated Rascal extension, after having worked on a Rascal project that would type check perfectly fine on the previous version of the extension. The example presented in the remainder is a severely reduced case of a real-world situation.
Context:
- In this example, there is a notion of "old extension" and "new extension". This bug is observable with the latest public release of the extension (0.12.2, "old") and a very recent CI build (2630, "new").
- The example project has sole dependency on Rascal (0.40.19, latest public release).
Consider the following modules:
A.rsc:
module A
import IO;
B.rsc:
module B
import A;
import IO;
These modules are obviously perfectly fine, and type checking succeeds using the old extension. In particular, the target folder contains $A.tpl and $B.tpl.
Now, if the same project is opened using the new extension and a trivial whitespace change is performed on module B, the following error is generated.
The exact message is the following
error("Name `IO` is ambiguous",
|file:///<...>/src/main/rascal/B.rsc|(30,2,<4,7>,<4,9>),
causes=[
info("Definition of `IO`", |std:///IO.rsc|(0,28560,<1,0>,<824,50>)),
info("Definition of `IO`", |std:///IO.rsc|(0,25567,<1,0>,<759,85>))
])
Observations:
- The size of A's
tplfile remains the same, whereas the size of B'stplis more than doubled. - The version of Rascal the project depends on is not critical: this also occurs for other versions of Rascal.
- This error is generated here.
- A's
tplfile hastm.logical2physical[|rascal+module:///IO|] == |std:///IO.rsc|(0,25567,<1,0>,<759,85>). - B's
tplfile hastm.logical2physical[|rascal+module:///IO|] == |std:///IO.rsc|(0,28560,<1,0>,<824,50>). - The error disappears after a
mvn clean, of forced recompilation ofAfollowed byB.