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

chatter doesn't work on latest Stackage with GHC 8 #23

Open
varosi opened this issue May 30, 2016 · 9 comments
Open

chatter doesn't work on latest Stackage with GHC 8 #23

varosi opened this issue May 30, 2016 · 9 comments

Comments

@varosi
Copy link
Contributor

varosi commented May 30, 2016

C:\Users\User\AppData\Local\Temp\stack3168\chatter-0.5.2.1\src\NLP\ML\AvgPerceptron.hs:86:10: error:
        * No instance for (NFData Class)
            arising from a use of `Control.DeepSeq.$dmrnf'
        * In the expression: Control.DeepSeq.$dmrnf
          In an equation for `rnf': rnf = Control.DeepSeq.$dmrnf
          In the instance declaration for `NFData Perceptron'
@varosi varosi closed this as completed May 30, 2016
@creswick
Copy link
Owner

@varosi Was this caused by a stale dependency? It looks like you solved the problem -- it'd be great if you could leave a quick note here about what happened. (it's bound to happen to someone else eventually!)

@varosi varosi reopened this Jun 1, 2016
@varosi
Copy link
Contributor Author

varosi commented Jun 1, 2016

Sorry, it is still not working. My fault.

This is the error after removing all the version constraints in .cabal file and leave Stack decide right combination of libraries. As I see cereal-text have some hard-coded constraints not compatible with GHC 8 (i.e. base-4.9) as first problem:

stack solver
Using configuration file: stack.yaml
Using cabal packages:

  • chatter.cabal

Using resolver: nightly-2016-06-01
Using compiler: ghc-8.0.1
Asking cabal to calculate a build plan...
Trying with packages from nightly-2016-06-01 as hard constraints...
Attempt failed.

Cabal errors begin
cabal.exe: Could not resolve dependencies:
trying: chatter-0.8.0.2 (user goal)
trying: base-4.9.0.0/installed-4.9... (dependency of chatter-0.8.0.2)
next goal: cereal-text (dependency of chatter-0.8.0.2)
rejecting: cereal-text-0.1.0.1 (conflict: base==4.9.0.0/installed-4.9...,
cereal-text => base>=4.0 && <4.9)
rejecting: cereal-text-0.1.0.0 (conflict: base==4.9.0.0/installed-4.9...,
cereal-text => base>=4.0 && <4.8)
Dependency tree exhaustively searched.
<<<< Cabal errors end

Could not parse cabal-install errors:

Cabal errors begin
cabal.exe: Could not resolve dependencies:
trying: chatter-0.8.0.2 (user goal)
trying: base-4.9.0.0/installed-4.9... (dependency of chatter-0.8.0.2)
next goal: cereal-text (dependency of chatter-0.8.0.2)
rejecting: cereal-text-0.1.0.1 (conflict: base==4.9.0.0/installed-4.9...,
cereal-text => base>=4.0 && <4.9)
rejecting: cereal-text-0.1.0.0 (conflict: base==4.9.0.0/installed-4.9...,
cereal-text => base>=4.0 && <4.8)
Dependency tree exhaustively searched.
<<<< Cabal errors end

@varosi
Copy link
Contributor Author

varosi commented Jun 1, 2016

I have put one pull request about it - ulikoehler/cereal-text#2

@creswick
Copy link
Owner

creswick commented Jun 1, 2016

I put some comments on the PR (which I declined; see the PR comments for details), but I'll reply more to the specific issue here.

It seems like this is just a symptom of the unfortunate gap between ghc versions, where lots of dependencies still need to make updates. It may be the case that chatter's dependencies need to change based on the version of GHC in use, which I am not sure Stack supports (Cabal does, via flags, but I don't know how to account for that with stack).

I'd rather not make changes to chatter to account for what is (typically) a temporary situation. It's not practical to package patched versions of the dependencies, and while it's certainly reasonable to ignore the version constraints when trying a new ghc, I think that's best done with the new cabal flags (e.g., --upgrade-dependencies and --allow-newer).

Looking in more detail, it looks like the initial problem you ran into was with a fairly old version of Chatter, so I'm assuming you did get past that.

I think the best path forward is to try the next release of cereal-text, setting that version as a lower bound in the chatter.cabal file (and making any necessary changes to the stack configuration), and see if that works for the target GHCs -- I'd like to support 7.8-8.x, at least for the short term.

@varosi
Copy link
Contributor Author

varosi commented Jun 2, 2016

My patch was not that good and I'll try to make you better to support GHC 7.6, 7.8, 7.10 and 8.

Stackage is actually done that problem with linking hard library dependencies (like == 1.10.0.2), exact cabal and exact GHC version for each Stackage set. Stack is using this combination, so there are stronger guarantees about building against Stackage set.

@creswick
Copy link
Owner

creswick commented Jun 8, 2016

Thanks for the new PRs! I'm hoping to get to them later this week.

On Thu, Jun 2, 2016 at 4:12 AM varosi [email protected] wrote:

My patch was not that good and I'll try to make you better to support GHC
7.6, 7.8, 7.10 and 8.

Stackage is actually done that problem with linking hard library
dependencies (like == 1.10.0.2), exact cabal and exact GHC version for each
Stackage set. Stack is using this combination, so there are stronger
guarantees about building against Stackage set.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#23 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAPusHtdsfCedh6_PUucJkJpd3IGQO8eks5qHrqfgaJpZM4IqDu2
.

@varosi
Copy link
Contributor Author

varosi commented Jun 8, 2016

You're welcome! I hope they are okay now.

@creswick
Copy link
Owner

@varosi could you try chatter-0.9.0.0 and see if it's working now? (I just pushed it to hackage)

@varosi
Copy link
Contributor Author

varosi commented Aug 17, 2016

It is working for LTS-6.1 which is setup in GitHub in stack.yaml, which is great! But when I try with latest nightly of Stackage (with GHC 8) there is still a problem with upper bounds of cereal module. Current cereal used for latest nightly on Stackage is cereal-0.5.3.0. So may be the constraint should be < 0.5.4.0 ?

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

2 participants