hpdeifel / hledger-iadd

A terminal UI as drop-in replacement for hledger add.
BSD 3-Clause "New" or "Revised" License
81 stars 8 forks source link

hledger-iadd-1.2.5 does not compile #27

Closed peti closed 7 years ago

peti commented 7 years ago

I'm packaging hledger-iadd-1.2.5 for openSUSE (https://build.opensuse.org/package/show/devel:languages:haskell:lts:9/ghc-hledger-iadd), and we're seeing the following build error. Is that a known issue?

+ ghc --make -no-user-package-db Setup
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
+ LANG=en_US.utf8
+ ./Setup configure --prefix=/usr --libdir=/usr/lib64 --docdir=/usr/share/doc/packages/ghc-hledger-iadd '--libsubdir=$compiler/$pkgkey' '--datasubdir=$pkgid' --ghc '--ghc-options= ' -v -p --enable-shared --htmldir=/usr/share/doc/ghc-8.0.2/html/libraries/hledger-iadd-1.2.5 --global
Configuring hledger-iadd-1.2.5...
Dependency base >=4.8 && <5: using base-4.9.1.0
Dependency brick >=0.17 && <0.21: using brick-0.18
Dependency containers -any: using containers-0.5.7.1
Dependency directory -any: using directory-1.3.0.0
Dependency free >=4.12.4: using free-4.12.4
Dependency hledger-iadd -any: using hledger-iadd-1.2.5
Dependency hledger-lib >=1.0 && <1.4: using hledger-lib-1.3.2
Dependency megaparsec >=5.0 && <6.1: using megaparsec-5.3.1
Dependency microlens -any: using microlens-0.4.8.1
Dependency microlens-th -any: using microlens-th-0.4.1.1
Dependency optparse-applicative -any: using optparse-applicative-0.13.2.0
Dependency semigroups >=0.5.0: using semigroups-0.18.3
Dependency text -any: using text-1.2.2.2
Dependency text-format -any: using text-format-0.3.1.1
Dependency text-zipper >=0.10: using text-zipper-0.10
Dependency time >=1.5: using time-1.6.0.1
Dependency transformers >=0.3: using transformers-0.5.2.0
Dependency unordered-containers -any: using unordered-containers-0.2.8.0
Dependency vector -any: using vector-0.12.0.1
Dependency vty >=5.4: using vty-5.16
Dependency xdg-basedir -any: using xdg-basedir-0.2.2
Using Cabal-1.24.2.0 compiled by ghc-8.0
Using compiler: ghc-8.0.2
Using install prefix: /usr
Binaries installed in: /usr/bin
Libraries installed in:
/usr/lib64/ghc-8.0.2/hledger-iadd-1.2.5-CnBPEnkNqM85bnLV6I4FCC
Dynamic libraries installed in:
/usr/lib64/ghc-8.0.2/hledger-iadd-1.2.5-CnBPEnkNqM85bnLV6I4FCC
Private binaries installed in: /usr/libexec
Data files installed in: /usr/share/hledger-iadd-1.2.5
Documentation installed in: /usr/share/doc/packages/ghc-hledger-iadd
Configuration files installed in: /usr/etc
No alex found
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
Using gcc version 7 found on system at: /usr/bin/gcc
Using ghc version 8.0.2 found on system at: /usr/bin/ghc
Using ghc-pkg version 8.0.2 found on system at: /usr/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.17.3 found on system at: /usr/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at: /usr/bin/hpc
Using hsc2hs version 0.68.1 found on system at: /usr/bin/hsc2hs
No hscolour found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
Using pkg-config version 0.29.2 found on system at: /usr/bin/pkg-config
Using strip version 2.28 found on system at: /usr/bin/strip
Using tar found on system at: /usr/bin/tar
No uhc found
+ '[' -x Setup ']'
+ LANG=en_US.utf8
+ ./Setup build -v
Component build order: library, executable 'hledger-iadd'
creating dist/build
creating dist/build/autogen
Building hledger-iadd-1.2.5...
/usr/bin/ghc-pkg init dist/package.conf.inplace
Preprocessing library hledger-iadd-1.2.5...
Building library...
creating dist/build
/usr/bin/ghc --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id hledger-iadd-1.2.5-CnBPEnkNqM85bnLV6I4FCC -hide-all-packages -no-user-package-db -package-db dist/package.conf.inplace -package-id base-4.9.1.0 -package-id brick-0.18-6TGaA6V814bAZSfhSIQQDE -package-id containers-0.5.7.1 -package-id directory-1.3.0.0 -package-id free-4.12.4-6BdTDvOwMt99y1Q5P0yPIv -package-id hledger-lib-1.3.2-D8Dw0rq5JBPa45KRpN5KP -package-id megaparsec-5.3.1-8yJ3Z1o91SqLu5dkb9srax -package-id microlens-0.4.8.1-BVhsezHoPw9Ez18LAXVtpM -package-id microlens-th-0.4.1.1-DWxGvZm1QBXHYYQf0fHp0m -package-id optparse-applicative-0.13.2.0-EqIYOWOFTvf23sT5QTYn9U -package-id semigroups-0.18.3-5xL9BgkWQsCGwo6YahyMCM -package-id text-1.2.2.2-1cn50juu89QSL9QkUVcRY -package-id text-format-0.3.1.1-2rIdrlmbdXRDkxGLbZkfzz -package-id text-zipper-0.10-O15efcx5vkIYY49wlLacL -package-id time-1.6.0.1 -package-id transformers-0.5.2.0 -package-id unordered-containers-0.2.8.0-EsriWmISHwMG6fvrGnOReO -package-id vector-0.12.0.1-692PQMDMB6pIQ1uGwefDcQ -package-id vty-5.16-S5fFGSagFs6iYXs4Urg92 -package-id xdg-basedir-0.2.2-G1R0zNCFit6DIeGbPXzNil -XHaskell2010 Model View AmountParser DateParser ConfigParser Brick.Widgets.List.Utils Brick.Widgets.HelpMessage Brick.Widgets.CommentDialog Brick.Widgets.BetterDialog Brick.Widgets.WrappedText Brick.Widgets.Edit.EmacsBindings Text.Megaparsec.Compat -Wall -fdefer-typed-holes -fno-warn-name-shadowing
[ 1 of 12] Compiling Text.Megaparsec.Compat ( src/Text/Megaparsec/Compat.hs, dist/build/Text/Megaparsec/Compat.o )
[ 2 of 12] Compiling DateParser       ( src/DateParser.hs, dist/build/DateParser.o )
[ 3 of 12] Compiling ConfigParser     ( src/ConfigParser.hs, dist/build/ConfigParser.o )
[ 4 of 12] Compiling Brick.Widgets.WrappedText ( src/Brick/Widgets/WrappedText.hs, dist/build/Brick/Widgets/WrappedText.o )
[ 5 of 12] Compiling Brick.Widgets.List.Utils ( src/Brick/Widgets/List/Utils.hs, dist/build/Brick/Widgets/List/Utils.o )
[ 6 of 12] Compiling Brick.Widgets.HelpMessage ( src/Brick/Widgets/HelpMessage.hs, dist/build/Brick/Widgets/HelpMessage.o )
[ 7 of 12] Compiling Brick.Widgets.Edit.EmacsBindings ( src/Brick/Widgets/Edit/EmacsBindings.hs, dist/build/Brick/Widgets/Edit/EmacsBindings.o )

