theseion / Fuel

Fuel, the Smalltalk object serializer
https://theseion.github.io/Fuel
MIT License
26 stars 12 forks source link

Update Migration Docs #259

Open seandenigris opened 2 years ago

seandenigris commented 2 years ago

Has this ever been thought of? Is it remotely possible?

I sometimes find myself in a situation where the last fueled out data is in an old format (e.g. v.194), but the code doesn't load in e.g. P7 anymore because dependencies have evolved and no longer support P7. It would be really convenient to load the 194 format side-by-side with current to rescue the data.

As a workaround, how feasible is it to downgrade an image with the current Fuel version to e.g. 194? Is 194 loadable in say P9?

P7 is already listed as deprecated in Launcher.

seandenigris commented 2 years ago

RE the proposed workaround, my initial attempts to load 1.9.4 in P9 failed. First, I tried to load from GH via:

Metacello new
    repository: 'github://theseion/Fuel:1.9.4';
    baseline: 'Fuel';
    onConflict: #useIncoming;
    load.

But it seems that the repo does not seem to go back that far.

Then, I tried from StHub with:

Metacello new
    repository: 'http://smalltalkhub.com/mc/Pharo/Fuel/main';
    configuration: 'Fuel';
    version: '1.9.4';
    onConflict: #useIncoming;
    load.

The first problem was that it didn't recognize P9. Once I added the platform attribute (in two places) I got another error. As an act of desperation, I tried pretending it was P7, but got an error from the different streams API

theseion commented 2 years ago

Yes we've had this discussion before. You're doing the right thing essentially. Here's what I would try:

  1. Load your objects into a P7 image with Fuel 1.9.4
  2. Unload Fuel 1.9.4
  3. Load Fuel 4.0.1 into your P7 image
  4. Serialize your graph with Fuel 4.0.1 from the P7 image
  5. Load your objects into P9 using Fuel 4.0.1
seandenigris commented 2 years ago

Yes we've had this discussion before.

Oops, sorry! :blush:

Maybe we should add some of this to the migration doc. It isn't clear about which versions are loadable from which repos on which Pharo versions, and uses ConfigurationOfFuel, which I assume is obsolete

theseion commented 2 years ago

Good idea.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.

theseion commented 2 years ago

Not stale.