haskell-infra / hackage-trustees

Issue tracker for Hackage maintainance and trustee operations
https://hackage.haskell.org/packages/trustees/
42 stars 7 forks source link

Missing transformers-0.6 and mtl-2.3 bounds #312

Closed phadej closed 1 year ago

phadej commented 3 years ago

Suspicious:

However they are green as their dependencies (primitive and transformers-base) has restrictive bounds.

ping @RyanGlScott if you notice any.

Bodigrim commented 3 years ago

@phadej any action items left here?

phadej commented 3 years ago

I suspect there will be mtl problems once that is released. It's the same issue.

EDIT: e.g. gogol is guarded by mtl atm.

sjakobi commented 2 years ago

https://hackage.haskell.org/package/tls will probably need bounds on mtl:

Network/TLS/ErrT.hs:19:35: error:
    Module ‘Control.Monad.Error.Class’ does not export ‘Error(..)’
   |
19 | import Control.Monad.Error.Class (Error(..))
   |                                   ^^^^^^^^^
cabal: Failed to build tls-1.5.7

(Based on https://github.com/haskell-infra/hackage-trustees/issues/327#issuecomment-1007824599 I assume that trustees are allowed to make revisions for tls.)


https://hackage.haskell.org/package/resourcet will probably need bounds on transformers:

Control/Monad/Trans/Resource/Internal.hs:43:1: error:
    Could not load module ‘Control.Monad.Trans.List’
    It is a member of the hidden package ‘transformers-0.5.6.2’.
    Perhaps you need to add ‘transformers’ to the build-depends in your .cabal file.
    It is a member of the hidden package ‘rerebase-1.14’.
    Perhaps you need to add ‘rerebase’ to the build-depends in your .cabal file.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
43 | import Control.Monad.Trans.List     ( ListT    )
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build resourcet-1.2.4.3

BTW, @RyanGlScott, I had some trouble building your mtl-2.3 branch of lens:

src/Control/Lens/Zoom.hs:196:10: error:
    • Could not deduce (MonadState s (ErrorT e m))
        arising from the superclasses of an instance declaration
      from the context: (Error e, Zoom m n s t)
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:196:10-70
    • In the instance declaration for
        ‘Zoom (ErrorT e m) (ErrorT e n) s t’
    |
196 | instance (Error e, Zoom m n s t) => Zoom (ErrorT e m) (ErrorT e n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Control/Lens/Zoom.hs:196:10: error:
    • Could not deduce (MonadState t (ErrorT e n))
        arising from the superclasses of an instance declaration
      from the context: (Error e, Zoom m n s t)
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:196:10-70
    • In the instance declaration for
        ‘Zoom (ErrorT e m) (ErrorT e n) s t’
    |
196 | instance (Error e, Zoom m n s t) => Zoom (ErrorT e m) (ErrorT e n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Control/Lens/Zoom.hs:200:10: error:
    • Could not deduce (MonadState s (ListT m))
        arising from the superclasses of an instance declaration
      from the context: Zoom m n s t
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:200:10-53
    • In the instance declaration for ‘Zoom (ListT m) (ListT n) s t’
    |
200 | instance Zoom m n s t => Zoom (ListT m) (ListT n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Control/Lens/Zoom.hs:200:10: error:
    • Could not deduce (MonadState t (ListT n))
        arising from the superclasses of an instance declaration
      from the context: Zoom m n s t
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:200:10-53
    • In the instance declaration for ‘Zoom (ListT m) (ListT n) s t’
    |
200 | instance Zoom m n s t => Zoom (ListT m) (ListT n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RyanGlScott commented 2 years ago

I had some trouble building your mtl-2.3 branch of lens

My apologies, that branch contained some slightly inaccurate CPP in one spot. (I had !MIN_VERSION_transformers(0,6,0), but what I really needed was !MIN_VERSION_mtl(2,3,0).) I've pushed a new version of the mtl-2.3 branch which addresses the issue.

sjakobi commented 2 years ago

No need to apologize, @RyanGlScott, and thanks for the quick response! :) It seems that the patch still doesn't build with transformers-0.5.6.2:

src/Control/Lens/Zoom.hs:177:10: error:
    • Could not deduce (MonadState s (ListT m))
        arising from the superclasses of an instance declaration
      from the context: Zoom m n s t
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:177:10-53
    • In the instance declaration for ‘Zoom (ListT m) (ListT n) s t’
    |
177 | instance Zoom m n s t => Zoom (ListT m) (ListT n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Control/Lens/Zoom.hs:177:10: error:
    • Could not deduce (MonadState t (ListT n))
        arising from the superclasses of an instance declaration
      from the context: Zoom m n s t
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:177:10-53
    • In the instance declaration for ‘Zoom (ListT m) (ListT n) s t’
    |
177 | instance Zoom m n s t => Zoom (ListT m) (ListT n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Control/Lens/Zoom.hs:185:10: error:
    • Could not deduce (MonadState s (ErrorT e m))
        arising from the superclasses of an instance declaration
      from the context: (Error e, Zoom m n s t)
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:185:10-70
    • In the instance declaration for
        ‘Zoom (ErrorT e m) (ErrorT e n) s t’
    |
185 | instance (Error e, Zoom m n s t) => Zoom (ErrorT e m) (ErrorT e n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Control/Lens/Zoom.hs:185:10: error:
    • Could not deduce (MonadState t (ErrorT e n))
        arising from the superclasses of an instance declaration
      from the context: (Error e, Zoom m n s t)
        bound by the instance declaration
        at src/Control/Lens/Zoom.hs:185:10-70
    • In the instance declaration for
        ‘Zoom (ErrorT e m) (ErrorT e n) s t’
    |
185 | instance (Error e, Zoom m n s t) => Zoom (ErrorT e m) (ErrorT e n) s t where
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RyanGlScott commented 2 years ago

Are you quite sure you're using the mtl-2.3 branch? The line numbers in your error message don't seem to match up. For instance, line 177 points to here, which is different code altogher.

sjakobi commented 2 years ago

Are you quite sure you're using the mtl-2.3 branch?

Oops, no I wasn't. I had configured a source-repository-package with the tip of your branch in my cabal.project, but due to a bound lens < 5.2 in some dependency, cabal was building with lens-5.1 from Hackage! After adding --allow-newer=lens, I got a successful build with your patch. Apologies for the confusion!

I'm very surprised that cabal could choose not to use the source-repository-package I had configured in my cabal.project. Any idea whether that should be expected or whether it might be a bug in cabal?!

gbaz commented 2 years ago

This is expected -- if you say that a package at a version should be available, in a project, this doesn't force every other package to choose to use it.

phadej commented 1 year ago

I made revisions to tls and amazonka.

gogol seems to be bitrotted quite a lot, it's hard to say whether mtl-2.3 affects it, as there are many other issues (aeson-2, servant at least)..