rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Backward compatibility issues after releasing new standard library .tpl files

Open jurgenvinju opened this issue 2 years ago • 2 comments

Describe the bug

  • There are new functions in ParseTree.rsc
  • This leads to a new ParseTree.tpl
  • This was released as rascal-0.32.0
  • Existing libraries like typepal itself have not upgraded their dependencies yet
  • A DSL project would upgrade their dependency to rascal-0.32.0

This happens:

23-06-27 19:50:46,774 [pool-2-thread-7] INFO - Evaluator: Rascal compiler Finishing progress bar: T496f25e235695d884 - Rascal check
2023-06-27 19:50:46,774 [pool-2-thread-7] INFO - Evaluator: Rascal compiler Finished progress bar: T496f25e235695d884 - Rascal check
2023-06-27 19:50:46,775 [pool-2-thread-7] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Internal error during Rascal check
|std:///util/Reflective.rsc|(6596,2,<170,84>,<170,86>): |std:///util/Reflective.rsc|:170,84: "No module name found for |std:///ParseTree.rsc|(0,28853,\<1,0\>,\<789,56\>);\nsrcs=[|file:///d:/swat.engineering/projects/WK/sources/vscode/fx-core/src/main/rascal|];\nlibs=[|lib://rascal|,|lib://rascal-lsp|,|lib://typepal|,|jar+file:///C:/Users/Davy/.m2/repository/org/rascalmpl/rascal-lsp/2.12.1/rascal-lsp-2.12.1.jar!/|,|jar+file:///C:/Users/Davy/.m2/repository/org/rascalmpl/typepal/0.8.0/typepal-0.8.0.jar!/|]"
	at getModuleName(|std:///util/Reflective.rsc|(5247,1354,<136,0>,<171,1>))
	at getModuleName(|lib://rascal-core/lang/rascalcore/check/Import.rsc|(3179,64,<87,11>,<87,75>))
	at complete(|lib://rascal-core/lang/rascalcore/check/Import.rsc|(5757,126,<130,18>,<130,144>))
	at getImportAndExtendGraph(|lib://rascal-core/lang/rascalcore/check/Import.rsc|(6022,154,<135,11>,<135,165>))
	at rascalTModelForLocs(|lib://rascal-core/lang/rascalcore/check/Checker.rsc|(9845,7581,<209,8>,<362,5>))
	at check(|lib://rascal-core/lang/rascalcore/check/Checker.rsc|(21389,97,<464,38>,<464,135>))
	at $shell$(|main://$shell$|)
  • The reason is maybe that this location |std:///ParseTree.rsc|(0,28853,\<1,0\>,\<789,56\>) does not exist anymore in ParseTree.tpl that is now loaded from the standard library of version 0.32.0
  • typepal was never "compiled" against that new version of the library
  • conclusion the.tpl files do not offer a form of binary backward compatibility, even if no interface has truly changed in a breaking way in ParseTree.rsc

I realize this is a complex bug, with probably a complex solution, but let's register the symptoms here so that later we can understand better how to solve them.

jurgenvinju avatar Jun 28 '23 07:06 jurgenvinju

The List module got some attention by upgrading documentation strings:

No module name found for |std:///List.rsc|(0,25080,\<1,0\>,\<1138,1\>);

And thus it is not compatible anymore as well.

jurgenvinju avatar Jun 28 '23 07:06 jurgenvinju

This is another case here usethesource/rascal#1853 ; it's a duplicate

jurgenvinju avatar Aug 22 '23 18:08 jurgenvinju