-
Notifications
You must be signed in to change notification settings - Fork 82
How to Avoid Breaking the Rascal Bootstrap
We are currently at the brink of switching to a development cycle where we critically depend on previously compiled code (e.g. Kernel, ParserGenerator). This page is intended to get an overall picture of breaking changes and how to remedy them.
Please:
- Add missing scenarios
- Correct scenarios
- Add validation per scenario (how has this scenario been tested?)
- Changing parameters of commandline tools
rascalc,rascalTests,compileMuLibraryValidated
Since the Bootstrap script depends on these parameters, and it calls both the previous versions from the jar and the new versions in the bin folder, the commandline parameters must never change without an intermediate step.
Workaround:
- Support transition in Bootstrap script by case distinction of phase 1 and phase 2 (to use old parameters) and phase 3 and phase 4 to use the new parameters.
- Bootstrap and release
- Change Bootstrap script to remove case distinctions
- Bootstrap and release
-
Changing Rascal functions other than Kernel functions
-
Changing Java code that is unrelated to serialization
-
Adding a Rascal language feature (e.g. coroutines) Note: any changes to the existing implementation should be handled according to the above approaches.
-
Changing IValue or Type internally, i.e. no API changes
-
Adding new
IValues orTypes
-
Changing name/signature of Kernel functions
Approach:
- First follow below working bootstrap: "Add new kernel function"
- Release a stable version
- Then follow below working bootstrap: "Remove unused kernel function"
-
Renaming a RascalPrimitive or MuPrimitive.
Approach:
- Keep old declaration (? why is this necessary)
- Add new declaration for renamed version.
- Bootstrap.
- Replace in the compiler uses of old name by new name.
- Bootstrap.
- Remove declaration of old name.
- Bootstrap.
-
Changing the signature of a RascalPrimitive or MuPrimitive
Approach:
- Add a test in the body of the primitive whether dealing with the old or the new signature, keep the implementation of the old signature and add the implementation for the new signature.
- Bootstrap.
- Replace in the compiler uses of old signature by new one.
- Bootstrap.
- Remove support for old signature from the body of the primitive.
- Bootstrap.
-
Adding field to a serialized Java class, e.g. RVMExecutable
Approach: add optional field to the schema of the serialization file format
-
Deleting field from a serialized class
Approach: make corresponding field in schema of the serialization file format deprecated
-
Changing a constructor in the RVM datatype
Approach: add new version and make old version deprecated
-
Switching to automatic compression:
|compressed+file:///.../Fac.rvm.ser.gz|to|file:///.../Fac.rvm.ser.gz|Approach: unclear
-
Switching serialization format BinaryReader+FST => FlatBuffers Approach: this looks like a huge event; no clear solution
-
Moving the compiler sources to another location
Approach: this looks like a huge event; no clear solution
-
Deleting a Rascal language feature (e.g. annotations)
Approach:
- Remove all uses of the feature from any Rascal code used for bootstrapping
(e.g.
Kernel,ParserGenerator, ...). - Bootstrap.
- Remove the implementation of feature to be deleted.
- Bootstrap.
- Remove all uses of the feature from any Rascal code used for bootstrapping
(e.g.