[darcs-devel] darcs-3 compatibility [was: Again: conversion to darcs-3]

Ian Lynagh igloo at earth.li
Sat Feb 20 12:39:05 UTC 2021


On Sat, Feb 20, 2021 at 10:24:05AM +0100, Ben Franksen wrote:
> Talking about our new approach to conversion made me consider the
> following question, which I'd like us to discuss separately:
> 
> Is it really necessary for darcs-3 to be able to handle repos in the old
> formats transparently, other than read-only? Could we perhaps even limit
> support to conversion-only? We could promise to maintain a darcs-2
> branch for the years to come, with no new features but the occasional
> bugfix and compiler/library compatibility release.
> 
> Pro: This would allow us to clean up a lot of the baggage that darcs has
> accumulated over the years, making it (probably a lot) easier to add new
> features.
> 
> Con: OS distributions are often conservative and limited by their
> tooling. Such a "hard" fork could mean that darcs-3 is offered as a
> distro package under a new name for the package and for the program,
> such that users may have to refer to the new version as "darcs3" or some
> such. Think python2 vs. python3. On systems based on the debian package
> format this could perhaps be mitigated using the "alternatives"
> mechanism, but this means more effort for package maintainers. I have
> very limited experience with other OSs / package managers.

I think you could get most of the benefit with little cost by having 2
libraries darcs2 and darcs3 that deal with the respective formats, and
have darcs itself link with both and just do the commandline parsing and
the "what repo am I in".

Then doing "darcs pull", say, when the current directory contains a
darcs2 repo calls the pull function in darcs2, and in a darcs3 repo
calls the corresponding function in darcs3.

"darcs init" woujld call darcs3 unless a "--darcs2" flag is given.
"darcs clone" will need to look at the remote before deciding.

This doesn't let you clean up the commands/flags, but you can mark some
darcs2-only and give an error if they are used with darcs3. Likewise,
new ones can be darcs3-only, and give an error with darcs2.


Thanks
Ian



More information about the darcs-devel mailing list