rascal
rascal copied to clipboard
Rascal type-checker crashed unexpectedly with: No module scope found for analysis::diff::TextEditsat: |lib://rascal-core/lang/rascalcore/check/Import.rsc|(9426,2,<234,57>,<234,59>)
Context:
module A
import analysis::diff::TextEdits;
Exception thrown:
|lib://rascal-core/lang/rascalcore/check/Import.rsc|:234,57: "No module scope found for analysis::diff::TextEdits"
Stacktrace:
at getModuleScope(|lib://rascal-core/lang/rascalcore/check/Import.rsc|(9047,384,<225,0>,<235,1>))
at prepareForCompilation(|lib://rascal-core/lang/rascalcore/check/Import.rsc|(10886,38,<263,17>,<263,55>))
at rascalTModelForLocs(|lib://rascal-core/lang/rascalcore/check/Checker.rsc|(16482,77,<385,38>,<385,115>))
at check(|lib://rascal-core/lang/rascalcore/check/Checker.rsc|(22699,64,<545,9>,<545,73>))
at $shell$(|main://$shell$|)
Okay, this message appears when the module doesn't exist. it should have been analysis::diff::edits::TextEdits
@PaulKlint maybe this should not be an exception, but an error reported via the summary? since we know for which import this holds?
This is a long overdue improvement that looks simpler than it actually is. Reason: the natural place to check for a non-existing module is the collect rule for import/extend. However, the modular structure of the Rascal program is analyzed long before those rules are reached. Therefore non-existing modules could create havoc during this analysis. The module existence check is now implemented in that early fase, hopefully making the checker much more robust.
After testing, I will push this fix.