circuithub / rel8

Hey! Hey! Can u rel8?
https://rel8.readthedocs.io
Other
154 stars 39 forks source link

Failure to build with `opaleye-0.9.3.0` #189

Closed jkachmar closed 2 years ago

jkachmar commented 2 years ago

It looks like opaleye removed the stateQueryArr function in 0.9.3.0 (cf. https://github.com/tomjaguarpaw/haskell-opaleye/commit/01f2b37b9d5d03236e97399dc99b5520ccf41e73).

rel8 now fails to compile with the following error:

Preprocessing library for rel8-1.3.1.0..
Building library for rel8-1.3.1.0..
[  7 of 133] Compiling Rel8.Query.Opaleye

/[...]/src//Rel8/Query/Opaleye.hs:51:15: error:
    Not in scope: ‘Opaleye.stateQueryArr’
    Perhaps you meant one of these:
      ‘Opaleye.runStateQueryArr’ (imported from Opaleye.Internal.QueryArr),
      data constructor ‘Opaleye.QueryArr’ (imported from Opaleye.Internal.QueryArr),
      ‘Opaleye.unQueryArr’ (imported from Opaleye.Internal.QueryArr)
    Neither ‘Opaleye.Internal.QueryArr’ nor ‘Opaleye.Internal.Tag’ exports ‘stateQueryArr’.
   |
51 | mapping f q = Opaleye.stateQueryArr $ \_ tag ->
   |               ^^^^^^^^^^^^^^^^^^^^^

/[...]/src/Rel8/Query/Opaleye.hs:63:3: error:
    Not in scope: ‘Opaleye.stateQueryArr’
    Perhaps you meant one of these:
      ‘Opaleye.runStateQueryArr’ (imported from Opaleye.Internal.QueryArr),
      data constructor ‘Opaleye.QueryArr’ (imported from Opaleye.Internal.QueryArr),
      ‘Opaleye.unQueryArr’ (imported from Opaleye.Internal.QueryArr)
    Neither ‘Opaleye.Internal.QueryArr’ nor ‘Opaleye.Internal.Tag’ exports ‘stateQueryArr’.
   |
63 |   Opaleye.stateQueryArr $ \_ tag ->
   |   ^^^^^^^^^^^^^^^^^^^^^

cf. https://github.com/commercialhaskell/stackage/issues/6653

ocharles commented 2 years ago

Thanks @jkachmar! @tomjaguarpaw do you plan to bring stateQueryArr back, or shall we adapt Rel8?

tomjaguarpaw commented 2 years ago

Oh whoops. I added back the bits I removed in https://hackage.haskell.org/package/opaleye-0.9.3.1. At some point we should convert Rel8 to the new way, but it's not urgent.

ocharles commented 2 years ago

Much appreciated, thanks!

ocharles commented 2 years ago

Fixed in master - will cut a release soon!