[darcs-devel] [patch1979] remove obsolete comment (and 7 more)

Ben Franksen bugs at darcs.net
Sat Feb 22 13:03:07 UTC 2020


Ben Franksen <ben.franksen at online.de> added the comment:

Trying to implement sorting of Nons (see patch1971), I stumbled over the
fact that you have implemented PropagateShrink for each RepoPatch type
separately. This is because you are accessing their internals. Looking
closer at these implementations I see that you try to commute the prim
past the RepoPatch if the latter is not just a prim, except for
RepoPatchV3.

I investigated and found out that this is indeed hard to do because of
the NamedPrim wrapper. We actually have to use fromAnonymousPrim to lift
the prim to a RepoPatchV3. I /think/ this should be fine, though, since
when a prim commutes past a V3 conflictor, then it should commute past
the effect, all conflicts (including their context) and the patch
itself, so we don't keep a reference to the anonymous prim inside the
commuted conflictor.

However, I wonder whether this kind of shrinking is sound at all for V3.
Suppose we shrink an unconflicted V3 patch by commuting a prim past it,
but then it gets stuck in the next patch. Now what if after that we have
a conflictor with a reference to the first patch. Isn't this reference
now invalid?

More generally speaking, I wonder if commuting a prim past a p1, such
that it gets stuck later on p2, could change whether p1 and p2 commute.
Wouldn't this invalidate the whole sequence?

----------
title: better shrinking for patches -> remove obsolete comment (and 7 more)

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1979>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 4211 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200222/02090671/attachment.key>


More information about the darcs-devel mailing list