ANN: hledger-1.12

Skip to first unread message

Simon Michael

Dec 3, 2018, 6:09:05 PM12/3/18
to hledger, haskell-cafe
hledger is a robust, cross-platform plain text accounting tool, for
tracking money, time, stocks, cryptocurrencies or any other commodity,
using double-entry accounting, private or shared plain text files,
revision control, and command-line, curses or web UIs.
Find out more at and

I'm pleased to announce the release of hledger 1.12!
Thank you release contributors Alex Chen, Jesse Rosenthal, Samuel May,
Mykola Orliuk, Peter Simons, Moritz Kiefer, Dmitry Astapov, Felix Yan,
Aiken Cairncross, and Nikhil Jha.

After two years of regular quarter-end releases, I am speeding up
hledger's release cadence: we now aim to release every 1-3 months, as
needed or wanted, with our normal release window being the first few
days of each month.

Release notes (

hledger 1.12

* install script: ensure a new-enough version of stack; more informative output

* build with GHC 8.6/base-4.12 (Peter Simons)

* add required upper bound for statistics (Samuel May)

* --anon anonymises more thoroughly (including linked original postings) (Moritz Kiefer)

* unbalanced transaction errors now include location info (Mykola Orliuk)

* accounts command: --drop also affects the default flat output, without needing an explicit --flat flag

* accounts command: the --codes flag has been dropped

* accounts command: filtering by non-account-name queries now works

* add command: fix transaction rendering regression during data entry and in journal file

* balance command: fix wrongful eliding of zero-balance parent accounts in tree mode (Dmitry Astapov)

* journal format, bs/bse/cf/is commands: account directives can declare account types (#877)
Previously you had to use one of the standard english account names
(assets, liabilities..) for top-level accounts, if you wanted them to
appear in the right place in the balancesheet, balancesheetequity,
cashflow or incomestatement reports.

Now you can use your preferred account names, and use account directives
to declare which accounting class (Asset, Liability, Equity, Revenue or
eXpense) an account (and its subaccounts) belongs to, by writing one of
the letters A, L, E, R, X after the account name, after two or more
spaces. This syntax may change (see issue). Experimental.

Currently we allow unlimited account type declarations anywhere in the
account tree. So you could declare a liability account somewhere under
assets, and maybe a revenue account under that, and another asset account
even further down. In such cases you start to see oddities like accounts
appearing in multiple places in a tree-mode report. I have left it this
way for now in case it helps with, eg, modelling contra accounts, or
combining multiple files each with their own account type
declarations. (In that scenario, if we only allowed type declarations on
top-level accounts, or only allowed a single account of each type,
complications seem likely.)

* journal format: periodic transaction rules now require a double space separator.
In periodic transaction rules which specify a transaction description or
same-line transaction comment, this must be separated from the period
expression by two or more spaces, to prevent ambiguous parsing. Eg
this will parse correctly as "monthly" thanks to the double space:

~ monthly In 2020 we'll end this monthly transaction.

* journal format: exact/complete balance assertions (Samuel May).
A stronger kind of balance assertion, written with a double equals sign,
asserts an account's complete account balance, not just the balance in
one commodity. (But only if it is a single-commodity balance, for now.)

(a) A 1
(a) B 1
(a) 0 = A 1 ; commodity A balance assertion, succeeds
(a) 0 == A 1 ; complete balance assertion, fails

* journal format: account directives now allow whitespace or a comment after the account name

* journal format: using ~ for home directory in include directives now works (#896) (Mykola Orliuk)

* journal format: prevent misleading parse error messages with cyclic include directives (#853) (Alex Chen)

* journal format: transaction modifier multipliers handle total-priced amounts correctly (#928).
Multipliers (*N) in transaction modifier rules did not multiply
total-priced amounts properly. Now the total prices are also multiplied,
keeping the transaction balanced.

* journal format: do amount inference/balance assignments/assertions before transaction modifiers (#893, #908) (Jesse Rosenthal)
Previously, transaction modifier (auto postings) rules were applied
before missing amounts were inferred. This meant amount multipliers could
generate too many missing-amount postings, making the transaction
unbalanceable (#893).

Now, missing amount inference (and balance assignments, and balance
assertions, which are interdependent) are done earlier, before
transaction modifier rules are applied (#900, #903).

Also, we now disallow the combination of balance assignments and
transaction modifier rules which both affect the same account, which
could otherwise cause confusing balance assertion failures (#912).
(Because assignments now generate amounts to satisfy balance assertions
before transaction modifier rules are applied (#908).)

* journal format: periodic transaction rules are now aware of Y default year directives. (#892)
Ie when a default year Y is in effect, they resolve partial or relative
dates using Y/1/1 as the reference date, rather than today's date.

hledger-ui 1.12

* fix "Any" build error with GHC < 8.4

* error screen: always show error position properly (#904) (Mykola Orliuk)

* accounts screen: show correct balances when there's only periodic transactions

* drop the --status-toggles flag

* periodic transactions and transaction modifiers are always enabled.
Rule-based transactions and postings are always generated
(--forecast and --auto are always on).

* escape key resets to flat mode.
Flat mode is the default at startup. Probably it should reset to tree
mode if --tree was used at startup.

* tree mode tweaks: add --tree/-T/-F flags, make flat mode the default,
toggle tree mode with T, ensure a visible effect on register screen

* hide future txns by default, add --future flag, toggle with F.
You may have transactions dated later than today, perhaps piped from
print --forecast or recorded in the journal, which you don't want to
see except when forecasting.

By default, we now hide future transactions, showing "today's balance".
This can be toggled with the F key, which is easier than setting a
date query. --present and --future flags have been added to set the
initial mode.

(Experimental. Interactions with date queries have not been explored.)

* quick help tweaks; try to show most useful info first

* reorganise help dialog, fit content into 80x25 again

* styling tweaks; cyan/blue -> white/yellow

* less noisy styling in horizontal borders (#838)

* register screen: positive amounts: green -> black
The green/red scheme helped distinguish the changes column from the
black/red balance column, but the default green is hard to read on
the pale background in some terminals. Also the changes column is
non-bold now.

Getting started:

All install methods are described at .
You can download windows binaries, or use a package manager, though in
some cases these will install an older hledger version.

You can build the latest hledger packages with stack:

$ stack install --resolver=lts-12 megaparsec-7.0.4
cassava-megaparsec-2.0.0 config-ini- hledger-lib-1.12
hledger-1.12 [hledger-ui-1.12] [hledger-web-1.12] [hledger-api-1.12]

or with cabal:

$ cabal update && cabal install hledger-1.12 [hledger-ui-1.12]
[hledger-web-1.12] [hledger-api-1.12]

or with the hledger installer, on systems with bash installed
(handy if you don't have a working stack or cabal):

$ curl -s >
$ less # satisfy yourself that the script is safe
$ bash

Some commands to try:

$ hledger add # record some transactions, with guidance
$ hledger print # show recorded transactions
$ hledger balance # show totals by account
$ hledger -h # show quick help
$ hledger # list available commands
$ hledger help # list built-in manuals

To get oriented, see the tutorials and manuals at ;
say hello and ask questions in the #hledger IRC channel on Freenode,
accessible at .
New users and contributors are always welcome!


Robert Nielsen

Dec 5, 2018, 4:17:48 PM12/5/18
to hledger
I believe that I have identified a problem with the option to use bash to install. I have copied some of the output in case that's helpful. Please let me know if I can provide any additional details:

Installing hledger-interest

Trying stack install --install-ghc --resolver=lts-12 hledger-interest-1.5.3 hledger-lib-1.12 cassava-megaparsec-2.0.0 config-ini- easytest-0.2.1 megaparsec-7.0.2 --verbosity=info

Selected resolver: lts-12.21

Preparing to install GHC to an isolated location.

This will not interfere with any system-level installation.

Already downloaded.                

Configuring GHC ...                                                            

Received ExitFailure 77 when running

Raw command: /Users/robert/.stack/programs/x86_64-osx/ghc-8.4.4.temp/ghc-8.4.4/configure --prefix=/Users/robert/.stack/programs/x86_64-osx/ghc-8.4.4/

Run from: /Users/robert/.stack/programs/x86_64-osx/ghc-8.4.4.temp/ghc-8.4.4/

Install status after:

hledger 1.11.1 is installed at /Users/robert/.local/bin/hledger

hledger-ui 1.11.1 is installed at /Users/robert/.local/bin/hledger-ui

hledger-web 1.11.1 is installed at /Users/robert/.local/bin/hledger-web

hledger-api 1.11.1 is installed at /Users/robert/.local/bin/hledger-api

hledger-diff is installed at /Users/robert/.local/bin/hledger-diff

hledger-iadd 1.3.6 is installed at /Users/robert/.local/bin/hledger-iadd

hledger-interest 1.5.2 is installed at /Users/robert/.local/bin/hledger-interest is not found

Thank you!


Simon Michael

Dec 6, 2018, 3:57:35 PM12/6/18
to hledger
Thanks for the report. I don't have any ideas, does anybody know what ExitFailure 77 means ?

You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Robert Nielsen

Dec 7, 2018, 6:14:47 PM12/7/18
to hledger
I was happy to do a search for "ExitFailure 77." One link I found says that it's related to Haskell:

However, both the above links mention Windows, and my installation is on a Mac, so I am not sure if they apply.


Robert Nielsen

Dec 15, 2018, 9:01:24 AM12/15/18
to hledger

Below is a description of what did and didn't work on my Mac.

I had tried a number of things that didn't work. For example, I tried to update via stack, but the end result was that hledger was still in the previous version. It occurred to me that brew might work, even though the option wasn't mentioned on the hledger page showing the install options. Even though brew spun its wheels and tried mightily, just like stack, it, too, failed.

Time to do some more searching on the internet. One of the error messages I had recived was:

Configuring GHC ...
Received ExitFailure 77 when running

This led me to a page where someone reported a similar problem and who was asked what happened when they ran the gcc command. So, I tried running the command and received the message:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

In the back of my mind, this sounded familiar, but, who knows? So, the next step was to find out how to install xcrun. One more search turned up the instructions to run:

$ xcode-select --install

This installation went fine, so I tried the bash command once again, and after some patient waiting, hledger 1.12 is now successfully installed.

Here is the irony. Previously, I mentioned that I thought that the message about the missing xcrun sounded familiar. I did a search of this forum and was reminded that I had experienced the same problem upgrading to hledger 1.5 with brew. Apparently, something happens with Mac OS upgrades which results in my having to reinstall xcrun.

The end result is that I am glad to have hledger 1.12 running, and my thanks to everyone who worked on this latest version!


Simon Michael

Dec 16, 2018, 8:17:21 PM12/16/18
to hledger
Glad you figured it out Robert!

I see other reports of ExitFailure 77. Can we say that it's caused by not having latest command line developer tools installed on mac ?

Robert Nielsen

Dec 17, 2018, 9:29:32 PM12/17/18
to hledger
My knowledge of this isn't good enough to say definitively, but I would at least say it's the first thing that I would suspect.


Reply all
Reply to author
0 new messages