;add: allow older haskeline again, it's needed for stackage (reopens [#2410])

For now, `hledger add` with the stackage build of hledger 1.51.2+ will once again show ANSI junk.
Dev builds, the github release binaries, stackage builds of hledger-1.50..1.51.1,
and stackage hledger builds in future snapshots with a GHC that provides the fixed haskeline,
will remain free of that bug.
This commit is contained in:
Simon Michael 2026-01-08 17:36:55 -10:00
parent 7ab155de67
commit e36f55c98a
3 changed files with 11 additions and 5 deletions

View File

@ -41,6 +41,9 @@ Notes:
It does not do this; we assume that if you are using a `D` directive
you prefer not to see the commodity symbol repeated on amounts in the journal.
- `add` creates entries in journal format; it won't work with timeclock or timedot files.
- There is a known issue on Windows if this hledger version is built from stackage: the prompts will show ANSI junk instead of colours (#2410).
You can avoid this by using official hledger release binaries or by building it with haskeline >=0.8.4;
or by running `add` with `--color=no`, perhaps configured in your config file.
Examples:

View File

@ -167,7 +167,7 @@ library
, filepath
, githash >=0.1.6.2
, hashable >=1.2.4
, haskeline >=0.8.4.0
, haskeline >=0.6
, hledger-lib >=1.51.99 && <1.52
, http-client
, http-types
@ -222,7 +222,7 @@ executable hledger
, extra >=1.7.11
, filepath
, githash >=0.1.6.2
, haskeline >=0.8.4.0
, haskeline >=0.6
, hledger
, hledger-lib >=1.51.99 && <1.52
, http-client
@ -273,7 +273,7 @@ test-suite unittest
, extra >=1.7.11
, filepath
, githash >=0.1.6.2
, haskeline >=0.8.4.0
, haskeline >=0.6
, hledger
, hledger-lib >=1.51.99 && <1.52
, http-client
@ -325,7 +325,7 @@ benchmark bench
, extra >=1.7.11
, filepath
, githash >=0.1.6.2
, haskeline >=0.8.4.0
, haskeline >=0.6
, hledger
, hledger-lib >=1.51.99 && <1.52
, html

View File

@ -114,7 +114,10 @@ dependencies:
- extra >=1.7.11
- filepath
- githash >=0.1.6.2
- haskeline >=0.8.4.0
# haskeline 0.8.4.0 fixes https://github.com/haskell/haskeline/issues/130 and https://github.com/simonmichael/hledger/issues/2410,
# but isn't yet shipped with GHC. Dev and release builds can require it,
# but for hledger in stackage we must allow older haskeline and live with #2410 for now.
- haskeline >=0.6
- http-client
- http-types
- megaparsec >=7.0.0 && <9.8