Commit Graph

3478 Commits

Author SHA1 Message Date
Simon Michael
152b20413c doc: update manuals 2024-05-29 15:32:19 -10:00
Simon Michael
1fe7e7af8c imp: cli: --color now also accepts y or n, like --pretty 2024-05-29 09:37:20 -10:00
Simon Michael
605f8446e5 fix:pkg: fix a doctest failure with ghc 8.10 2024-05-17 15:08:26 -10:00
Simon Michael
e0f017f544 ;dev: journalFinalise: doc update 2024-05-08 12:40:06 -10:00
Simon Michael
d817254290 ;doc: update changelogs 2024-05-07 16:45:21 -10:00
Simon Michael
b7e5c05da2 imp: -I can now be overridden by -s or the check command
This enables a "relaxed" workflow where you delay balance assertions
checking until strict mode is turned on: always run hledger -I, and
add -s when you're ready.
2024-05-07 15:44:06 -10:00
Simon Michael
243a96b656 dev: clarify how readJournalFiles defers checks, and use a dedicated flag 2024-05-02 21:36:32 -10:00
Simon Michael
ea58a7ccd7 imp: check: check ordereddates before balance assertions, when both are enabled 2024-05-02 21:11:04 -10:00
Simon Michael
490a46fcd2 fix: journal: parse include directives with trailing whitespace
[https://github.com/adept/full-fledged-hledger/issues/29]
2024-05-02 07:26:12 -10:00
Simon Michael
2a659e18db ;doc: changelogs: 1.33.1 2024-05-02 00:46:15 -10:00
Simon Michael
02e242c9b1 ;doc: update changelogs 2024-05-01 23:23:37 -10:00
Simon Michael
7525014c7d ;cabal: update cabal files 2024-05-01 23:04:18 -10:00
Simon Michael
8d62af8ae0 imp: Revert problematic process-1.6.19.0 bound, it seems not strictly needed [#2149] 2024-05-01 23:04:08 -10:00
Simon Michael
929f050c43 ;cabal: update cabal files 2024-05-01 16:21:13 -10:00
Simon Michael
96caa8f352 fix: detect ghc-debug support more accurately, checking hledger-lib also 2024-05-01 15:27:42 -10:00
Simon Michael
6796decb72 fix: show trailing decimal mark on cost amounts too, when needed 2024-05-01 14:17:46 -10:00
Simon Michael
d17b32c7eb imp: cli,ui,web: support ghc-debug for analysing memory/profile info
When built with the ghcdebug flag and started with --debug=-1 (or -2
to pause at startup, or -3 to pause before exit), hledger can be
controlled by ghc-debug clients like ghc-debug-brick or a custom
ghc-debug query script.

Also, refactor version string code.
2024-05-01 13:43:04 -10:00
Simon Michael
55401282a0 imp: run checks in a well-defined order; and tweak that order
Now commodities are checked before accounts, and tags before recentassertions.
Also some check doc cleanups.
2024-04-26 18:59:45 -10:00
Simon Michael
4cbf72ab1f imp!: check ordereddates: drop --date2 support; check primary dates only
date2 is a deprecated feature and was getting in the way, so has been dropped
from the ordereddates check, simplifying it.
2024-04-26 18:59:45 -10:00
Simon Michael
afe9e2c6f4 dev: move journalCheckBalanceAssertions to JournalChecks 2024-04-26 18:59:45 -10:00
Simon Michael
1c5fd0c6a3 ;doc: update changelogs 2024-04-26 17:09:17 -10:00
Simon Michael
27d5f14553 ;doc: changelogs: 1.33: fix issue links (using md-issue-refs.el) 2024-04-22 15:58:05 -10:00
Simon Michael
4ae62a1833 ;doc: update manuals 2024-04-18 13:35:28 -10:00
Simon Michael
f59cb5ff3c ;cabal: update cabal files 2024-04-18 13:33:43 -10:00
Simon Michael
f5c4d99291 ;pkg: bump version to 1.33.99 2024-04-18 13:33:42 -10:00
Simon Michael
9651082fde ;doc: bump release date to 4/18 2024-04-18 13:20:12 -10:00
Simon Michael
997653e3b9 ;doc: changelogs: 1.33 2024-04-18 13:19:34 -10:00
Simon Michael
dc8eedc16b ;cabal: update cabal files 2024-04-11 11:15:41 -10:00
Simon Michael
e4cbd88367 ;pkg:lib: disable doctests for now to allow use of process-1.6.19.0 2024-04-11 11:14:46 -10:00
Simon Michael
d3634cf4dd dev: update failng doctests 2024-04-08 00:08:48 -10:00
Simon Michael
5be3ee9e20 imp: disallow date: in expr: OR expressions, avoiding unclear semantics [#2177][#2178] 2024-04-07 23:37:28 -10:00
Simon Michael
f982a372d9 dev: matchedPostingsBeforeAndDuring: improve debug output 2024-04-07 23:14:28 -10:00
Simon Michael
06ef6de242 dev:parseBooleanQuery: refactor 2024-04-07 22:48:25 -10:00
Simon Michael
1d3e6b5543 dev:parseBooleanQuery: refactor, clarifying helper dependencies 2024-04-07 21:53:03 -10:00
Simon Michael
fae6e49407 imp: simpler, clearer date parse error messages
When the error message repeated the invalid date at the end,
it was possible to misinterpret that as a suggested fix (reported in chat).

Instead, date errors (most of them) now rely on the highlighted data
excerpt above. This is also preferable since it shows the original
date as written, not a reconstruction with a possibly different format.

Should this be the policy for all error messages going forward ?
It would be easier.
Can we assume the data excerpt is always visible along with the error message ?
It isn't shown by flycheck-hledger in emacs, eg.
2024-03-26 10:05:57 -10:00
Simon Michael
76f98f28fd ;doc: update manuals 2024-03-24 14:22:54 -10:00
aragaer
09e158d31e fix: Fill totals with correct amount of zeroes for empty reports 2024-03-17 10:52:53 -10:00
Dmitry Astapov
b0b9e69e4f ;dev:lib allow comment lines in the "if" table body 2024-03-08 07:42:58 -10:00
Simon Michael
169198ff55
Merge branch 'master' into fix-matchgroups 2024-03-02 12:15:52 -10:00
Jonathan Dowland
3b416a76ef ;cln:import: clarify haddock for getEffectiveAssignment
Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-03-02 20:56:35 +00:00
Simon Michael
3ca208a3b6 fix:queries: fix OR-ing open-ended dates, spanUnion; add spanExtend [#2177] 2024-03-01 18:10:24 -10:00
Jonathan Dowland
c5079d4f1e dev:import: call hledgerFieldValue rather than re-implementing it
Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-03-01 18:02:29 +00:00
Jonathan Dowland
1424a1f2f1 ;cln:import: update some Haddock strings to reflect #2158
Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-03-01 17:58:28 +00:00
Simon Michael
1ee0e80719 imp:errors:unbalanced transaction: show more precise amounts (#2135)
Like we used to in 1.30, but better (show all available decimal digits,
unless they're infinite in which case show 8, show trailing zeros,
show commodity symbol with zero).
2024-02-29 12:34:17 -10:00
Simon Michael
3ec432bd53 dev: rename/improve amountSetFullPrecisionUpTo, add mixedAmountSetFullPrecisionUpTo 2024-02-29 12:31:07 -10:00
Jonathan Dowland
71684f5611 ref:import: simplify renderTemplate and friends
renderTemplate and its ancillary functions did not need the
HledgerFieldName argument, so remove it.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-02-29 21:44:42 +00:00
Jonathan Dowland
b7027c8bbb feat:import: resolve matchgroup references in ConditionalBlock scope (#2158)
Adjust getEffectiveAssignment to compute an intermediary form of the
active assignments (with an additional Either wrapper to distinguish
top-level and conditional assignments) and move the remaining work to
its only caller, hledgerField.

Rework hledgerFieldValue. Instead of calling hledgerField, call
getEffectiveAssignment and--in the conditional block case--construct
a CsvRules scoped just to the active ConditionalBlock before calling
renderTemplate.

Adjust regexMatchValue to use rconditionalblocks to access conditional
blocks from the CsvRules, rather than rblocksassigning, since we haven't
narrowed the scope of that field.

The result is match group references are only expanded for match groups
that occur within the in-scope ConditionalBlock. Fixes: #2158.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-02-29 21:44:40 +00:00
Jonathan Dowland
ac7f726282 ;ref:import: consistently use hledgerField
hledgerField is an alias to the function getEffectiveAssignment: both
names are used in various parts of RulesReader.

Treat hledgerField as the canonical name, and getEffectiveAssignment
as an implementation detail of hledgerField.

Replace all uses of getEffectiveAssignment with hledgerField (except the
one in hledgerField.)

Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-02-29 21:44:39 +00:00
Jonathan Dowland
8f514ac16d ;test:import: test case for match groups (#2158)
Add a test which captures the issue of overlapping scope described
in GitHub issue #2158.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-02-29 21:44:36 +00:00
Jonathan Dowland
bd5652c1c2 ;cln:import: remove superfluous comment lines
Signed-off-by: Jonathan Dowland <jon@dow.land>
2024-02-29 21:44:32 +00:00