>> + fromPrim :: SHA1 -> Int -> PrimOf p wX wY -> p wX wY
>
> I feel this signature is a bit too operational, but that's really a
> consequence of discussions we're already having about SHA1s and the prim
> patch ids.
Right. This is an ugly ad-hoc solution and should be regarded as
preliminary until we have a better grip on how we want to handle
PrimPatchIds and named prims in general. You may want to add a FIXME
comment here.
>> + fromPrim _ _ = fromAnonymousPrim
>
> I'm instinctively against having this default implementation, as it
> makes it easier to accidentally use it in a case where it shouldn't
> be.
I had exactly the same instinctive reaction. One the other hand,
defining this method manually inside the old RepoPatch types makes it
harder to change the API, so again I'd say refactor this when we have a
clearer idea what we want here.
>> * add new Darcs3 format option
>
> OK (feels like our types for repository formats could be improved, e.g.
> to make it clear that Darcs3 and Darcs2 are mutually exclusive, but not
> an essential part of this change)
Fully agreed.
>> * trivial refactor in D.R.Create
>
> OK, though I'm not sure if the 'here' indirection is good or not.
I hate repeating "magical constants" in code. BTW, the interface is
horrible anyway: we take a string and assume that if it is "." then we
have a local repo, else it is remote. We should use a proper data type
but doing this right is a somewhat larger refactor. Yet another FIXME.
>> * fix rebase unsuspend for v3 with a dirty hack
>>
>> See comment in the code for the why and how.
>
> OK :-)
This hack wouldn't be needed if Rebase used (NamedPrim prim) internally,
instead of plain prims. But I couldn't see an easy way to make it do so
for RepoPatchV3 and still work generically for all RepoPatch types. As I
said elsewhere, this would require a generic "PotentiallyNamedPrim"
interface...
> It might be nice to flag places in the code that need further
> attention within a definite time horizon somehow, so we can validate
> that it happens. But not a big deal as I'm sure you're keeping track
> anyway.
I am trying to keep track but regularly fail :-( so appreciate that you
point them out during review.
I like use lentil (https://hackage.haskell.org/package/lentil) for
things like that. We could add "ASAP" as a qualifier ;-) since lentil
reports /lots/ of FIXME and TODO items when you run it on the Darcs
sources...
|