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
haskellPackages.Agda: Fix build for ghc 8.10.2 → 8.10.3 upgrade #107695
Conversation
Commit 1998b95 “haskellPackages: update default compiler from ghc 8.10.2 to version 8.10.3” broke Agda because Agda.cabal incorrectly declares a transformers dependency only for ghc < 8.10.3: if impl(ghc >= 8.6.4) && impl(ghc < 8.10.3) build-depends: transformers == 0.5.6.2 if impl(ghc >= 8.4) && impl(ghc < 8.6.4) build-depends: transformers == 0.5.5.0 if impl(ghc < 8.4) build-depends: transformers == 0.5.2.0 leading to this error: src/full/Agda/Utils/Maybe.hs:13:1: error: Could not load module ‘Control.Monad.Trans.Maybe’ 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. Use -v (or `:set -v` in ghci) to see a list of the files searched for. | 13 | import Control.Monad.Trans.Maybe | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Signed-off-by: Anders Kaseorg <andersk@mit.edu>
# Agda 2.6.1.2 only declares a transformers dependency for ghc < 8.10.3. | ||
Agda = appendPatch super.Agda (pkgs.fetchpatch { | ||
url = "https://github.com/agda/agda/commit/76278c23d447b49f59fac581ca4ac605792aabbc.patch"; | ||
sha256 = "1g34g8a09j73h89pk4cdmri0nb0qg664hkff45amcr9kyz14a9f3"; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you instead ask an Adga maintainer (or a Hackage maintainer) to make a Hackage revision fixing this? Doing that would fix this for all Haskellers, instead of just here in nixpkgs.
I'm hoping that a Hackage revision would be able to fix something like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it wouldn’t fix it for other Haskellers, because nixpkgs is already carrying a needed patch for ListLike (a dependency of Agda): see commit 7963b44.
I’ve asked anyway in a comment on agda/agda#5109, but I would not be surprised if upstream wants to wait for the ListLike fix, ddssff/listlike#8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for asking upstream.
Feel free to ping me here in a few days if they don't end up getting back to you about doing a Hackage revision, and I'll merge this in for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upstream: “No. Unfortunately, if
conditions can not be changed in Hackage.”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks unfortunate. I was able to confirm that as well with one of my own packages.
Well thanks for going back and forth with me on this. I'll merge this in.
I imagine this will break the next time a new version for Agda
is released, so please be on the lookout for that (and feel free to ping me again when you need this patch removed).
Just wanted to say thanks to the two of you, @andersk and @cdepillabout, for the quick pull request, review and merge! For keeping the Agdapad up to date, this was exactly what I needed. Now I'm just waiting for unstable to pick that up. Thank you! |
Motivation for this change
Commit 1998b95 “haskellPackages: update default compiler from ghc 8.10.2 to version 8.10.3” broke Agda because Agda.cabal incorrectly declares a transformers dependency only for ghc < 8.10.3:
leading to this error:
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)