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

pkgsStatic.haskellPackages: run checks by default #342094

Open
wants to merge 5 commits into
base: haskell-updates
Choose a base branch
from

Conversation

wolfgangwalther
Copy link
Contributor

Description of changes

The default for doCheck is meant to disable tests, when they can't be executed in cross environments. However, pkgsStatic and some other package sets are technically implemented as cross, even though the binaries can be executed just fine. Using canExecute is a much better check for this, thus enabling test on pkgsStatic by default.

I found one package already which has broken tests for pkgsStatic only, thus I disabled them. There are very likely many more, but we'd need to build many more packages to find out...

Things done

  • Built on platform(s)
    • x86_64-linux (packages mentioned for pkgsStatic in release-haskell)
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Comment on lines +2277 to +2269
# Preprocessing test suite 'hashable-tests' for hashable-1.4.4.0..
# Mmap.hsc: In function ‘_hsc2hs_test13’:
# Mmap.hsc:54:20: error: storage size of ‘test_array’ isn’t constant
# compilation failed
hashable = dontCheckIf pkgs.stdenv.hostPlatform.isStatic super.hashable;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know whether that's a problem with hashable, hsc2hs or nixpkgs. Any ideas?

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 15, 2024
@sternenseemann
Copy link
Member

@ofborg build pkgsStatic.cachix

@sternenseemann
Copy link
Member

@ofborg build pkgsStatic.haskellPackages.cabal2nix

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 1, 2024
@wolfgangwalther wolfgangwalther removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 21, 2024
The default for doCheck is meant to disable tests, when they can't be
executed in cross environments. However, pkgsStatic and some other
package sets are technically implemented as cross, even though the
binaries can be executed just fine. Using canExecute is a much better
check for this, thus enabling tests on pkgsStatic by default.
@wolfgangwalther
Copy link
Contributor Author

pkgsStatic.cachix

This fails to build on master right now as well, because git doesn't build in pkgsStatic.

pkgsStatic.haskellPackages.cabal2nix

On my way t building that I got the same build failure for 3 packages in a row - and I assume there are going to be many more:

       > Building test suite 'spec' for http-types-0.12.4..
       > ghc: could not execute: hspec-discover

This is because of code similar to this:

https://github.com/Vlix/http-types/blob/master/test/Spec.hs#L1C2-L1C44

I'm not sure, yet, whether that's because hspec-discover is prefixed somehow or whether it's not passed as nativeBuildInput or ... I don't know.

In any case, this needs a generic solution.

@wolfgangwalther
Copy link
Contributor Author

I'm not sure, yet, whether that's because hspec-discover is prefixed somehow or whether it's not passed as nativeBuildInput or ... I don't know.

It seems like the generic-builder doesn't support propagatedNativeBuildInputs, which I think we'd need here?

hspec has hspec-discover as libraryHaskellDepends, which is added to propagatedBuildInputs, which.. doesn't help us here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: haskell 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants