This repository contains Java code that is generated from Rascal modules.
It is incorporated in the Rascal repository as a Git submodule.
The Rascal project provides a command-line tool to perform code generation.
For reproducibility, this tool should be called from a released version of Rascal (i.e., using a released Rascal Jar, for instance obtained from a local .m2 repository, or from the release server).
To update the generated code, execute the following steps.
- Navigate to the root of the
rascalrepository and run the compiler (e.g.,java -cp ~/.m2/repository/org/rascalmpl/rascal/0.43.3/rascal-0.43.3.jar org.rascalmpl.shell.RascalGenerateSources). Please make sure that the repository is "clean" before generation. - Navigate into the
generateddirectory, commit the changes and push them to the remote repository. Please include the (Rascal) commit hash in the commit message. Note that the changes are pushed to therascal-generated-javarepository, not to therascalrepository itself. - Navigate back to the
rascalrepository root. Agit diffwill now flag that thegenerateddirectory has upstream changes (one entry indicatingmodified: generated (new commits)). To use the newly generated code in the Rascal project, rungit add generatedto update the submodule's commit pointer and open a PR on therascalproject.