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

GHC 9.0 support #1503

Closed
mimi1vx opened this issue Mar 12, 2021 · 9 comments
Closed

GHC 9.0 support #1503

mimi1vx opened this issue Mar 12, 2021 · 9 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. packaging Dependencies, version constraints, packaging..

Comments

@mimi1vx
Copy link

mimi1vx commented Mar 12, 2021


 143s] Preprocessing executable 'hledger' for hledger-1.21..
[  143s] Building executable 'hledger' for hledger-1.21..
[  143s] creating dist/build/hledger
[  143s] creating dist/build/hledger/hledger-tmp
[  143s] /usr/bin/ghc --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/hledger/hledger-tmp -odir dist/build/hledger/hledger-tmp -hidir dist/build/hledger/hledger-tmp -stubdir dist/build/hledger/hledger-tmp -i -idist/build/hledger/hledger-tmp -iapp -idist/build/hledger/autogen -idist/build/global-autogen -Idist/build/hledger/autogen -Idist/build/global-autogen -Idist/build/hledger/hledger-tmp '-optP-DVERSION="1.21"' -optP-include -optPdist/build/hledger/autogen/cabal_macros.h -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db dist/package.conf.inplace -package-id Decimal-0.5.1-D0kLusSg15G8yAK54Yh0UE -package-id aeson-1.5.6.0-DKRYsoqDhrXJNujTZrDHEf -package-id ansi-terminal-0.11-pgADHLcnliKhCfQpJgAgl -package-id base-4.15.0.0 -package-id base-compat-batteries-0.11.2-Cs6UiKAcT2NJzvnx9vzluN -package-id bytestring-0.10.12.1 -package-id cmdargs-0.10.21-1DWr2ecLHyo32077gvOBKv -package-id containers-0.6.4.1 -package-id data-default-0.7.1.1-CkAnbPRVyfPLI1iBM1EMp7 -package-id directory-1.3.6.1 -package-id extra-1.7.9-4FHkEWT1aIrIg19RKZRnv1 -package-id filepath-1.4.2.1 -package-id haskeline-0.8.1.0 -package-id hledger-1.21-6Z6QLKL2IgMEjRXHOmH587 -package-id hledger-lib-1.21-Evq9iyJTPDk48GIIiYbE04 -package-id math-functions-0.3.4.1-7HyGaslEWSn27W651uVc2e -package-id megaparsec-9.0.1-2WmvR3Pnv0RDrSA0fKAoZ8 -package-id mtl-2.2.2 -package-id old-time-1.1.0.3-7YTq0z9Us6SN9dpV33XEL -package-id process-1.6.11.0 -package-id regex-tdfa-1.3.1.0-58wfe3sjE1z5SE9ZuplSVa -package-id safe-0.3.19-BCcHjTM7bV690cTfMWPidj -package-id shakespeare-2.0.25-4IGNqPAl1f13jGkgGXg0N5 -package-id split-0.2.3.4-7tyPNouH7xrDBZLpxDLfh -package-id tabular-0.2.2.8-8JF65zbpqg3J2xw1bK6aDa -package-id tasty-1.4.1-2k8rvX29uT62GQqlLCOdRA -package-id temporary-1.3-L7Qu5E7Wnhi9cD5xgqeHUU -package-id terminfo-0.4.1.4 -package-id text-1.2.4.1 -package-id time-1.9.3 -package-id timeit-2.0-IUvGmumxlJTJLVT8F6LloM -package-id transformers-0.5.6.2 -package-id unordered-containers-0.2.13.0-LSqNoVnVBinKYmInNBh54X -package-id utf8-string-1.0.2-HEZpcgPDFkw7O3L011r9wa -package-id utility-ht-0.0.15-1XN4qqSCg4CHDUiNDWPIaD -package-id wizards-1.0.3-L8V3kpAxPN1GYmfVO3jtn -XHaskell2010 app/hledger-cli.hs Paths_hledger -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path -threaded -optc-O2 -optc-Wall '-optc-D_FORTIFY_SOURCE=2' -optc-fstack-protector-strong -optc-funwind-tables -optc-fasynchronous-unwind-tables -optc-fstack-clash-protection '-optc-Werror=return-type'
[  143s] [1 of 2] Compiling Main             ( app/hledger-cli.hs, dist/build/hledger/hledger-tmp/Main.o )
[  143s]
[  143s] app/hledger-cli.hs:1:1: error:
[  143s]     The IO action ‘main’ is not defined in module ‘Main’
[  143s]   |
[  143s] 1 | #!/usr/bin/env runhaskell
[  143s]   | ^
[  143s] error: Bad exit status from /var/tmp/rpm-tmp.d67bdq (%build)
[  143s]
[  143s]
[  143s] RPM build errors:
@mimi1vx mimi1vx added the A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. label Mar 12, 2021
@simonmichael
Copy link
Owner