src/Brick/Widgets/Edit/EmacsBindings.hs:35:1: warning: [-Wunused-top-binds]
    Defined but not used: ‘drawingFunction’
[ 8 of 12] Compiling Brick.Widgets.CommentDialog ( src/Brick/Widgets/CommentDialog.hs, dist/build/Brick/Widgets/CommentDialog.o )
[ 9 of 12] Compiling Brick.Widgets.BetterDialog ( src/Brick/Widgets/BetterDialog.hs, dist/build/Brick/Widgets/BetterDialog.o )
[10 of 12] Compiling AmountParser     ( src/AmountParser.hs, dist/build/AmountParser.o )

src/AmountParser.hs:9:17: error:
    Not in scope: type constructor or class ‘HL.JournalStateParser’
    Perhaps you meant ‘HL.JournalParser’ (imported from Hledger)
    Module ‘Hledger’ does not export ‘JournalStateParser’.
error: Bad exit status from /var/tmp/rpm-tmp.0eAaNU (%build)
simonmichael commented 7 years ago

I think that's my fault, for changing the api in hledger-lib 1.3.1 or thereabouts.

hi hpd_, am I right in thinking hledger-iadd-1.2.5 doesn't build with hledger 1.3.1 ? hpd_: yes I guess hledger-iadd-1.2.5 should depend on hledger-lib <1.3.1 - maybe worth adding a revision I broke PVP there, didn't I hmm I'm confused. stack install hledger-iadd-1.2.5 hledger-lib-1.3.1 fails due to "JournalStateParser" reference in AmountParser.hs stack install hledger-iadd-1.2.4 hledger-lib-1.3.1 succeeds. But hledger-iadd-1.2.4 seems to contain the same reference
peti commented 7 years ago

openSUSE distributes the latest version hledger-lib (and so does NixOS). We're now stuck at version 1.2.4. It would be great if we could get an updated version since presumably there were improvements made since then. In any case, it might be a good idea to edit the version constraints published on Hackage.

hpdeifel commented 7 years ago

Thanks for the report and sorry for the delay.

I have committed a fix and will make a new release shortly.

The reason that 1.2.4 works, while 1.2.5 doesn't is this: I accidentally uploaded a broken release tarball for 1.2.4 that contained uncommited changes as a result of a tooling change on my end. At that time I was testing hledger-iadd against hledger HEAD, which already contained the new API, so that's why it works with newer versions of hledger-lib. But it didn't work with the released version then (1.3), so I uploaded a new tarball without those changes.

hledger-lib-1.2.5 is exactly what 1.2.4 should have been with no additional changes.

I will deprecate 1.2.4 on hackage and publish a new revision of 1.2.5 once the new release is out.

hpdeifel commented 7 years ago

Alright, this should be completely fixed now. 1.2.6 is out, 1.2.4 is deprecated and 1.2.5 depends on hledger-lib < 1.3.1

Let me know if there are still problems

simonmichael commented 7 years ago

@hpdeifel great, I have updated hledger-install.sh to install hledger-iadd-1.2.6.

Consider also uncommenting hledger-iadd in https://github.com/fpco/stackage/blob/master/build-constraints.yaml now, to get it back in stackage. And unless you are expecting test suite compilation failures, remove it from the expected test failures section towards the end of that file.

hpdeifel commented 7 years ago

Will do!