[darcs-devel] PrimWithName wrapper and UUIDs

Ben Franksen ben.franksen at online.de
Tue Feb 25 21:21:48 UTC 2020


Am 25.02.20 um 07:41 schrieb Ganesh Sittampalam:
> On 25/02/2020 01:26, Ben Franksen wrote:
>> OTOH, I think we already do that (propagate renames caused by amend
>> or unsuspend into the rebase patch) to preserve explicit
>> dependencies. The difference is that this now affects prims, too,
>> whereas before we just had to adapt the explicit dependecies of
>> Named patches. So I think the awkwardness would be limited to
>> adding a few extra cases to some of the pushRenameFixupThroughPrim
>> functions.
> 
> Yeah, I'm just not convinced it's worth it compared to saving an
> extra UUID.

I understand your reservations. From an engineering POV the idea looks
not too compelling and certainly complicates things. But there is an
undeniable conceptual elegance to it.

And there is another good argument for it. I think our other discussion
about ways to guard against inconsistencies due to violation of the
universal uniqueness of patch identities clearly indicates that UUIDs
aren't without problems. Universal properties are hard to enforce and
easy to circumvent, whether out of malice or due to bugs. This is a
weakness.

If Darcs cannot work without relying on universal uniqueness, then I'd
feel more confident if we could at least limit that to the one place
where we already rely on it, instead of introducing additional
independent universal invariants. And if we are serious about validating
consistency then this would in fact be a lot harder to do if we created
object IDs independently, rather than deriving them from patch IDs.

> Also how would anonymous add patches, such as in pending, unrevert
> or rebase fixups, or just inside the code, work?

We'd have to assign random patch identities to them. We already do this
(for Named patches) in a few select places, when we temporarily need to
construct Named patches, just grep for fromAnonymousPrim. Since these
patches are never exchanged with other repos, they are less critical
IMO. However, we would have to store these identities on disk e.g. for
pending, whereas we never store Named patches created via
fromAnonymousPrim. To make this safer we could introduce a separate name
space for local unrecorded patch IDs. This would also allow us to check
that they don't accidentally (or due to malice) slip into recorded patches.

Cheers
Ben
-------------- 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/20200225/a50cd0aa/attachment.key>


More information about the darcs-devel mailing list