The story we have for forward compatibility is not satisfactory. Here is an example: after my rebase-storage changes, if you use
an old version of darcs in a repo where a new darcs has a rebase in progress you get
darcs: internal error: no suspended patch found
CallStack (from HasCallStack):
error, called at src/Darcs/Patch/Rebase.hs:88:4 in darcs-2.12.5-4JISUlleCRE8Qfdv8JqxSX:Darcs.Patch.Rebase
We can't do anything about old versions, of course, but we can plan ahead and avoid this for all future incompatibilities. We
should have done that years ago but now is better than never.
Here is rough sketch of a design.
The trick is to define /now/ a new file under _darcs where /future/ versions can signify incompatibility, perhaps temporary. The
format of this file should be a list of records, each of which contains:
* a version limit, e.g. "2.16" means all versions strictly smaller than
2.16 are affected
* a list of affected commands (or ALL, like in the defaults file)
* a short description of the problem and what the user can do about it,
possibly accommodated by a web URL for further information
We consult this file (if it exists) on each invocation, filter out the records that affect us by version and command and if there
remain any display them and terminate. Implementing this would be a nice task for a beginner...
|