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
dhall-json: fix to work with newer tasty #108765
Conversation
tasty-silver = self.tasty-silver.override { | ||
tasty-hunit = tastyHunitWithOverrides; | ||
}; |
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.
@cideM I'm not really sure what to do here.
Maybe you could move this tasty-silver
override to the top-level in this file? I don't think it makes sense to have tasty-silver
only working for dhall-json
.
Alternatively, you could use overrideScope
on dhall-json
so all you have to do is override the tasty
version, and that gets automatically propogated to tasty-silver
and tasty-hunit
. (grep through this file for other examples of overrideScope
)
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.
Oh, also, just disabling tests for dhall-json
with dontCheck
might be the easiest thing to do, since then it probably wouldn't pull in any of the tasty dependencies.
You could just link to commercialhaskell/stackage#5795 in the code.
Here's the issue about updating to tasty-1.4 in stackage: commercialhaskell/stackage#5795 Looks like a lot of packages haven't updated yet :-\ Hmm, I don't really understand what is going on here, since @cideM Do you know what is going on here? |
@cdepillabout unfortunately I have no idea this is the first time I'm interacting with Haskell dependencies outside of little projects. Yet it won't build without it :(
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 05740979b8a..46d14aa85a6 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -937,7 +937,9 @@ self: super: {
# Generate cli completions for dhall.
dhall = generateOptparseApplicativeCompletion "dhall" super.dhall;
- dhall-json = generateOptparseApplicativeCompletions ["dhall-to-json" "dhall-to-yaml"] super.dhall-json;
+ dhall-json = generateOptparseApplicativeCompletions ["dhall-to-json" "dhall-to-yaml"] (super.dhall-json.overrideScope (self: super: {
+ tasty = pkgs.haskellPackages.tasty_1_4_0_2;
+ }));
dhall-nix = generateOptparseApplicativeCompletion "dhall-to-nix" super.dhall-nix;
# https://github.com/haskell-hvr/netrc/pull/2#issuecomment-469526558
I think my PR is one of those "makes a very specific thing work" fixes but it's probably not the right thing to do here, at least that's my feeling :\ For posterity, this is the original error that prompted this PR
|
@cideM Hmm, yeah that is quite annoying. Why don't you just update this PR to mark |
357ae9b
to
8be7c02
Compare
dhall-json has a dependency on tasty-silver and this in turn only compiles if we supply a newer version of tasty. We can get around this issue until stackage has caught up to tasty 1.4 by skipping tests
Done @cdepillabout thanks for the tip about just using |
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.
Looks good, thanks for working with me on this!
@cdepillabout We disable the |
@jkachmar Ah thanks, that makes sense. I guess that is basically what we're doing here in nixpkgs as well. |
Motivation for this change
dhall-json
does not compile onhaskell-updates
right now. It has a dependency on tasty-silver and this in turn onlycompiles if we supply a newer version of tasty. This PR therefore overrides
tasty-hunit
to usetasty_1_4_0_2
.Disclaimer: I'm super new to the Haskell part of Nixpkgs so apologies if I missed something really obvious in retrospect ^_^
Tested it with
nix-build -A dhall-json
on MacOS and NixOS and a quickdhall-to-json --version
which is now at1.7.4
Will runnixpkgs-review
now.no apparent problems
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)