opral / inlang-sdk

0 stars 0 forks source link

`lix.rollback()` #168

Closed samuelstroschein closed 2 months ago

samuelstroschein commented 2 months ago

Context

Fink simulates a rollback by manually applying the snapshot of an old change.

CleanShot 2024-09-05 at 10.58.31@2x.png

Proposal

Offer an official rollback API that:

  1. Creates a new change from the old one
  2. Calls plugin.applyChanges(change)
NiklasBuchfink commented 2 months ago

As we already discovered, there are two kinds of rollbacks:

  1. Re-apply one change (e.g. previous variant)
  2. Rollback to an old state of the project (history entry). Probably users also want to check out the old state, look into it and then rollback to it
samuelstroschein commented 2 months ago

Yes. I had 2 in mind where you can delete "newer" history. this is a nice to have feature and not crucial for lix 0.1. Thus, i will close this issue to not block the release of lix 0.1 .Apps can easily re-apply a previous change already