Thanks for the report. How did you get this far ? I get:

Building library for Decimal-0.5.1..
[1 of 1] Compiling Data.Decimal     ( src/Data/Decimal.hs, dist/build/Data/Decimal.o, dist/build/Data/Decimal.dyn_o )

src/Data/Decimal.hs:69:24: error:
    Operator applied to too few arguments: !
   |
69 |       decimalPlaces :: ! Word8,
   |                        ^

@simonmichael simonmichael added tools hledger developer tools, scripts, processes.. packaging Dependencies, version constraints, packaging.. and removed tools hledger developer tools, scripts, processes.. labels Mar 12, 2021
@simonmichael
Copy link
Owner

I see, PaulJohnson/Haskell-Decimal#22.

simonmichael added a commit that referenced this issue Mar 12, 2021
Also remove the obsolete shebang line.
@simonmichael
Copy link
Owner

hledger-lib and hledger, at least, should build with GHC 9.0 now.

@simonmichael
Copy link
Owner

@mimi1vx
Copy link
Author

mimi1vx commented Mar 15, 2021

@simonmichael of course hledger-ui is affected by the same problem

simonmichael added a commit that referenced this issue Apr 6, 2021
Also remove obsolete shebang line.
@simonmichael
Copy link
Owner

It's not easy to build our deps with GHC 9. We're in the unfortunate months-long stage where there's a shiny new GHC release but the package ecosystem doesn't support it. If someone else wants to try to push things forward, great. There's also a Haskell Foundation proposal to try and improve this. Otherwise hledger will support GHC 9.0 when that becomes easy. Some current hassles are:
haskell-hvr/cassava#177
haskell-foundation/foundation#549

That said, I managed to build all but hledger-web like so:

cabal build -w `stack --stack-yaml stack9.0.yaml path --compiler-exe` -O0 ./hledger-lib ./hledger ./hledger-ui --allow-newer=basement:base

and have pushed the hledger-ui fix, @mimi1vx. Thanks for testing.

@simonmichael simonmichael changed the title Can't build hledger-cli with ghc-9.0.1 Can't build hledger with ghc-9.0.1 Apr 6, 2021
@simonmichael simonmichael changed the title Can't build hledger with ghc-9.0.1 GHC 9.0 support Apr 6, 2021
@mimi1vx
Copy link
Author

mimi1vx commented Apr 7, 2021

@simonmichael foundation and casava needs only simple patches from hackage head repository to work with ghc-9.x -> https://gitlab.haskell.org/ghc/head.hackage/-/tree/master/patches

@simonmichael
Copy link
Owner

simonmichael commented Jul 16, 2021

Update:

@simonmichael
Copy link
Owner

GHC 9.0.1 is now fully supported by all packages and our default dev compiler.

@simonmichael simonmichael added A-WISH Some kind of improvement request, hare-brained proposal, or plea. and removed A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. labels Jul 21, 2021
simonmichael added a commit that referenced this issue Apr 25, 2022
simonmichael added a commit that referenced this issue Apr 25, 2022
simonmichael added a commit that referenced this issue Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. packaging Dependencies, version constraints, packaging..
Projects
None yet
Development

No branches or pull requests

2 participants