Skip to content

doctest-parallel error #1829

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

Closed
peterbecich opened this issue Jan 16, 2023 · 8 comments
Closed

doctest-parallel error #1829

peterbecich opened this issue Jan 16, 2023 · 8 comments
Labels
bug Something isn't working wontfix

Comments

@peterbecich
Copy link
Contributor

peterbecich commented Jan 16, 2023

Describe the bug
Reproduction here: https://github.com/peterbecich/doctest-parallel-issue

nix flake check produces this error, after some significant building time:

building
DocTests: <command line>: cannot satisfy -package ghc
    (use -v for more information)

The test suite uses doctest-parallel (https://hackage.haskell.org/package/doctest-parallel)

The error appears to be different than other DocTests issues: https://github.com/input-output-hk/haskell.nix/issues?q=is%3Aissue+DocTests

  • Build system: x86_64-linux
  • GHC version: 9.2.5
  • Haskell.nix version (or commit) used: 146a785

Steps To Reproduce

This is a haskell.nix Flake to build hackage-server: https://github.com/haskell/hackage-server/pull/1154/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0

DocTests specified here:
https://github.com/haskell/hackage-server/blob/2e9cfb706e4f1fed0d9359b03e3487d1e8a0bcd1/hackage-server.cabal#L643-L651

PR: haskell/hackage-server#1154

To reproduce the issue, please

  • check out git@github.com:peterbecich/hackage-server.git
    branch nix-flake

  • nix flake check

    • This may take a long time. I have tried to minimize the build a little to isolate this issue but have been unsuccessful.

Expected behavior

nix flake check succeeds

Additional context

hackage-server currently has a shell.nix: https://github.com/haskell/hackage-server/blob/master/shell.nix
cabal test DocTests succeeds in that shell.

Thank you

@peterbecich peterbecich added the bug Something isn't working label Jan 16, 2023
@peterbecich peterbecich reopened this Jan 16, 2023
@peterbecich peterbecich changed the title DocTests error doctest-parallel error Jan 29, 2023
@peterbecich
Copy link
Contributor Author

peterbecich commented Jan 29, 2023

I'm looking at doctest-parallel: https://hackage.haskell.org/package/doctest-parallel-0.2.6

Is it typical for Hackage packages to include ghc in Dependencies?

Dependencies base (>=4.10 && <5), base-compat (>=0.7.0), Cabal (>=2.4 && <3.9), code-page (>=0.1), containers, deepseq, directory, doctest-parallel, exceptions, extra, filepath, ghc (>=8.2 && <9.5), ghc-paths (>=0.1.0.9), Glob, pretty, process, random (>=1.2), syb (>=0.3), template-haskell, transformers, unordered-containers [details]

trying to replace it with ghc-lib

@peterbecich
Copy link
Contributor Author

peterbecich commented Jan 29, 2023

ghc-lib produces a different error; not sure if forward progress or not

@peterbecich
Copy link
Contributor Author

peterbecich commented Feb 12, 2023

#313
Cannot build packages depending on ghc #313

I believe I have already tried reinstallableLibGhc

@andreasabel
Copy link

Should be tried again after the process >= 0.16.4 constraint has been dropped from Cabal-3.8.1.0 via revision of 2023-02-26.

peterbecich added a commit to peterbecich/hackage-server that referenced this issue Feb 28, 2023
@peterbecich
Copy link
Contributor Author

peterbecich commented Feb 28, 2023

peterbecich added a commit to peterbecich/doctest-parallel-issue that referenced this issue Mar 1, 2023
@peterbecich
Copy link
Contributor Author

peterbecich commented Mar 1, 2023

@andreasabel , I have reproduced the error in a new project: https://github.com/peterbecich/doctest-parallel-issue/blob/bf25c95fdfc6ebc4807c185c41cc3afc369ee4ef/hello.cabal#L49-L77

This is a template haskell.nix project; the sources are out-of-date and do not include https://hackage.haskell.org/package/Cabal-3.8.1.0/revisions/


After updating Cabal, the error is still there:

error: builder for '/nix/store/3lx3p3xn9fzwnja9sgs9v31qamj622gy-hello-test-DocTests-1.0.0.2-check.drv' failed with exit code 1;
       last 7 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/hnbv3r226wxp7xcwkp23925cph1prv2h-source-root-test-DocTests
       > source root is source-root-test-DocTests
       > patching sources
       > building
       > DocTests: <command line>: cannot satisfy -package ghc
       >     (use -v for more information)
       For full logs, run 'nix log /nix/store/3lx3p3xn9fzwnja9sgs9v31qamj622gy-hello-test-DocTests-1.0.0.2-check.drv'.

I am using the latest hackage.nix, which includes your revision to Cabal, and a branch of nixpkgs which also includes the revision: https://github.com/peterbecich/doctest-parallel-issue/blob/4f1d7bb8478eb90fea72b869b4c3f0d89e179c9b/flake.nix#L3-L16
I would assume that haskell.nix is using the revised Cabal package to build the DocTests, but I can't know this for certain.

@andreasabel
Copy link

Ok, thanks for letting me know. (Unfortunately, I am not familiar with nix and cannot help with nix issues.)

peterbecich added a commit to peterbecich/hackage-server that referenced this issue Mar 13, 2023
peterbecich added a commit to peterbecich/hackage-server that referenced this issue Mar 13, 2023
Squashed commit of the following:

commit fae5c89
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Mar 12 21:43:23 2023 -0700

    `nix develop` and `nix build` work

commit 9c3d54e
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Mar 5 13:24:29 2023 -0800

    use https://github.com/srid/haskell-flake

commit a56bcee
Author: Peter Becich <peterbecich@gmail.com>
Date:   Fri Mar 3 22:21:27 2023 -0800

    update sources

commit b013302
Author: Peter Becich <peterbecich@gmail.com>
Date:   Tue Feb 28 18:06:28 2023 -0800

    update Cabal in both NixPkgs and hackage.nix

commit aaff29c
Author: Peter Becich <peterbecich@gmail.com>
Date:   Mon Feb 27 18:55:48 2023 -0800

    attempt to fix `doctest-parallel` by updating Cabal

    input-output-hk/haskell.nix#1829

commit ccc9ced
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 26 23:16:28 2023 -0800

    investigate `gd` build error in `nix develop` shell

    input-output-hk/haskell.nix#1865

commit efd9de5
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 26 01:49:08 2023 -0800

    more dependencies

commit fb94055
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 26 01:19:33 2023 -0800

    work on `develop` shell

commit 495a54e
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sat Feb 4 16:28:05 2023 -0800

    replace `shell.nix` with `haskell.nix` Flake

commit e0e8f41
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 5 17:56:04 2023 -0800

    ignore `incomplete-uni-patterns` warning

commit e4747e9
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sat Feb 4 15:31:06 2023 -0800

    fix `incomplete-uni-patterns` warning, ignore some others

    the `flake.nix` build fails on these warnings: haskell#1154
peterbecich added a commit to haskell/hackage-server that referenced this issue Mar 14, 2023
* `flake.nix`

Squashed commit of the following:

commit fae5c89
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Mar 12 21:43:23 2023 -0700

    `nix develop` and `nix build` work

commit 9c3d54e
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Mar 5 13:24:29 2023 -0800

    use https://github.com/srid/haskell-flake

commit a56bcee
Author: Peter Becich <peterbecich@gmail.com>
Date:   Fri Mar 3 22:21:27 2023 -0800

    update sources

commit b013302
Author: Peter Becich <peterbecich@gmail.com>
Date:   Tue Feb 28 18:06:28 2023 -0800

    update Cabal in both NixPkgs and hackage.nix

commit aaff29c
Author: Peter Becich <peterbecich@gmail.com>
Date:   Mon Feb 27 18:55:48 2023 -0800

    attempt to fix `doctest-parallel` by updating Cabal

    input-output-hk/haskell.nix#1829

commit ccc9ced
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 26 23:16:28 2023 -0800

    investigate `gd` build error in `nix develop` shell

    input-output-hk/haskell.nix#1865

commit efd9de5
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 26 01:49:08 2023 -0800

    more dependencies

commit fb94055
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 26 01:19:33 2023 -0800

    work on `develop` shell

commit 495a54e
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sat Feb 4 16:28:05 2023 -0800

    replace `shell.nix` with `haskell.nix` Flake

commit e0e8f41
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sun Feb 5 17:56:04 2023 -0800

    ignore `incomplete-uni-patterns` warning

commit e4747e9
Author: Peter Becich <peterbecich@gmail.com>
Date:   Sat Feb 4 15:31:06 2023 -0800

    fix `incomplete-uni-patterns` warning, ignore some others

    the `flake.nix` build fails on these warnings: #1154

* Mac support in `flake.nix`

* disable `nix flake check` in CI
@stale
Copy link

stale bot commented Jun 29, 2023

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 Jun 29, 2023
@stale stale bot closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix
Projects
None yet
Development

No branches or pull requests

2 participants