[darcs-devel] [patch1931] remove isInverted from PatchInfo

Ganesh Sittampalam bugs at darcs.net
Fri Sep 27 18:50:53 UTC 2019


Ganesh Sittampalam <ganesh at earth.li> added the comment:

> I would have made the long comment about _piLegacyIsInverted (which I
> appreciate, thanks for the write-up!) part of the general PatchInfo
> haddocks (perhaps adding a "see above" for the member). I guess this
> will become quite unreadable when rendered with haddock (but I may be
> wrong).

OK, I'll see how that goes. I don't write complicated haddock much
because I know I will never remember to test it, but I should.

> I don't like removing read/write of legacy-inverted patches from the QC
> tests. IMO rawPatchInfo should continue to allow to set
> _piLegacyIsInverted (we expressly export it for testing purposes only)
> and the changes to Darcs.Test.Patch.Info/Inventory reverted.

I thought about this a bit when I was writing it. I wanted to remove it
from rawPatchInfo to make it more likely that other users of that would
do the right thing. But I just noticed that the comment says it's
exported only for tests so it's not really a problem, and I can use
TestOnly now to make sure of that.

I did leave one generator that produces it
(arbitraryUnencodedPatchInfo), which I thought might be a reasonable
balance though I didn't check how/where it's used. In fact before my
change both generators hardcoded it to False, but our semantic view of
the flag is now a bit different so there may be a stronger case for
setting it occasionally.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1931>
__________________________________


More information about the darcs-devel mailing list