well-typed / optics

Optics as an abstract interface
374 stars 24 forks source link

Support th-abstraction 0.6 #495

Closed Vekhir closed 11 months ago

Vekhir commented 12 months ago

Builds and tests fine

adamgundry commented 12 months ago

Thanks for the patch! I ran CI and it looks like there is a glitch in the doctests on GHC <= 9.2.8 (but this might well not be due to your change...).

src/Data/HashSet/Optics.hs:36: failure in expression `setOf folded ["hello","world"]'
expected: fromList ["hello","world"]
 but got: fromList ["world","hello"]
                     ^

Examples: 97  Tried: 96  Errors: 0  Failures: 1
phadej commented 12 months ago

but this might well not be due to your change

That's most likely a change in hashable, which doesn't guarantee hash values to stay stable, so toList of HashSet may list values in any order. After all, it's defined in unordered-containers package!

phadej commented 11 months ago

FWIW, e.g. GHC-9.6.2 job picked up th-abstraction-0.5.0.0 (lib) (requires download & build) (check dump install plan build step).

Testing locally, the reason is:

[__4] rejecting: th-abstraction-0.6.0.0 (conflict: generics-sop =>
th-abstraction>=0.4 && <0.6)

... so this PR seems to be merged prematurely.


EDIT: also

[__5] rejecting: template-haskell-optics-0.3 (conflict:
th-abstraction==0.6.0.0, template-haskell-optics => th-abstraction>=0.4 &&
<0.6)
adamgundry commented 11 months ago

I've tested locally that optics-th builds and passes tests with th-abstraction-0.6.0.0 (using allow-newer). Is that enough or should we revert?

template-haskell-optics seems to be hit by an API change in th-abstraction-0.6.0.0, so it doesn't build.

phadej commented 11 months ago

I've tested locally that

Please mention these, that would prevent confusion.

should we revert?

No need to, as long as someone remembers to make template-haskell-optics compatible as well.

adamgundry commented 11 months ago

Got it.

I've bumped the bounds of https://hackage.haskell.org/package/optics-th-0.4.1 to permit th-abstraction-0.6.