Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to defend against changes that break the bootstrap? #972

Closed
PaulKlint opened this issue Jun 22, 2016 · 0 comments
Closed

How to defend against changes that break the bootstrap? #972

PaulKlint opened this issue Jun 22, 2016 · 0 comments

Comments

@PaulKlint
Copy link
Member

PaulKlint commented Jun 22, 2016

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 issue is intended to get an overall picture of breaking changes and how to remedy them.

Scenarios that can break the bootstrap

  • Changing parameters of commands like rascal, rascalc, rascalTests
    Approach: support transition in Bootstrap script
  • Changing name/signature of Kernel functions
    Approach: 1. keep old declaration; 2. add declaration for new version; 3. bootstrap; 4. replace uses of old by new; 5. bootstrap; 6. remove declaration of old version; 7. bootstrap
  • Renaming a RascalPrimitive or MuPrimitive
    Approach: 1. keep old declaration; 2. add new declaration for renamed version; 3. bootstrap; 4. replace in the compiler uses of old name by new name ; 5. bootstrap; 6. remove declaration of old name; 7. bootstrap
  • Changing the signature of a RascalPrimitive or MuPrimitive
    Approach: 1. 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; 2. bootstrap; 3; replace in the compiler uses of old signature by new one; 4. bootstrap; 5. remove support for old signature from the body of the primitive; 6. bootstrap.
  • Adding field to a serialized Java class, e.g. RVMExecutable
    Approach: add optional FlatBuffer field
  • Deleting field from a serialized class
    Approach: make corresponding FlatBuffer field 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: 1. remove all uses of the feature from any Rascal code used for bootstrapping
    (e.g. Kernel, ParserGenerator, ...); 2. bootstrap; 3. remove the implementation of feature to be deleted; 4. bootstrap.

Scenarios that cannot break the bootstrap:

  • 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 or Types
@PaulKlint PaulKlint added this to the Full Bootstrap of Compiled Rascal milestone Jun 22, 2016
@PaulKlint PaulKlint added the note label May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant