Hi All,
Now that we have image-side access modifier support for everything under the sun, I have created a
n ugly script, which can
trick Memory Hole into saving the source code with access modifiers of my choosing (I can publish that script in some way if you like).
I've done it this way, because I want to re-use the Newspeak parser (which is in the image), but I cannot directly change
access modifiers in the live image*.
Now that I can migrate access modifiers of the Newspeak source, I am not sure on how to proceed. This are the steps that
I plan to do:
- change every access modifier to private
- make changes to the VM to output warnings on every access violation
- run the image (run tests, browse code, ...) to generate lots of warnings
- parse the warnings and upgrade access modifiers where violations occur
- continue with 3. until there are no more access violations
- change the VM to give a MNU instead of a warning for access violations
How should I contribute my changes to the Newspeak sources?
a) Shall I make a pull request for step 1 and later add pull requests containing the modifier upgrades (step 5)?
b) Shall I make a single big pull request with all changes after step 5?
The problem is that I expect time to pass between step 1 and step 5. For variant a) every change to the Newspeak source
needs to keep in mind that access modifiers must be private. For b) I have to restart the migration process for every
change in the Newspeak repositories (so that I don't miss them, and to avoid merge conflicts).
a) might be cumbersome for everybody (but me); b) is cumbersome for me :)
Which way do you prefer or do you have other ideas on how to proceed?
--
Philipp
*) I cannot directly change access modifiers in the live image, because some classes are more special than others and
cannot be recompiled. For example, if I change an access modifier (or add a slot) in the Kernel class, my images stops
working, because it does not initialize the Kernel class slots (e.g. the Dictionary slot is nil).