Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower bound on transformers #142

Open
andrewthad opened this issue Sep 12, 2018 · 5 comments
Open

Lower bound on transformers #142

andrewthad opened this issue Sep 12, 2018 · 5 comments

Comments

@andrewthad
Copy link
Contributor

Attoparsec uses Data.Functor.Identity. Consequently, it should require transformers >= 0.4.1.0.

@andrewthad
Copy link
Contributor Author

This only shows up when building with older versions of GHC. Try this for example to see the failure:

cabal new-build --constraint='transformers==0.4.0.0` -w ghc-7.4.2

@andrewthad
Copy link
Contributor Author

Awesome. Thanks!

@RyanGlScott
Copy link
Member

Unfortunately, these revisions are causing various build failures for me (criterion example).

Also, these new version bounds are too conservative. Data.Functor.Identity was introduced in transformers-0.2.0.0, not 0.4.1.0. The reason that attoparsec was failing to build was because it is importing Identity(runIdentity), and transformers-0.4.0.0 made the strange decision to not export runIdentity as a record selector:

$ cabal build
Preprocessing library for attoparsec-0.13.2.2..
Building library for attoparsec-0.13.2.2..
[ 5 of 21] Compiling Data.Attoparsec.Zepto ( Data/Attoparsec/Zepto.hs, dist/build/Data/Attoparsec/Zepto.o )

Data/Attoparsec/Zepto.hs:44:31:
    Module
    `Data.Functor.Identity'
    does not export
    `Identity(runIdentity)'

This is why attoparsec fails to build against that particular version of transformers. For that reason, transformers-0.4.0.0 was deprecated on Hackage. (All other versions of transformers between 0.2.0.0 and 0.5.5.0 do export runIdentity as a record selector.)

If you really want to be sure that attoparsec never builds against transformers-0.4.0.0, you should change the version bounds to transformers >= 0.2 && < 0.4 || >=0.4.1 && <0.6. I don't have the ability to change this myself—can a Hackage trustee please do this?

@hvr
Copy link
Member

hvr commented Sep 15, 2018

@RyanGlScott Oh dear... I totally missed that :-/

I've fixed up the version bound as you suggested; would have been easier to turn that soft-blacklist of transformers-0.4 into a hard-blacklist...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants