unisonweb / base_v1

Unison base libraries, published using V1 codebase format
24 stars 14 forks source link

Widen some type signatures in test.v1 #25

Closed runarorama closed 4 years ago

runarorama commented 4 years ago

Widens the type signatures of Gen.toWeighted, runs, and sample in the test framework so that they work with generators that have arbitrary effects.

Code review

The changes summarized below are available for you to review, using the following command:

pull-request.load https://github.com/unisonweb/base:.test.v1 https://github.com/runarorama/testv1

Updates:

 Gen.toWeighted : '{Gen} a -> Weighted a
 ↓
 Gen.toWeighted : '{e, Gen} a ->{e} Weighted a
 +  unisoncomputing2020 : License
 +  runarorama          : Author

 runs : Nat -> '{Gen} Test -> [Result]
 ↓
 runs : Nat -> '{e, Gen} Test ->{e} [Result]
 +  unisoncomputing2020 : License
 +  runarorama          : Author

 sample : Nat -> '{Gen} a -> [a]
 ↓
 sample : Nat -> '{e, Gen} a ->{e} [a]
 +  unisoncomputing2020 : License
 +  runarorama          : Author

There were 25 auto-propagated updates.
pchiusano commented 4 years ago

Good catch. Merged in Unison namespace uq9ajrbjk6su42s41sv8bg4bpkkfj259ppi3vftilaubs7m8rturoktj Git hash 4b7f64253034c0d829ab3bcaf93f11a7dd1eabfe

I had to work around the same issue with that broken hash we saw in #24

Can you just do a fresh checkout of base starting from an empty codebase, then work off that from here on out? If you have definitions you care about in a namespace with dubious history, you can find/copy/alias.term/alias.type its definitions over to a fresh namespace.

FYI, the "25 auto-propagated updates" message is due to Unison updating the dependents of a definition. These definitions have dependents, and the change was type preserving so it could propagate. What's a little odd is that there's no patch where the update was recorded in this PR - am guessing you did an update but later deleted the patch or the patch you updated is outside the namespace of this PR.

I'm following this discipline on patch management: https://www.unisonweb.org/docs/codebase-organization#development-patches so I stuck this in the patches.dev patch

runarorama commented 4 years ago

I don't think the broken hash has any dependents in my .base as it's based on a fresh pull. It's most likely a bug in UCM.

But I've rm -rfed my codebase just in case.

I don't understand your comment about patches. I know "25 auto-propagated updates" has something to do with patches and propagation, but I don't know what these 25 updates were or why that matters.