-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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: unbreak autodocodec, autdocodec-yaml, cabal2json #181242
base: haskell-updates
Are you sure you want to change the base?
Conversation
@@ -139,4 +139,10 @@ self: super: { | |||
# Not possible to build in the main GHC 9.0 package set | |||
# https://github.com/awakesecurity/spectacle/issues/49 | |||
spectacle = doDistribute (markUnbroken super.spectacle); | |||
|
|||
# fails on missing doccheck dependency on ghc < 9.0 | |||
autodocodec = dontCheck super.autodocodec; |
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.
This should do the trick, the issue is just that the test suite is marked not buildable for GHC >= 9.0, so cabal2nix can't generate the dependencies for it.
autodocodec = dontCheck super.autodocodec; | |
autodocodec = addBuildDepends [ self.doctest ] super.autodocodec; |
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.
After applying that, the test suite now fails due to a failing unit test. I'd like to just disable the tests for now as my package of interest cabal2json
just works fine.
@NorfairKing , any idea why we are running into this here?
autodocodec> src/Autodocodec/Codec.hs:1140: failure in expression `JSON.parseMaybe scientificCodec (Number 3)'
autodocodec> expected: Just 3
autodocodec> but got:
autodocodec> ^
autodocodec> <interactive>:621:17: error:
autodocodec> • Couldn't match type ‘Codec Value Scientific Scientific’
autodocodec> with ‘Value -> JSON.Parser b’
autodocodec> Expected type: Value -> JSON.Parser b
autodocodec> Actual type: JSONCodec Scientific
autodocodec> • In the first argument of ‘JSON.parseMaybe’, namely
autodocodec> ‘scientificCodec’
autodocodec> In the expression: JSON.parseMaybe scientificCodec (Number 3)
autodocodec> In an equation for ‘it’:
autodocodec> it = JSON.parseMaybe scientificCodec (Number 3)
autodocodec> • Relevant bindings include
autodocodec> it :: Maybe b (bound at <interactive>:621:1)
autodocodec> src/Autodocodec/Codec.hs:1174: failure in expression `JSON.parseMaybe (parseJSONVia c) (Number 3)'
autodocodec> expected: Just 3
autodocodec> but got: Just 3.0
autodocodec> ^
autodocodec> Examples: 112 Tried: 111 Errors: 0 Failures: 2
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.
I now kept the tests disabled, but put a comment mentioning the failing unit test.
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.
If you are OK with this, I think the PR is ready to merge.
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.
@DavHau doctest is broken on ghc > 9: sol/doctest#327
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.
I just released 0.1.0.3 which shouldn't have this issue.
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.
@sternenseemann How would I go about including that new release? Should I make a separate PR updating the hackage set via update-hackage.sh
?
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.
It'll be updated automatically by the next haskell-updates rotation, you don't need to do anything. I think someone will start one in the next few days, we're just all a little busy atm.
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.
Should be available after rebasing on haskell-updates
again (#181822).
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, I rebased it and now the autodocodec package builds fine and tests pass.
3946d6b
to
d214337
Compare
I just tried to compile cabal2json and got:
|
This PR fixes the package only for ghc 8.10.x. |
Oh, my bad. Then the commit message should replace |
Will |
Good point, |
I kind of wanna question why such a trivial utility needs to have such a non trivial dependency tree and can't be built with GHC 9.* despite being released like yesterday? |
@sternenseemann I think it's tied to the Cabal library and therefore requires lots of updates each new release after reading this:
However the suggestion below that comment seems like it could free that library of that constraint maybe?
I'm not really sure though. |
In any case, maybe things are easier now with Stackage LTS 20 – I think the main problem is the |
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes