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

Is cryptonite >= 0.23 strictly needed? #11

Closed
kvanbere opened this issue Mar 3, 2018 · 8 comments
Closed

Is cryptonite >= 0.23 strictly needed? #11

kvanbere opened this issue Mar 3, 2018 · 8 comments

Comments

@kvanbere
Copy link
Contributor

kvanbere commented Mar 3, 2018

When trying to build servant-github-webhook-0.3.2.1 against lts-7.24 you get

In the dependencies for servant-github-webhook-0.3.2.1:
    cryptonite-0.21 from stack configuration does not match >=0.23 (latest matching version is 0.25)

since 0.21 < 0.23.

@tsani
Copy link
Owner

tsani commented Mar 5, 2018

lts-7.24 will also require bumping down the bounds on memory (probably not an issue) and servant / servant-server. It's the servant bound that worries me, since between version 0.8 and 0.11 a lot has happened in the servant internals, which servant-github-webhook builds off of.

EDIT: I'll lower the version bounds and try building.

@kvanbere
Copy link
Contributor Author

kvanbere commented Mar 6, 2018

I noticed there is a fork of github-webhooks for GHC-7.10 so my motivation is to try and eliminate the fork by supporting & building with CI the package & full example suite for ideally GHC 7.8 or at least worst case 7.10 onwards. This means I need to get servant-github-webhook also building with the same range since its a dependency of the servant example in my package.

Sorry for the bother, hope there's something we can do !

@rahulmutt
Copy link

@tsani @donkeybonks The changes required are minor: rahulmutt@f376af2

There's a use of TypeApplications that doesn't add any new power and can be replaced with a simple type annotation. The impact of removing the forall... parts of the instance declarations will needed to be looked at though.

I tested out my forks in a local stack project and it was working without any hitches with lts-6.27.

@tsani
Copy link
Owner

tsani commented Mar 6, 2018

@donkeybonks Short answer: cryptonite-0.23 is an unnecessarily high bound.

@rahulmutt I don't think there's any impact in removing the forall in the instance declaration. I honestly don't recall why I put it there in the first place, since instance type variables are already scoped. Thank you very much for working out what changes were needed to get it to build with GHC 7.10!

I rebased @rahulmutt's ghc-7.10 branch on top of my master branch and I've ironed out the kinks in getting Travis to build against lts-10.8 and lts-6.27 (with extra-deps for things like servant and its dependencies). I lowered the bound on cryptonite to 0.19 and the bound on memory to 0.13 so that these packages won't need to be listed as extra-deps when building against lts-6.27. The tests now depend on transformers when building against GHC 7.10 since Control.IO.Monad.Class is not in base 4.9.

The only problem is that the bundled stack.yaml in the repo will have resolver: 6.27 (and a bunch of extra-deps), so to build against other resolvers, one has to use stack build --resolver foo. I don't think that this will be much of an issue for deploying to stackage, since afaict stackage will perform stack init thus overwriting the bundled stack.yaml, but it could be an annoyance to other developers when trying to build servant-github-webhook from source.

@donkeybonks in master, I currently have a git extra-dep on @rahulmutt's fork of github-webhooks since it builds with ghc-7.10. Let me know when your upstream builds and I'll drop it.

@tsani tsani closed this as completed Mar 6, 2018
@kvanbere
Copy link
Contributor Author

kvanbere commented Mar 6, 2018

The one on git should build, but the published 0.9.0 will not.

@tsani
Copy link
Owner

tsani commented Mar 7, 2018

I've updated stack.yaml on master accordingly. Thanks!

@kvanbere
Copy link
Contributor Author

kvanbere commented Mar 9, 2018

I just released github-webhooks 0.9.1.

When 0.9.1 hits stack (in say, 24hrs) the explicit git dependency can be removed again.

Sorry for the inconvenience! We have mutual dependencies on each other, so this was way more awkward than I expected, ha.

@kvanbere
Copy link
Contributor Author

kvanbere commented Mar 9, 2018

Please make sure to shoot me a tag when/if you make the next release with adjusted dependency bounds so I can update the servant examples accordingly.

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