Commit Graph

14611 Commits

Author SHA1 Message Date
Simon Michael
1d596c494b ;bin:bashrc: fix LEDGER_FILE typo 2026-01-08 00:44:05 -10:00
Simon Michael
3c0a02a34a Revert "fix:lib:Hledger.Query: words'': Parse escaped quotes in quoted patterns" [#2513]
This reverts commit de900e5b24, it's not
as safe as we thought.
2026-01-06 21:55:35 -10:00
Simon Michael
98fdffd516 ;doc: hledger's regular expressions: no lazy quantifiers 2026-01-06 21:42:32 -10:00
Simon Michael
dd6061ed65 ;bin:bashrc: cleanup 2026-01-06 21:42:32 -10:00
Simon Michael
3b656ff372 imp:add,import: also create directories when autocreating journal file
When autocreating a journal file specified by -f or LEDGER_FILE,
required parent directories will now also be autocreated if needed.
2026-01-06 21:39:59 -10:00
Simon Michael
e7d7c49562 imp: -f now errors if given a glob matching no files, like LEDGER_FILE
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
2026-01-06 21:39:59 -10:00
Simon Michael
88f6c16dd5 fix:add,import: autocreate missing journal files again (but later) [#2514]
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
2026-01-06 21:39:59 -10:00
Oleg Bulatov
abd7d60884 imp:lib:valuation: optimize price lookup with pre-built indexes [#2511]
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>
2026-01-02 17:05:24 -10:00
Simon Michael
1a5f10f928 ;doc:ghtestbinnotes: bump version for diffing 2025-12-31 13:38:43 -10:00
Simon Michael
6e0ef6b88e ;doc:ghtestbinnotes: fix urls 2025-12-31 13:37:05 -10:00
Simon Michael
20389ad844 ;workflows:binaries-linux-x64: add more caching 2025-12-31 13:16:54 -10:00
Simon Michael
656c779c6f ;workflows: rename nightly -> testbin
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.
2025-12-31 12:49:44 -10:00
Simon Michael
01c79b357e readme: heading 2025-12-31 09:34:27 -10:00
Simon Michael
dbdf199e42 ;dev: gitignore 2025-12-31 09:30:31 -10:00
Simon Michael
3d85549e79 dev:Hledger.Utils.IO: clarify expandPath, expandHomePath 2025-12-31 00:28:05 -10:00
Simon Michael
6a9c5d41d9 ;cabal: update cabal files 2025-12-31 00:28:05 -10:00
Jens Petersen
ada160db3a hledger-ui: allow vty-crossplatform 0.5 2025-12-30 23:35:46 -10:00
Simon Michael
ea043df56e ;examples:csv: opencollective: update 2025-12-30 12:54:21 -10:00
Simon Michael
6aaeddfcf0 ;examples:csv: opencollective: update 2025-12-30 12:43:04 -10:00
Simon Michael
2dd2ad5cf9 ;examples:csv: Open Collective 2025-12-30 11:26:18 -10:00
Simon Michael
3d5704fe22 ;doc:README: badges updates 2025-12-30 05:55:36 -10:00
Simon Michael
9b0555e657 ;doc:COMMON TASKS:Setting LEDGER_FILE: updates 2025-12-29 09:30:40 -10:00
Simon Michael
327ff6ef0c ;doc:REGRESSIONS 2025-12-29 08:46:30 -10:00
Simon Michael
d505c98910 ;doc:REGRESSIONS 2025-12-29 01:15:36 -10:00
Dmitry Astapov
edfea86656 ;roi: rephrase IRR solver errors a bit 2025-12-27 09:43:53 -10:00
Dmitry Astapov
1c37dc44a7 ;roi: more input sanity checks (fixes #2505) 2025-12-27 09:43:53 -10:00
Simon Michael
2fb09f0d1e cabal: update cabal files 2025-12-26 17:10:47 -10:00
Simon Michael
1a0a81d9e7 fix: add, ui: better fix for add's [#2410], also fixes ui's [#2512]
By using newer haskeline fixing https://github.com/haskell/haskeline/issues/130.
2025-12-26 17:09:26 -10:00
Simon Michael
91d019741e ;pkg: allow base 4.22 / ghc 9.14 2025-12-26 15:17:16 -10:00
Simon Michael
262e6d2c2e ;examples:cctax: wording 2025-12-26 15:05:34 -10:00
Simon Michael
ff018bf482 ;doc:README: new badges provided by gitscope.dev 2025-12-26 15:05:34 -10:00
Simon Michael
60293349bb ;imp:lib:Hledger.Utils.IO.expandHomePath: handle a bare ~ 2025-12-26 15:05:34 -10:00
Tuong Nguyen Manh
de900e5b24 fix:lib:Hledger.Query: words'': Parse escaped quotes in quoted patterns 2025-12-26 12:09:49 -10:00
Ilja Kocken
ed94e7f174
;examples:csv: add Interactive Brokers example CSV rules files (#2508) 2025-12-24 16:51:05 -10:00
Simon Michael
64af3a9d11 ;doc:cctax: updates 2025-12-19 08:58:23 -10:00
Simon Michael
bafdc72980 ;doc:cctax: updates 2025-12-19 08:36:45 -10:00
Simon Michael
824d10b406 ;doc:cctax: updates 2025-12-19 08:31:21 -10:00
Simon Michael
fc34c76eda ;examples: csv/cctax: notes on exporting to cryptocurrency tax calculators 2025-12-19 07:45:21 -10:00
Simon Michael
c0971c1c09 dev: cleanup 2025-12-16 00:18:28 -10:00
Simon Michael
48620c8e8c imp:journal:include: don't read file attributes unnecessarily
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.
2025-12-15 21:54:53 -10:00
Simon Michael
05b1798b7e ;doc:relnotes: drop hackage links 2025-12-13 09:21:00 -10:00
Simon Michael
ebaabe4305 imp:journal: fix a slight pessimisation of include directives
Since 1.50.3, canonicalizePath was being called wastefully when
processing journals with many nested include files and/or many matches
for include glob paths. On a slow filesystem, with unusually
many includes, this might have been quite noticeable.

Now we canonicalise each file path just once as it is encountered,
avoiding the wasted IO work.
2025-12-10 19:21:59 -10:00
Simon Michael
0d336dc3f8 ;dev: gitignore cleanups 2025-12-10 19:09:08 -10:00
Simon Michael
5bd57e7585 ;doc:REGRESSIONS: reduce word wrapping in table 2025-12-09 19:12:22 -10:00
Simon Michael
98abcb7a03 ;doc: ANNOUNCE: updates, new source text for announcements & blurbs 2025-12-09 10:35:31 -10:00
Simon Michael
11c6d85194 ;doc:relnotes: reorder 2025-12-08 13:34:06 -10:00
Simon Michael
31f14535cb ;doc:relnotes: update package links 2025-12-08 13:32:36 -10:00
Simon Michael
b04618ede6 ;doc:REGRESSIONS 2025-12-08 12:41:48 -10:00
Simon Michael
385b346b3c ;doc:ANNOUNCE: consolidate
Keep it short and ordered by priority for use in announcements of
different length
2025-12-08 12:38:13 -10:00
Simon Michael
0ca71e2f35 ;doc:RELEASING 2025-12-08 12:38:03 -10:00