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.
Previously LEDGER_FILE=foo hledger add did, but hledger -f foo add didn't.
Now they both consistently will error if given a glob
(a path contining [, {, *, or ?) that matches nothing,
rather than auto-creating a file with a glob-like name.
Hledger.Utils.IO:
expandPathOrGlob
This restores the pre-1.50.3 behaviour of add and import, which once
again auto-create a missing file (specified by -f or LEDGER_FILE or
the builtin default path) rather than giving an error.
This fixes#2514 and refines the fix for [#2485].
There's also an improvement: they no longer create it unconditionally at the start;
they create lazily, when they have data to write.
Hledger.Read:
defaultExistingJournalPath
defaultExistingJournalPathSafely
readPossibleJournalFile
Hledger.Cli.Utils:
withPossibleJournal
Replace O(n log n) re-sorting of all prices on every valuation date
with O(log n) indexed lookups. By pre-building sorted price indexes
once at startup using O(n log n) time, we avoid redundant work
during reports.
This significantly improves performance for --value=end,COMM with daily
reports over long periods and large price databases.
Implementation:
- PriceIndex maps commodity pairs to a Map from date to effective
price, enabling O(log n) temporal lookups via M.lookupLE.
- DefaultValuationIndex provides efficient resolution of destination
commodities using the same temporal logic.
- makePriceGraph is updated to consume these indexes.
Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
The nightly tag is no longer usable, having been used in a test of
immutable releases on Github. The branch/tag/workflow/release is
now "testbin", intended for publishing unreleased binaries for testing.
When including a literal path, don't use the Glob library at all.
Glob seems to read attributes of all files in a directory,
which disturbs build tools like tup which detect dependencies
based on filesystem operations.