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

Depending on doctest-parallel fails with attempt of reinstalling ghc #51

Closed
andreasabel opened this issue Oct 25, 2022 · 7 comments
Closed
Labels
bug Something isn't working upstream Affected by upstream bug workaround available

Comments

@andreasabel
Copy link
Contributor

andreasabel commented Oct 25, 2022

In

I am experiencing a CI failure for GHC <= 9.2: https://github.com/haskell/hackage-server/actions/runs/3324504980/jobs/5496144875
Due to the dependency of doctest-parallel on ghc, somehow it is attempted to reinstall the ghc package, which is bound to fail. E.g. on GHC 9.2.4:

Preprocessing library for ghc-9.2.4..
cabal-3.6.2.0: The program 'alex' is required but it could not be found

cabal-3.6.2.0: Failed to build ghc-9.2.4 (which is required by doctest-parallel-0.2.5). See the build log above for details.

Here is the respective build plan for doctest-parallel: https://github.com/haskell/hackage-server/actions/runs/3324504980/jobs/5496144875#step:15:370

doctest-parallel-0.2.5
 [doctest-parallel-0.2.5:lib:"spectests-modules"]
 ├─ base-4.16.3.0 ┄┄
 ├─ doctest-parallel-0.2.5
 │  ├─ Cabal-3.8.1.0
 │  │  ├─ Cabal-syntax-3.8.1.0
 │  │  │  ├─ array-0.5.4.0 ┄┄
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  ├─ binary-0.8.9.0 ┄┄
 │  │  │  ├─ bytestring-0.11.3.1 ┄┄
 │  │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  │  ├─ mtl-2.2.2 ┄┄
 │  │  │  ├─ parsec-3.1.15.0
 │  │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  │  ├─ bytestring-0.11.3.1 ┄┄
 │  │  │  │  ├─ mtl-2.2.2 ┄┄
 │  │  │  │  └─ text-1.2.5.0 ┄┄
 │  │  │  ├─ pretty-1.1.3.6 ┄┄
 │  │  │  ├─ text-1.2.5.0 ┄┄
 │  │  │  ├─ time-1.11.1.1 ┄┄
 │  │  │  ├─ transformers-0.5.6.2 ┄┄
 │  │  │  └─ unix-2.7.2.2 ┄┄
 │  │  ├─ array-0.5.4.0 ┄┄
 │  │  ├─ base-4.16.3.0 ┄┄
 │  │  ├─ bytestring-0.11.3.1 ┄┄
 │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  ├─ mtl-2.2.2 ┄┄
 │  │  ├─ parsec-3.1.15.0 ┄┄
 │  │  ├─ pretty-1.1.3.6 ┄┄
 │  │  ├─ process-1.6.16.0
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  │  └─ unix-2.7.2.2 ┄┄
 │  │  ├─ text-1.2.5.0 ┄┄
 │  │  ├─ time-1.11.1.1 ┄┄
 │  │  ├─ transformers-0.5.6.2 ┄┄
 │  │  └─ unix-2.7.2.2 ┄┄
 │  ├─ Glob-0.10.2
 │  │  ├─ base-4.16.3.0 ┄┄
 │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  ├─ dlist-1.0
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  └─ deepseq-1.4.6.1 ┄┄
 │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  ├─ transformers-0.5.6.2 ┄┄
 │  │  └─ transformers-compat-0.7.2
 │  │     ├─ base-4.16.3.0 ┄┄
 │  │     ├─ ghc-prim-0.8.0 ┄┄
 │  │     └─ transformers-0.5.6.2 ┄┄
 │  ├─ base-4.16.3.0 ┄┄
 │  ├─ base-compat-0.12.2
 │  │  ├─ base-4.16.3.0 ┄┄
 │  │  ├─ ghc-prim-0.8.0 ┄┄
 │  │  └─ unix-2.7.2.2 ┄┄
 │  ├─ code-page-0.2.1
 │  │  └─ base-4.16.3.0 ┄┄
 │  ├─ containers-0.6.5.1 ┄┄
 │  ├─ deepseq-1.4.6.1 ┄┄
 │  ├─ directory-1.3.6.2 ┄┄
 │  ├─ exceptions-0.10.4
 │  │  ├─ base-4.16.3.0 ┄┄
 │  │  ├─ mtl-2.2.2 ┄┄
 │  │  ├─ stm-2.5.0.2 ┄┄
 │  │  ├─ template-haskell-2.18.0.0 ┄┄
 │  │  └─ transformers-0.5.6.2 ┄┄
 │  ├─ extra-1.7.12
 │  │  ├─ base-4.16.3.0 ┄┄
 │  │  ├─ clock-0.8.3
 │  │  │  └─ base-4.16.3.0 ┄┄
 │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  ├─ process-1.6.16.0 ┄┄
 │  │  ├─ time-1.11.1.1 ┄┄
 │  │  └─ unix-2.7.2.2 ┄┄
 │  ├─ filepath-1.4.2.2 ┄┄
 │  ├─ ghc-9.2.4
 │  │  ├─ array-0.5.4.0 ┄┄
 │  │  ├─ base-4.16.3.0 ┄┄
 │  │  ├─ binary-0.8.9.0 ┄┄
 │  │  ├─ bytestring-0.11.3.1 ┄┄
 │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  ├─ exceptions-0.10.4 ┄┄
 │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  ├─ ghc-boot-9.2.4
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  ├─ binary-0.8.9.0 ┄┄
 │  │  │  ├─ bytestring-0.11.3.1 ┄┄
 │  │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  │  ├─ ghc-boot-th-9.2.4 ┄┄
 │  │  │  └─ unix-2.7.2.2 ┄┄
 │  │  ├─ ghc-heap-9.2.4
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  │  ├─ ghc-prim-0.8.0 ┄┄
 │  │  │  └─ rts-1.0.2 ┄┄
 │  │  ├─ ghci-9.2.4
 │  │  │  ├─ array-0.5.4.0 ┄┄
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  ├─ binary-0.8.9.0 ┄┄
 │  │  │  ├─ bytestring-0.11.3.1 ┄┄
 │  │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  │  ├─ ghc-boot-9.2.4 ┄┄
 │  │  │  ├─ ghc-heap-9.2.4 ┄┄
 │  │  │  ├─ ghc-prim-0.8.0 ┄┄
 │  │  │  ├─ rts-1.0.2 ┄┄
 │  │  │  ├─ template-haskell-2.18.0.0 ┄┄
 │  │  │  ├─ transformers-0.5.6.2 ┄┄
 │  │  │  └─ unix-2.7.2.2 ┄┄
 │  │  ├─ hpc-0.6.1.0
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  │  └─ time-1.11.1.1 ┄┄
 │  │  ├─ process-1.6.16.0 ┄┄
 │  │  ├─ template-haskell-2.18.0.0 ┄┄
 │  │  ├─ terminfo-0.4.1.5
 │  │  │  └─ base-4.16.3.0 ┄┄
 │  │  ├─ time-1.11.1.1 ┄┄
 │  │  ├─ transformers-0.5.6.2 ┄┄
 │  │  └─ unix-2.7.2.2 ┄┄
 │  ├─ ghc-paths-0.1.0.12
 │  │  └─ base-4.16.3.0 ┄┄
 │  │  [setup]
 │  │  ├─ Cabal-3.6.3.0
 │  │  │  ├─ array-0.5.4.0 ┄┄
 │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  ├─ binary-0.8.9.0 ┄┄
 │  │  │  ├─ bytestring-0.11.3.1 ┄┄
 │  │  │  ├─ containers-0.6.5.1 ┄┄
 │  │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  │  ├─ mtl-2.2.2 ┄┄
 │  │  │  ├─ parsec-3.1.15.0 ┄┄
 │  │  │  ├─ pretty-1.1.3.6 ┄┄
 │  │  │  ├─ process-1.6.13.2
 │  │  │  │  ├─ base-4.16.3.0 ┄┄
 │  │  │  │  ├─ deepseq-1.4.6.1 ┄┄
 │  │  │  │  ├─ directory-1.3.6.2 ┄┄
 │  │  │  │  ├─ filepath-1.4.2.2 ┄┄
 │  │  │  │  └─ unix-2.7.2.2 ┄┄
 │  │  │  ├─ text-1.2.5.0 ┄┄
 │  │  │  ├─ time-1.11.1.1 ┄┄
 │  │  │  ├─ transformers-0.5.6.2 ┄┄
 │  │  │  └─ unix-2.7.2.2 ┄┄
 │  │  ├─ base-4.16.3.0 ┄┄
 │  │  └─ directory-1.3.6.2 ┄┄
 │  ├─ pretty-1.1.3.6 ┄┄
 │  ├─ process-1.6.16.0 ┄┄
 │  ├─ random-1.2.1.1 ┄┄
 │  ├─ syb-0.7.2.2 ┄┄
 │  ├─ transformers-0.5.6.2 ┄┄
 │  └─ unordered-containers-0.2.19.1
 │     ├─ base-4.16.3.0 ┄┄
 │     ├─ deepseq-1.4.6.1 ┄┄
 │     ├─ hashable-1.4.1.0
 │     │  ├─ base-4.16.3.0 ┄┄
 │     │  ├─ bytestring-0.11.3.1 ┄┄
 │     │  ├─ containers-0.6.5.1 ┄┄
 │     │  ├─ deepseq-1.4.6.1 ┄┄
 │     │  ├─ ghc-bignum-1.2 ┄┄
 │     │  ├─ ghc-prim-0.8.0 ┄┄
 │     │  └─ text-1.2.5.0 ┄┄
 │     └─ template-haskell-2.18.0.0 ┄┄
 └─ template-haskell-2.18.0.0 ┄┄

