usethesource / rascal-tutor

Markdown and Rascal processor that generates linked, up-to-date and checked documentation
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Can't run the tutor on itself via the rascal-maven-plugin anymore #22

Open jurgenvinju opened 1 year ago

jurgenvinju commented 1 year ago
[ERROR] Failed to execute goal org.rascalmpl:rascal-maven-plugin:0.18.1:tutor (default-cli) on project rascal-tutor: Execution default-cli of goal org.rascalmpl:rascal-maven-plugin:0.18.1:tutor failed: Could not import module lang::rascal::tutor::Compiler: can not find in search path
[ERROR] Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/ModuleImport|

This is due to the following:

[INFO] rascal module path addition: |lib://rascal-tutor|

Here because |project://rascal-tutor| is also defined, the current source code in the target folder is superseding the library linked in the rascal-maven-plugin. So we have two bootstrap-levels mixed and since the source files haven't been packaged into the target folder yet, we are also not accidentally running our own code on our own code.

This is currently blocking a release of a newer tutor with better documentation of itself, and better error handling.

jurgenvinju commented 1 year ago

https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ModuleLayer.html

If we use that in the implementation of the maven plugin, those layers could clearly separate the runtime of the Compiler from the source code of the Compiler.

JJWTimmer commented 10 months ago

Does not sound as if it's fixed. I see the reference to the issue in the tutor pom.xml with a block of commented out code.

jurgenvinju commented 10 months ago

It comes back Everytime we change something in the standard library. Until we do true modules, the class path can always be polluted with a too new version.