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

stack8.10.yaml, build failure NonEmpty does not export singleton #2198

Closed
philderbeast opened this issue May 17, 2024 · 3 comments
Closed

stack8.10.yaml, build failure NonEmpty does not export singleton #2198

philderbeast opened this issue May 17, 2024 · 3 comments
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. packaging Dependencies, version constraints, packaging..

Comments

@philderbeast
Copy link

When checking the builds with each of the stack projects, with each stack*.yaml, I see that one of them doesn't build:

$ stack build --test --no-run-tests --bench --no-run-benchmarks --stack-yaml=stack8.10.yaml
         
hledger-lib> Test running disabled by --no-run-tests flag.
hledger    > configure (lib + exe + test)
hledger    > Configuring hledger-1.33.99...
hledger    > build (lib + exe + test) with ghc-8.10.7
hledger    > Preprocessing library for hledger-1.33.99..
hledger    > Building library for hledger-1.33.99..
hledger    > [ 4 of 38] Compiling Hledger.Cli.CliOptions
hledger    >         
hledger    > /home/philderbeast/dev/src/updo/hledger-upstream/hledger/Hledger/Cli/CliOptions.hs:85:80: error:
hledger    >     Module ‘Data.List.NonEmpty’ does not export ‘singleton’
hledger    >    |    
hledger    > 85 | import qualified Data.List.NonEmpty as NE (NonEmpty, fromList, head, nonEmpty, singleton)
hledger    >    |                                                                                ^^^^^^^^^
hledger    >         
Progress 2/6         

Error: [S-7282]
       Stack failed to execute the build plan.
       
       While executing the build plan, Stack encountered the error:
       
       [S-7011]
       While building package hledger-1.33.99 (scroll up to its section to see the error) using:
       ~/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_6HauvNHV_3.2.1.0_ghc-8.10.7 --verbose=1 --builddir=.stack-work/dist/x86_64-linux/ghc-8.10.7 build lib:hledger exe:hledger test:unittest --ghc-options " -fdiagnostics-color=always"
       Process exited with code: ExitFailure 1
$ git rev-parse HEAD
176a45b12a6c2c165b9f51ff8ab883d47a546a21

$ stack --version
Version 2.15.5, Git revision 5649cc6b2522f51f0fc5543154b0fff868f9af31 x86_64 hpack-0.36.0
@simonmichael
Copy link
Owner

Thanks for the report!

I see Data.List.NonEmpty.singleton was added in ghc 9.0. The cheapest fix would be to drop support for ghc 8.10. How would you feel about that ?

@simonmichael simonmichael added A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. packaging Dependencies, version constraints, packaging.. labels May 18, 2024
@simonmichael
Copy link
Owner

I have fixed it, and set up a github workflow to test with our oldest supported GHC version when needed.

@simonmichael
Copy link
Owner

simonmichael commented May 18, 2024

Fixed it in master, that is. Preventing compilation failure for people installing hledger 1.33 from Hackage with cabal and ghc 8.10, requires a bugfix release, or waiting for the major release due next month, or adding a hackage revision on the 1.33 packages disallowing ghc 8.10 temporarily. I did the latter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. packaging Dependencies, version constraints, packaging..
Projects
None yet
Development

No branches or pull requests

2 participants