Maybe it is a problem to require Cabal >= 3.8?
I am lost. Do you have any insight here?

@martijnbastiaan
Copy link
Owner

I've seen similar issues before triggering me to loosen Cabal bounds on doctest-parallel: #49. It seems that if you diverge from the coupling described here, Cabal tries to use two versions of Cabal at the same time:

 │  ├─ Cabal-3.8.1.0
...
 │  │  [setup]
 │  │  ├─ Cabal-3.6.3.0

Whenever that happens, things seem to go south. I'm not sure whether this is a Cabal bug, or expected behavior. However the workaround seems to be to use the boot Cabal library version.

@andreasabel
Copy link
Contributor Author

Thanks for the swift reply!

However the workaround seems to be to use the boot Cabal library version.

Yes, that would normally solve the issue, but in this case, since it is hackage-server, we need to compile (so I think) against a certain Cabal version, to get the latest Cabal features. E.g. the server needs to be able to handle cabal files in the latest cabal-version, and the code for this ability comes with the latest Cabal library.

I am a bit puzzled that this problem just arises now, with Cabal-3.8. Before (meaning current master of hackage-server), we were forcing Cabal >= 3.6.3.0 and this worked even for GHCs that come with a lower Cabal version.

The closest I came to the current problem (ghc reinstalled) was here, where (ghc-heap) had to be reinstalled even though it is a shipped package: haskell/containers#833 (comment)

@martijnbastiaan
Copy link
Owner

To add a data point: I've also only seen it with Cabal 3.8, so perhaps it really is a regression.

@andreasabel
Copy link
Contributor Author

andreasabel commented Oct 26, 2022

I think it is a Cabal-3.8 packaging bug. It surprisingly has dependency process >= 1.6.14 which is too new for all GHC versions by 9.4. I found this upstream issue:

I opened a more sharpened description at:

@martijnbastiaan martijnbastiaan added bug Something isn't working upstream Affected by upstream bug labels Oct 27, 2022
@martijnbastiaan
Copy link
Owner

Oh nice job getting to the bottom of this issue. I'll leave this issue open until it's resolved upstream 👍.

@andreasabel
Copy link
Contributor Author

A local workaround is allow-older: Cabal:process added to the cabal.project. This allows to keep the version of process delivered with ghc.

@andreasabel
Copy link
Contributor Author

This is fixed now by Hackage revisions of Cabal. Works for me, see e.g.:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Affected by upstream bug workaround available
Projects
None yet
Development

No branches or pull requests

2 participants