simonmichael / hledger

Robust, fast, intuitive plain text accounting tool with CLI, TUI and web interfaces.
https://hledger.org
GNU General Public License v3.0
2.85k stars 307 forks source link

Fails to build with base64 >= 1 #2166

Closed d5ng4i closed 4 months ago

d5ng4i commented 4 months ago

Building with cabal, which resolves base64 to 1.0, fails.

We either need to pin base64 <1 in hledger-web or need to update the code.

cabal build all
Hledger/Web/Widget/AddForm.hs:189:7: error:
    • Couldn't match type ‘base64-1.0:Data.Base64.Types.Internal.Base64
                             'base64-1.0:Data.Base64.Types.Internal.StdPadded Text’
                     with ‘Text’
      Expected: Text -> Text
        Actual: Text
                -> base64-1.0:Data.Base64.Types.Internal.Base64
                     'base64-1.0:Data.Base64.Types.Internal.StdPadded Text
    • In the second argument of ‘(.)’, namely ‘b64wrap’
      In the second argument of ‘(.)’, namely ‘(<> "}") . b64wrap’
      In the first argument of ‘map’, namely
        ‘(("{\"value\":" <>) . (<> "}") . b64wrap)’
    |
189 |       b64wrap
    |       ^^^^^^^

For maintainers:

Update:

For now, we (alpine) have pinned base64 <1 here. I believe other distributions building hledger with cabal would be facing the same.

simonmichael commented 4 months ago

Thanks for the report. I have revised hledger-web-1.32.3 on hackage and pushed a fix to master.