This simplifies the code for styling amounts with or without precision.
But it complicates the semantics (Nothing is useful only when setting style).
Not sure if it's the best way.
Provide a ghc-tags.yaml file to make use of ghc-tags with Hledger easy.
ghc-tags is a standalone tool to replace the formerly-built-in
":ctags" feature (and I presume ":etags") in GHCi. These walked over
the source and produced a TAGS file (in vim-compatible ctags or
Emacs-compatible etags format) that allows the relevant editors to
quickly navigate around function definitions.
ghc-tags trips over some of the CPP used in Hledger. The solution
is to provide ghc-tags with explicit CPP defines via a YAML file.
However, if a YAML file is provided, one also must specify the source
paths, as the tool XORs config file | paths-on-command-line.
See <https://github.com/arybczak/ghc-tags/issues/6> for more
information.
Signed-off-by: Jonathan Dowland <jon@dow.land>
print now shows zero posting amounts with their original commodity
symbol and the corresponding style (instead of stripping the symbol).
If an inferred amount has multiple zeroes in different commodities,
a posting is displayed for each of these.
Possible breaking changes:
showMixedAmountLinesB, showAmountB, showAmountPrice now preserve
commodityful zeroes when rendering. This is intended to improve print output,
but it seems possible it might also affect balance and register reports,
though our tests show no change in those.
Equity conversion postings and cost amounts were being matched up too
exactly, causing valid entries with redundant conversion postings and
costs to be rejected. Now the amounts are compared with the precision
(number of decimal places) used in the conversion posting's amount.
Eg, here the first posting's 209.60495 GEL cost is recognised as a
match for the third posting's -209.60 GEL, using the latter's two
digit precision:
2023-01-01
Assets -84.01 USD @ 2.495 GEL ; 209.60495 GEL
Equity:Conversion 84.01 USD
Equity:Conversion -209.60 GEL
Assets 209.60 GEL
The suggested sample balance assertion now uses the same commodity
symbol as in the failing posting (the first, if there are more than
one). Also the cleared mark has been removed.
hledger check recentassertions now reports the error at the first
posting that's more than 7 days later than the latest balance
assertion (rather than at the balance assertion). This is the thing
actually triggering the error, and it is more likely to be visible or
at least closer when you are working at the end of a journal file.