Skip to content

1.31

Compare
Choose a tag to compare
@simonmichael simonmichael released this 03 Sep 08:12
· 775 commits to master since this release
1.31

Release notes (https://hledger.org/release-notes.html#hledger-1-31)

More tolerant equity/cost matching; print amounts in original style; multi-pivot.

hledger 1.31

Features

  • Multi-pivot: the --pivot option now accepts multiple arguments,
    colon-delimited, to construct account names from multiple fields.
    (#2050, Eric Mertens)

Improvements

  • The print command now more closely replicates the original journal
    amount styles, which is helpful when round-tripping / cleaning up
    journal files:

    • Amounts in conversion transactions could be displayed rounded to a
      lower precision; this no longer happens.
      (#2079)

    • Amounts could be displayed with extra zeros after the decimal mark;
      this no longer happens.

    • Amounts could display with a different precision if the journal
      included a timedot file; this no longer happens.

    • Costs in balance assertions were not displayed with standard
      styles like other amounts; now they are.

    • Zero amounts were always shown as just "0"; now they are shown
      with their original commodity symbol and style. (And if an
      inferred amount has multiple zeros in different commodities, a
      posting is displayed for each of these.)

  • print no longer displays numbers with a single digit group mark
    and no decimal mark, which are ambiguous and hard to re-parse. Now
    if a number has digit group marks the decimal mark will always be
    shown also. Eg 1,000 (where the comma is a thousands separator)
    is now shown as 1,000..

  • The check command's
    balancedwithautoconversion and balancednoautoconversion checks
    have been renamed to autobalanced and balanced.

  • hledger check recentassertions now reports failures 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.

    Also, the suggested sample balance assertion now uses the same
    commodity symbol as in the failing posting (the first, if there are
    more than one); and, no longer includes a cleared mark.

  • The import command now shows the file path being imported to.

  • With --pivot, desc is now the preferred spelling for pivoting on
    description.

  • The demo command now ignores an invalid journal file, like the other
    HELP commands.

  • Debug output for equity conversion postings has been improved,
    making troubleshooting easier.

  • Allow aeson 2.2, megaparsec 9.5.

Fixes

  • In journal files, valid multicommodity transactions where the
    matching non-equity postings can't be auto-detected are no longer
    considered an error (as they were in hledger 1.29 and 1.30). Now,
    such transactions are accepted, and --infer-cost has no effect on
    them. This is similar to the behaviour of --cost, --infer-equity,
    and --infer-market-prices. (#2045)

  • In journal files, equity conversion postings are now detected more
    tolerantly, using the same precision as the conversion posting's
    amount (#2041). Eg, the following transaction is now accepted:

    2023-01-01
        Assets               -84.01 USD @ 2.495 GEL
          ; ^ 209.60495 GEL, recognised as a match for the 209.60 below
        Equity:Conversion     84.01 USD
        Equity:Conversion   -209.60 GEL
        Assets               209.60 GEL
    
  • The roi command now reports TWR per period and overall TWR for
    multi-period reports.
    (#2068, Dmitry Astapov)

  • The commands list no longer shows bar when hledger-bar is not installed (#2065),
    and had a few other cleanups.

hledger-ui 1.31

Improvements

  • Allow megaparsec 9.5

hledger-web 1.31

Improvements

  • Allow aeson 2.2, megaparsec 9.5

project changes 1.31

Scripts/addons

  • ft, tt shell scripts for collecting financial and time reports

  • A justfile implementation of ft and tt

Examples

  • self-tracking

  • RPG ledger (Eric Mertens)

Docs

Infrastructure

  • tools, CI: checkembeddedfiles, checkversions

  • Shake: avoid making empty commits

  • make functest-PAT: runs a subset of functional tests

  • 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 arybczak/ghc-tags#6 for more
    information.
    (Jonathan Dowland)

credits 1.31

Simon Michael,
Dmitry Astapov,
Eric Mertens,
Jay Neubrand,
Jonathan Dowland.

Install

At https://hledger.org/install, binary packages should be available for this release within a few days (look for green badges).

Or, you can build from source as described there, after cloning at tag 1.31:
git clone https://github.com/simonmichael/hledger --depth 1 -b 1.31

Or, if under "Assets" below there are release binaries suitable for your OS and hardware, you can use those.

Here are platform-specific instructions for the release binaries.
(You can copy & paste each block of commands as a unit to save time.):

GNU/Linux on 64-bit Intel

At the command line,

cd /usr/local/bin
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.31/hledger-linux-x64.zip   # can rerun if interrupted
unzip hledger-linux-x64.zip; tar xvf hledger-linux-x64.tar; rm hledger-linux-x64.{zip,tar}        # github workaround, preserves permissions
cd -
hledger --version  # should show the new version
touch $HOME/.hledger.journal   # ensure a default journal file exists

Mac on 64-bit Intel

In a terminal window,

cd /usr/local/bin
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.31/hledger-mac-x64.zip
unzip hledger-mac-x64.zip; tar xvf hledger-mac-x64.tar; rm hledger-mac-x64.{zip,tar}              # github workaround, preserves permissions
open .
# for the hledger, hledger-ui, hledger-web icons: right-click, Open, confirm it's ok to run
cd -
hledger --version  # should show the new version
touch $HOME/.hledger.journal   # ensure a default journal file exists

Windows 64-bit Intel (or ARM, using emulation)

In a powershell window (press Windows-r, type powershell, press enter),

  1. Make a place to keep hledger binaries, and add it to your PATH; this makes running hledger easier. You only need to do this once, not for every release:
mkdir -force $HOME\bin >$null
$ENV:PATH += ";"+$HOME+"\bin"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User)
  1. Download and install the release binaries:
cd $HOME\bin
curl https://github.com/simonmichael/hledger/releases/download/1.31/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip
Expand-Archive hledger-windows-x64.zip -DestinationPath .
rm hledger-windows-x64.zip
cd $HOME
hledger --version           # should show the new version
  1. Ensure a default journal file exists, and without a problematic encoding.
    (Not sure why "ascii" is needed here - hledger likes utf8 and understands utf8 BOM headers..
    but the state of our unicode support on Windows
    is really unknown, your input welcome.)
out-file -append -encoding ascii $HOME/.hledger.journal

Once that journal file exists, you can start hledger-web by double-clicking on the icon if you wish.

Windows 7 on 64-bit Intel

  • click hledger-windows-x64.zip below
  • choose Open with Windows Explorer, OK
  • click Extract all files
  • choose a destination folder - ideally one that appears in echo %PATH%, like C:\Windows (though that one will require administrator permission); otherwise, your home directory (C:\Users\YOURNAME)
  • check "Show extracted files when complete"
  • click Extract, wait for the destination folder to open
  • find the hledger, hledger-web icons (if you extracted to \Windows, you'll need to scroll down)
  • for each icon: double-click, uncheck "Always ask before opening this file", click Run
  • close those Explorer windows
  • open a command window (press Windows-r, type CMD, press enter)
  • hledger --version should show the new version
  • echo # >> .hledger.journal to ensure a default journal file exists. (Important: the doubled >> is needed to avoid overwriting existing data.)

Problems:

  • Starting hledger by double-clicking its icon won't work because it needs arguments; run it from the command window instead.
  • Starting hledger-web by double-clicking its icon may fail eg because Explorer's command window is too small;
    configure that to be larger, or run hledger-web from a command window instead.
  • hledger or hledger-web may fail to run if there is not enough memory available.

Next steps