-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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.rest-rewrite: fix tests #240235
Conversation
Alright, I merged in NixOS/cabal2nix#605, updated cabal2nix in nixpkgs, and regenerated the expression for $ NIXPKGS_ALLOW_BROKEN=1 nix-build -A haskellPackages.rest-rewrite
this derivation will be built:
/nix/store/srwh5y2skdv9ix3vj6k5c41kgyvj4cqa-rest-rewrite-0.4.1.drv
building '/nix/store/srwh5y2skdv9ix3vj6k5c41kgyvj4cqa-rest-rewrite-0.4.1.drv'...
setupCompilerEnvironmentPhase
...
[10 of 11] Compiling WQO ( test/WQO.hs, dist/build/test-rest/test-rest-tmp/WQO.o )
[11 of 11] Compiling Main ( test/Test.hs, dist/build/test-rest/test-rest-tmp/Main.o )
[12 of 12] Linking dist/build/test-rest/test-rest
running tests
Running 2 test suites...
Test suite rest: RUNNING...
s₁ ∩ s₀ → ∅
Z ∩ (X ∪ Y) → (Z ∩ X) ∪ (Z ∩ Y)
X ∩ X → X
X ∪ (Y ∪ Z) → (X ∪ Y) ∪ Z
(X ∪ Y) ∪ Z → X ∪ (Y ∪ Z)
(X ∪ Y) ∩ Z → (X ∩ Z) ∪ (Y ∩ Z)
X ∩ ∅ → ∅
Z ∪ (X ∩ Y) → (Z ∪ X) ∩ (Z ∪ Y)
X ∪ X → X
(X ∩ Y) ∪ Z → (X ∪ Z) ∩ (Y ∪ Z)
X ∪ ∅ → X
REST run completed, in 0.01201661s
Drawing graph
rest: graphs/fig4.dot: withFile: does not exist (No such file or directory)
Test suite rest: FAIL
Test suite logged to: dist/test/rest-rewrite-0.4.1-rest.log
Test suite test-rest: RUNNING...
... Maybe a test file that isn't included in the sdist? @tbidne Would you be able to take a look at this? |
@cdepillabout thanks for that! Indeed, that test error is actually what I fixed in zgrannan/rest#38. However there is no hackage release for it yet, hence the failure. I will ask for a release and ping you here once it's up. |
@tbidne Ah yeah, sorry I missed that! I actually tried applying your PR as a patch, and it didn't seem to actually fix the test error for me. I'm not sure why, but maybe it is just the difference between the sdist build and the environment nix runs in. However, I did take your change from this PR and apply it in 3ba086a. So If this is a package you frequently use, you may want to think about adding yourself as the maintainer, so you can see if it ends up breaking in the future. Thanks! |
Ah interesting @cdepillabout. I noticed the same thing as you actually (patch did not work, though I also am not sure why). I'll proceed with the Thanks again! |
Description of changes
Resolves #215073.
There are two problems:
1. Test dependencies
For starters, the error described in the issue is due to the tests requiring
z3
at runtime:The tests also require
graphviz
.Fix
This is fixed with:
It appears to me that it might be nicer to fix the derivation in
hackage-packages.nix
i.e. something like:But I am not sure how to do that / if it is any better.
2. Missing directory
Once those dependencies are present, you will encounter a different error:
This is due to the lines here:
In particular, the
writeFile
call requires thegraphs
directory to exist, but because it is not copied over during out-of-tree builds (it contains no source files), it does not exist, hence fails on nix.Fix
This is fixed with:
Once again there are possible alternative solutions e.g. adding the following to the cabal file:
extra-source-files: graphs/.DONOTDELETE
I attempted this via a patch but wasn't able to get it to work 🤷.
Misc
Sadly
liquidhaskell
-- which was transitively broken byrest-rewrite
-- is still broken for another reasons, hence its move tobroken.yaml
.liquid-fixpoint
now works, however.Also, the transitive/hackage-packages.nix files were updated via
regenerate-hackage-packages.nix
.Please let me know what changes I should make. Thanks!
Prerequisites
The following is a list of of tasks that must be completed before this PR is merged.
rest-rewrite
nixpkgs
.cabal2nix
nixpkgs
.rest-rewrite
from broken package list only. The other changes will not be needed once the other actions are completed.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/
)