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

Building derivations exit with non-zero exit code when cabal target only has test-suites #556

Closed
felixmulder opened this issue Apr 20, 2020 · 5 comments

Comments

@felixmulder
Copy link

Preprocessing test suite 'bankgiro-engine-systest' for bankgiro-engine-systest-0.0.1..
Building test suite 'bankgiro-engine-systest' for bankgiro-engine-systest-0.0.1..
[1 of 3] Compiling Systest.Bankgiro.NotifySpec
[2 of 3] Compiling Systest.Bankgiro.PersistenceSpec
[3 of 3] Compiling Main
Linking dist/build/bankgiro-engine-systest/bankgiro-engine-systest ...
installing
Setup: No executables and no library found. Nothing to do.

This comes when running build on a derivation defined as:

let
  haskellNix = import (
    builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/930ec0d277097c7cf2252fc41d9a5e0b9972f1c4.tar.gz
  ) {};
  nixpkgsSrc = haskellNix.sources.nixpkgs-1909;
  nixpkgsArgs = haskellNix.nixpkgsArgs;
  pkgs = import nixpkgsSrc nixpkgsArgs;
in

with pkgs.lib;
with pkgs.haskell-nix.haskellLib;

collectChecks (p:
  p.isLocal && (hasSuffix "systest" p.identifier.name)
) (import ./. {})
@zhenyavinogradov
Copy link
Contributor

See #362

@angerman
Copy link
Collaborator

angerman commented May 3, 2020

@felixmulder, @zhenyavinogradov, @purefn so this is actually a Cabal bug?

@felixmulder
Copy link
Author

Interesting :) Thanks for following up @angerman, with haskell.nix we were actually able to put all tests back into projects next to the library code - so we were able to work around this :)

@stale
Copy link

stale bot commented Sep 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 28, 2022
@hamishmack hamishmack removed the wontfix label Oct 5, 2022
@hamishmack
Copy link
Collaborator

I think @zhenyavinogradov is right and this was a duplicate of #362. It was recently fixed by #1732.

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

4 participants