Skip to content

v0.24.0

Latest

Choose a tag to compare

@robcohen robcohen released this 06 Sep 21:51
0178f7f

⚠️ Breaking changes

Two, both in rledger extract. Both replace silence with an error, which is the point: each was a case where something you wrote, or failed to write, was ignored.

importers.toml rejects unknown keys (#2261)

An entry carrying a key the schema does not define now fails to parse instead of ignoring it.

[[importers]]
name = "card"
type = "ofx"          # this key is new and real (see below)
totaly_bogus = "x"    # this now errors instead of being ignored

Why: a silently ignored key is indistinguishable from a working one. Before this, type = "ofx" parsed fine and did nothing, which is exactly how the bug it fixes went unnoticed.

To migrate: if your config fails to parse, the error names the offending key. It was doing nothing before.

extract refuses an unconfigured liability import (#2263)

An OFX credit-card or line-of-credit statement, with no --account, no importers.toml entry and no --ledger profile, now errors instead of importing.

$ rledger extract card.qfx
error: this statement describes a liability account, but no account was configured
       so the default `Assets:Bank:Checking` would be used — every amount would
       carry the opposite sign

Why: the statement says which side of the balance sheet it is. Posting it to the Assets: default inverted the sign of every transaction and used an account you never named.

To migrate: name the account, with --account, an importers.toml entry, or an open directive plus --ledger. Naming one is always enough; only naming nothing is refused. Bank statements are unaffected.


Import improvements

The rest of this release came out of discussion #2126.

  • importers.toml can now configure the OFX importer at all (#2261). It previously could not: naming an entry forced the CSV parser onto the OFX file, and not naming one ignored the entry's account. Entries declare type = "csv" (default) or type = "ofx".

  • Importer profiles in the ledger (#2262). An open directive already states the account and its currency, so it can now state the importer too:

    2024-01-01 open Liabilities:CreditCard USD
      importer: "ofx"
      importer-pattern: "*.qfx"
    
    $ rledger extract card.qfx --ledger main.beancount

    Opt-in via --ledger; without it nothing changes.

  • A warning when a statement contradicts the configured account (#2259). OFX states whether it is a bank or credit-card statement; getting it wrong inverts every sign, so it is now said out loud.


What's Changed

  • fix(ci): move the flake vscode-extension check into the job that has nix by @robcohen in #2255
  • feat(ofx): warn when the statement contradicts the configured account by @robcohen in #2259
  • fix(extract): let importers.toml configure the OFX importer by @robcohen in #2261
  • feat(extract): importer profiles from open directive metadata by @robcohen in #2262
  • feat(extract): refuse an unconfigured liability import by @robcohen in #2263
  • chore: release v0.24.0 by @robcohen in #2265

Full Changelog: v0.23.0...v0.24.0

What's Changed

  • fix(ci): move the flake vscode-extension check into the job that has nix by @robcohen in #2255
  • feat(ofx): warn when the statement contradicts the configured account by @robcohen in #2259
  • fix(extract): let importers.toml configure the OFX importer by @robcohen in #2261
  • feat(extract): importer profiles from open directive metadata by @robcohen in #2262
  • feat(extract): refuse an unconfigured liability import by @robcohen in #2263
  • chore: release v0.24.0 by @robcohen in #2265

Full Changelog: v0.23.0...v0.24.0