johannesgerer / buchhaltung

Smart tools for the ledger universe
http://johannesgerer.com/buchhaltung
MIT License
97 stars 8 forks source link

Fix incompatibilities with aqbanking 5.99.44.0 #49

Open dpaetzel opened 4 years ago

dpaetzel commented 4 years ago

This commit should fix incompatibilities with aqbanking 5.99.44.0, see #40.

Note that I build using Nix; I personally did not get the old stack build to work—thus the hlegder-lib version bump which I addressed in PR #47 .

varac commented 4 years ago

I fail to build buchhaltung from this branch.

I'm using this Dockerfile to build:

FROM fpco/stack-build:lts-11 as stackbuild

# johannesgerer/buchhaltung is unmaintained, we'll use the fork from
# dpaetzel/buchhaltung
# RUN git clone https://github.com/johannesgerer/buchhaltung.git /usr/src/buchhaltung
RUN git clone -b aqbanking5.99.44.0 https://github.com/dpaetzel/buchhaltung.git /usr/src/buchhaltung

WORKDIR /usr/src/buchhaltung
RUN stack build --system-ghc

and get this error:

[ 9 of 14] Compiling Buchhaltung.AQBanking ( src/Buchhaltung/AQBanking.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Buchhaltung/AQBanking.o )
[10 of 14] Compiling Buchhaltung.Zipper ( src/Buchhaltung/Zipper.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Buchhaltung/Zipper.o )
[11 of 14] Compiling Buchhaltung.ZipEdit2 ( src/Buchhaltung/ZipEdit2.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Buchhaltung/ZipEdit2.o )
[12 of 14] Compiling Buchhaltung.Match ( src/Buchhaltung/Match.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Buchhaltung/Match.o )
[13 of 14] Compiling Buchhaltung.Add  ( src/Buchhaltung/Add.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Buchhaltung/Add.o )

/usr/src/buchhaltung/src/Buchhaltung/Add.hs:630:27: error:
    Not in scope: type constructor or class ‘MP.ParseErrorBundle’
    Module ‘Text.Megaparsec’ does not export ‘ParseErrorBundle’.
    |
630 |      -> T.Text -> Either (MP.ParseErrorBundle T.Text CustomErr) AssertedAmount
    |                           ^^^^^^^^^^^^^^^^^^^
Completed 127 action(s).

--  While building package buchhaltung-0.0.7 using:
      /root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1 build lib:buchhaltung exe:buchhaltung --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1

Any idea how to fix this ?

varac commented 4 years ago

Same issue with fpco/stack-build-small:lts-14 btw

dpaetzel commented 4 years ago

I'll look into it! Until then: Your error was directly caused by one of the changes introduced by commit 7b03c84—these changes were necessary to be able to use hledger-lib 1.15.2. Perhaps try to revert 7b03c84?

dpaetzel commented 4 years ago

e09405c should fix your problem by pinning the hledger-lib and hledger version to 1.15.2 in stack.yaml. I'll test it quickly using your Dockerfile.

dpaetzel commented 4 years ago

After this is fixed, we should probably continue any further discussions at https://github.com/dpaetzel/buchhaltung .

varac commented 4 years ago

@dpaetzel Cool, I got buchhaltung from the PR together with aqbanking 5.99.43beta-2 working now, finally! Thanks alot !!

dpaetzel commented 4 years ago

Great! I'm glad I could help! :slightly_smiling_face:

varac commented 4 years ago

After this is fixed, we should probably continue any further discussions at https://github.com/dpaetzel/buchhaltung

How would we do that ? I see you didn't activate issues - was this intentionally ? For me it would make more sense to create and discuss further tickets in your repo than here.

dpaetzel commented 4 years ago

Oh, you're right. I enabled issues now (I think it is due to having forked that they were not enabled by default?).