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

Broken with GHC 7.10 #353

Closed
ndmitchell opened this issue Feb 25, 2018 · 8 comments
Closed

Broken with GHC 7.10 #353

ndmitchell opened this issue Feb 25, 2018 · 8 comments

Comments

@ndmitchell
Copy link
Contributor

It's suddenly started failing with:

Data/Conduit.hs:106:1:
    Control.Monad.Trans.Resource: Can't be safely imported!

as per https://travis-ci.org/ndmitchell/hoogle/jobs/345920878. Was this a deliberate decision to remove GHC 7.10 support?

@RyanGlScott
Copy link
Contributor

FWIW, I am experiencing this issue as well (see this Travis build). This is with conduit-1.2.13, an old version, though... perhaps we just need to limit which versions of resourcet it can be used with, as that's where the error arises.

@RyanGlScott
Copy link
Contributor

It appears that building conduit-1.2.13 with resourcet-1.1.3.3 (which is what both of our CI jobs picked) causes the error. If I force it to build with a more recent entry in the resourcet-1.1.* series, such as resourcet-1.1.11, then the issue goes away.

I'm not sure when exactly this was fixed, but perhaps adding a stricter lower version bound would do the trick.

@snoyberg
Copy link
Owner

I'm not sure why the dependency solver is choosing old versions. If you wish, you can add lower bounds on your resourcet and/or conduit versions in your own packages. If someone else wants to play around with adding stricter lower bounds on old versions, feel free, but I don't intend to spend time on it myself.

@ndmitchell
Copy link
Contributor Author

Is this one for Hackage trustees (ping @hvr)? Why doesn't this show up at https://matrix.hackage.haskell.org/package/conduit? Having to manually add incorrect bounds to all my programs because of a dependent library that has incorrect bounds sounds depressing, tedious, and ultimately ineffective.

Note that while I'm not keen on adding bounds to lots of old versions, just the one version where you dropped GHC 7.10 support will get a lot of relatively recent configurations building that currently are bust. I suspect we might be the canary in the coal mine, with lots of additional packages showing up pretty soon.

@ndmitchell
Copy link
Contributor Author

The Matrix at https://matrix.hackage.haskell.org/package/conduit is now looking pretty dire for GHC 7.10 and below.

@snoyberg
Copy link
Owner

I won't make any technical arguments around the usefulness of the build matrix here. Suffice it to say that I'm personally not particularly bothered by the idea that the dep solver is choosing silly build plans.

To work around the issue, I've released a patch release conduit-1.2.13.1, which removes the Safe Haskell pragmas. That should address the problem somewhat. However, your comment:

Note that while I'm not keen on adding bounds to lots of old versions, just the one version where you dropped GHC 7.10 support will get a lot of relatively recent configurations building that currently are bust.

Unfortunately this likely isn't true. I don't know what's encouraging the dep solver to make the decision to choose a much older version of resourcet, but adding a lower bound in conduit is likely to only encourage it to choose an older version of conduit, not a newer version of resourcet.

RyanGlScott added a commit to haskell/criterion that referenced this issue Feb 27, 2018
Now that conduit-1.2.13.1 has been released
@ndmitchell
Copy link
Contributor Author

Thanks, everything all works now! The matrix also makes it quite clear what does and doesn't work, so a useful sanity check.

Agreed, the solver seems to try and make decisions in "version space" (which are very difficult) instead of "time space" (which packages were released most recently). It seems one is fraught with difficulties...

@snoyberg
Copy link
Owner

Cool, glad it's working. 😅

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