Skip to content

Incremental type-check on module using Typepal fails on second check #2711

@toinehartman

Description

@toinehartman

Describe the bug

When type-checking a type-checker written with Typepal, for example https://github.com/SWAT-engineering/bird/blob/main/bird-core/src/main/rascal/lang/bird/Checker.rsc, errors are produces on the second check (but not the first).

To Reproduce

Steps to reproduce the behavior:

test bool changeMultipleTimes() {
    loc projDir = resolveLocation(|home:///swat/projects/bird/bird-core|); // <-- location of you Bird repo
    loc checkerModule = projDir + "src" + "main" + "rascal" + "lang" + "bird" + "Checker.rsc";
    PathConfig pcfg = getProjectPathConfig(projDir);

    iprintln(pcfg);

    // Clean
    remove(pcfg.bin);

    // First check
    if (!checkModuleOK(checkerModule, pathConfig = pcfg)) { // <-- all OK
        throw "First check failed; supposed to be OK.";
    }

    // Modify
    touch(checkerModule);

    // Second check
    if (!checkModuleOK(checkerModule, pathConfig = pcfg)) { // <-- fails
        println("Second check failed");
        return false;
    }

    return true;
}

Expected behavior
Since I believe the moduel to be type-correct, both checks should succeed. If not, the first check should already fail.

Desktop (please complete the following information):

  • Context: Everywhere
  • Rascal Version: 3e0ccc6 (0.42.2-SNAPSHOT)

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions