;doc: relnotes 1.41

This commit is contained in:
Simon Michael 2024-12-08 18:06:23 -10:00
parent 07d6fc4d3e
commit 297ca50294

View File

@ -76,8 +76,323 @@ Changes in hledger-install.sh are shown
## 2024-09-09 hledger-1.40
## 2024-12-08 hledger-1.41
**Valuation fix, pervasive improved HTML and FODS output, multiple depths, terminal pagination, robust export to Beancount, ...**
### hledger 1.41
Breaking changes
- Accounts named "equity:conversion", "equity:trading", or "equity:trade(s)", which are detected as type `V`/`Conversion`, will now revert to type `E`/`Equity` instead if any other account has been declared as type `V`/`Conversion`.
- When built with ghc 9.10.1, hledger shows two extra newlines after any error message.
Fixes
- A somewhat severe, though hopefully rare, valuation bug has been fixed. In certain circumstances, values could be calculated inaccurately, because of display-rounding occurring inappropriately during calculations. [#2254]
Specifically: when there was no direct P price for the target commodity, so that hledger had to convert via a chain of prices, and if all of those price amounts had too few decimal places, then the result could be inaccurate. An example:
P 2000-01-01 A 10.5 B
P 2000-01-01 B 100.5 C
2000-01-01
(a) 100 A
$ hledger-1.40 print -X C
2000-01-01
(a) 105520 C ; wrong
$ hledger-1.41 print -X C
2000-01-01
(a) 105525 C ; right
- `bs`/`bse`/`cf`/`is`'s HTML output no longer includes excess heading cells, and `bs`/`bse`'s HTML output no longer shows an inappropriate Total heading with `-T`. (`balancesheet` does not support `-T`.)
(Henning Thielemann)
- Balance commands' HTML, CSV and FODS output now show tree mode properly indented (using no-break spaces).
(Henning Thielemann)
- In the `roi` command, a division by zero error (when all assets were sold) has been fixed.
[#2281] (Dmitry Astapov)
- In the HTML output of `bs`/`bse`/`cf`/`is` reports, Net amounts in the Net row are now formatted like the others.
(Bas van Dijk)
- In `bs`/`bse`/`cf`/`is` HTML output, some unnecessary TH cells have been fixed.
[#2225] (Henning Thielemann)
- In a multi-line comment generated by CSV rules, tags on all lines now work (ie, can be matched). Posting dates in comments generated from CSV also now [work](https://hledger.org/hledger.html#comment-field).
(#2241)
- hledger's bash shell completions are now up to date with the latest CLI.
[#986]
- When showing output with a pager, if `$PAGER` is set to something not found in PATH, we now ignore it instead of raising an error.
- `hledger --color=yes | less -R` now shows bold headings as you'd expect.
Features
- The `print`, `register` and `aregister` commands now support HTML and FODS output, and the `bs`/`bse`/`cf`/`is` commands now support FODS output. This means all of the "STANDARD REPORTS" commands, and the `balance` command, now support text, HTML, CSV, TSV, or FODS output.
(Henning Thielemann)
- When generating HTML output with the register or balance commands, the `--base-url` option will add hyperlinks to hledger-web, allowing you to view the detailed transactions if you have hledger-web running.
(Henning Thielemann)
- Reports can now specify different display depths for certain accounts, rather than showing all accounts with the same depth limit. Multiple `--depth=ACCTREGEX=DEPTH` options (or `depth:ACCTREGEX=DEPTH` arguments can be used. For example, this will clip all accounts matching "assets" to depth 3, all accounts matching "expenses" to depth 2, and all other accounts to depth 1: `--depth assets=3 --depth expenses=2 --depth 1`
(Stephen Morgan, #2292)
- In unix-like environments, hledger now uses a pager (`$PAGER`, `less`, or `more`) for all large terminal output, not just for help. You can override this with the new `--pager` option. The pager is expected to handle hledger's ANSI colour output (unless you disable that). If `less` is used, it will be configured automatically, or you can override this by setting options in a `HLEDGER_LESS` environment variable.
- The `print` command's `beancount` output is now much more Beancount-compatible [#2295]. Other than using `--alias` to provide the top-level account names Beancount requires, you should rarely have to do anything special to produce a journal that `bean-check` accepts. hledger will automatically adjust problematic names, encode unsupported characters, and so on. See [hledger: Beancount output](https://hledger.org/dev/hledger.html#beancount-output) for the full details.
This supersedes the `ledger2beancount` tool, and makes using Beancount tools, especially Fava, practical for hledger users. In many cases this should just work:
```
hledger [ALIASES] print -o tmp.beancount; fava tmp.beancount
```
Improvements
- `if` blocks in CSV rules now allow `& !` (AND NOT) on the same line.
- When reading `.latest` files, whitespace is now ignored, and any date parse failure is reported with the file and line number.
- In journal format, P directives now require a space after the first symbol, preventing surprises like `P 2024-10-31 a0 1` parsed as `P 2024-10-31 a 01`.
[#2280]
- `aregister` has a new `--heading=YN` option, for disabling the report heading. (Henning Thielemann)
- `aregister` now supports the `--invert` and `--cumulative` flags, like the `register` command. (Henning Thielemann)
- The balance commands' HTML and FODS output now shows table borders consistently.
(Henning Thielemann)
- In the balance commands' HTML output, row headings now span multiple rows when appropriate, rather than being repeated.
(Henning Thielemann)
- Balance commands now support `--transpose` when generating HTML output.
(Henning Thielemann)
- The `balance` command's `--layout=tidy` now affects HTML and FODS output at least to some extent (not just CSV output). And it always disables the totals row. (Henning Thielemann)
- The `balance` command's FODS output now picks a report title based on the report mode: "Balance Report", "Multi-period Balance Report", or "Budget Report". (Henning Thielemann)
- `balance` and `aregister`'s HTML output will now use a hledger.css file if present, like `bs`/`bse`/`cf`/`is`.
- `bs`/`bse`/`cf`/`is` now support the `--count` (postings count) report type, like `balance`.
- The balance commands' options help has had some cleanup.
- The error messages from `check accounts` and `check recentassertions` are now clearer.
- The `check commodities` command now also checks commodities used in P directives. [#2280]
- The `commodities` command now also list commodities mentioned in P directives. [#2280]
- All of hledger's internal hidden (but searchable) tags can now be made visible by `print --verbose-tags`, which is useful for troubleshooting `--infer-equity`,
`--infer-costs`, and the detection of redundant costs and conversion postings. Also,
- Some hidden tags have been renamed for clarity:
`_modified` is now `_modified-transaction`,
`_cost-matched` is now `_cost-posting`,
`_conversion-matched` is now `_conversion-posting`.
- The `generated-posting:` tag added by `--infer-equity` is now valueless.
- The `modified-transaction:` tag added by `--auto` now appears on its own line.
- Using the `-NUM` shortcut (for `--depth NUM`) in a config file now works.
- Setting the `--color` option in a config file now works (except it does not affect `--debug` output, currently).
- The `--color` option's suggested values are now `yes`/`y`, `no`/`n`, or `auto`/`a`. `always` and `never` are no longer documented, though still supported.
- More compact and informative `--debug=2` output during valuation. Market prices are now shown using one line each, the known prices are listed, and the status of `--infer-market-prices` is shown.
[#2287]
- More informative `--debug=7` output from CSV rules.
- The hledger packages have a new `debug` build flag. Builds made with ghc 9.10+ and this flag will show some kind of stack trace if the program exits with an error. (These will improve in future ghc versions.)
- Disabled the unused `ghcdebug` build flag and ghc-debug support, for now.
- Allow megaparsec 9.7.
- ghc 9.10 / base 4.20 are now supported.
Docs
- Windows: added tips for setting `LEDGER_FILE` (Amadeusz Wieczorek, hledger_site#119)
- csv: if blocks: explain matchers and field names better [#2289]
- import: rewrite; rename "date skipping" to "overlap detection"
- import: added tips for first import
- assertions: mention their behaviour with posting status
- journal: rewrite the Tags section
- pager: note that `help -p TOPIC` uses less; link to less FAQ
- query types: updates, add headings, mention tag:'s infix matching
- Regular expressions: note possible RTL/bidi limitation (?)
- Special characters: rewrite, more precision, mention some Windows differences
- Output formats: expand, document beancount and FODS output
- Text output: expand/consolidate terminal topics
- FODS output: describe the advantages over CSV (Henning Thielemann)
- Debug output: note that the --debug option doesn't work in config files.
- bal: improve --layout doc
- bal: note that tree mode doesn't work in html output [#1846]
- bal: also mention hledger.css and text encoding in balance doc
- html: note safari text encoding issue
- timedot: mention the common journal+timedot file setup [#2238]
- Install, manual: new shell completions doc. [#986]
- Config files: rewrite [#2231]
- examples/csv: an example of YNAB 4 data, and RTL text, with a workaround
- examples: hledger2beancount.conf
Scripts/addons
- bin/*: remove obsolete _FLAGS markers from --help
- examples/csv/csv-hledger-1.py: a python-based CSV converter script
API
- Hledger.Utils.IO's ansi color helpers now respect the --color option.
- Hledger.Utils.IO.rgb' now takes Float arguments instead of Word8.
- Hledger.Cli.Commands.Balance: export budgetReportAs* functions, for use in scripts.
(Dmitry Astapov)
### hledger-ui 1.41
Breaking changes
- When built with ghc 9.10.1, error messages are displayed with two extra trailing newlines.
Fixes
- V (value) and C (cost) toggle keys once again reset each other as they should
(broken since 1.21).
(Gal Lakovnik Gorenec, [#2284])
- Bash shell completions are now up to date. [#986]
Features
Improvements
- Allow clipping depth to be configured per account (until adjusted in app, at least).
(Stephen Morgan, [#2292])
- Added helix as a supported editor for the `e` key. (amano.kenji)
- Added --pager and --color options as in hledger, affecting command line help. Also --color=no forces use of the "terminal" theme.
- Added a new `debug` build flag. Builds made with ghc 9.10+ and this flag will show some kind of partial stack trace if the program exits with an error. These will improve in future ghc versions.
- Disabled the unused `ghcdebug` build flag and ghc-debug support, for now.
- Allow megaparsec 9.7.
- Allow brick 2.5, 2.6.
- Avoid brick 2.3.2, which doesn't build on windows.
- ghc 9.10 / base 4.20 are now supported.
Docs
- Mention that period navigation uses standard periods [#2293]
- Install, manual: new shell completions doc. [#986]
### hledger-web 1.41
Breaking changes
- When built with ghc 9.10.1, error messages are displayed with two extra trailing newlines.
Fixes
- Autocompletions now work in newly created account fields. [#2215]
- Bash shell completions are now up to date. [#986]
Features
Improvements
- Added --pager and --color options as in hledger, affecting command line help.
- Added a new `debug` build flag. Builds made with ghc 9.10+ and this flag will show some kind of partial stack trace if the program exits with an error. These will improve in future ghc versions.
- Disabled the unused `ghcdebug` build flag and ghc-debug support, for now.
- allow megaparsec 9.7
- ghc 9.10 / base 4.20 are now supported.
Docs
- Install, manual: new shell completions doc. [#986]
### project changes 1.41
Docs
- REGRESSIONS: new table format; updates.
- CODE: notes on the use of haddock [#2222]
- Simplify github bug report template
- Add man pages and info manuals to the release bindists on github
Scripts/addons
- Fixed build errors in all bin/ scripts. (Dmitry Astapov)
- hledger-install: fix installation of hledger-ui
Infrastructure/Misc
- GHC 9.10 is now the default for dev builds and most github workflows.
- Add consistent greppable summaries to all workflows; various other improvements
- Add bash shell completion script to the release bindists ([#2223], gesh/hseg, Simon Michael)
- tools/gtree: -u shows untracked files, -I adds ignored files.
- just doctest: pass through doctest arg(s).
### credits 1.41
Simon Michael (@simonmichael),
Henning Thielemann (@thielema),
Dmitry Astapov (@adept),
Stephen Morgan (@Xitian9),
Bas van Dijk (@basvandijk),
Gal Lakovnik Gorenec,
amano.kenji,
gesh.
[#986]: https://github.com/simonmichael/hledger/issues/986
[#1846]: https://github.com/simonmichael/hledger/issues/1846
[#2215]: https://github.com/simonmichael/hledger/issues/2215
[#2222]: https://github.com/simonmichael/hledger/issues/2222
[#2223]: https://github.com/simonmichael/hledger/issues/2223
[#2225]: https://github.com/simonmichael/hledger/issues/2225
[#2231]: https://github.com/simonmichael/hledger/issues/2231
[#2238]: https://github.com/simonmichael/hledger/issues/2238
[#2254]: https://github.com/simonmichael/hledger/issues/2254
[#2280]: https://github.com/simonmichael/hledger/issues/2280
[#2281]: https://github.com/simonmichael/hledger/issues/2281
[#2284]: https://github.com/simonmichael/hledger/issues/2284
[#2287]: https://github.com/simonmichael/hledger/issues/2287
[#2289]: https://github.com/simonmichael/hledger/issues/2289
[#2292]: https://github.com/simonmichael/hledger/issues/2292
[#2293]: https://github.com/simonmichael/hledger/issues/2293
[#2295]: https://github.com/simonmichael/hledger/issues/2295
## 2024-09-09 hledger-1.40
**Config file support, sortable register, FODS output, prettier tables.**
@ -215,6 +530,7 @@ Victor Mihalache (@victormihalache).
## 2024-06-01 hledger-1.34
### hledger 1.34
@ -8932,3 +9248,5 @@ Release stats:
* Contributors: Simon Michael