darcs

Issue 2600 task: improve forward compatibility

Title task: improve forward compatibility
Priority feature Status needs-implementation
Milestone Resolved in
Superseder Nosy List bfrk
Assigned To
Topics

Created on 2018-09-21.06:44:28 by bfrk, last changed 2018-09-22.17:30:36 by bfrk.

Messages
msg20317 (view) Author: bfrk Date: 2018-09-21.06:44:26
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...
msg20322 (view) Author: bfrk Date: 2018-09-22.17:30:34
I have taken a closer look at the code in Darcs.Repository.Format and 
it looks as if it can be used for this purpose. Perhaps the hint about 
where to look for solutions can be incorporated there.
History
Date User Action Args
2018-09-21 06:44:28bfrkcreate
2018-09-22 17:30:36bfrksetmessages: + msg20322