ANN: hledger-1.11 released

42 views
Skip to first unread message

Simon Michael

unread,
Oct 1, 2018, 2:46:53 AM10/1/18
to hledger, haskell-cafe
Short announcement this quarter. Pleased to announce the release of hledger 1.11 on schedule! 

Thanks to release contributors Joseph Weston, Dmitry Astapov, Gaith Hallak, Jakub Zárybnický, Luca Molteni, and SpicyCat.

stack users will need to get a copy of hledger source and do stack install from there, due to the recent GHC 8.6 release. cabal install hledger-1.11 should work normally. 

hledger 1.11

  • The default display order of accounts is now influenced by the order of account directives. Accounts declared by account directives are displayed first (top-most), in declaration order, followed by undeclared accounts in alphabetical order. Numeric account codes are no longer used, and are ignored and considered deprecated.

    So if your accounts are displaying in a weird order after upgrading, and you want them alphabetical like before, just sort your account directives alphabetically.

  • Account sorting (by name, by declaration, by amount) is now more robust and supported consistently by all commands (accounts, balance, bs..) in all modes (tree & flat, tabular & non-tabular).

  • close: new –opening/–closing flags to print only the opening or closing transaction

  • files: a new command to list included files

  • prices: query arguments are now supported. Prices can be filtered by date, and postings providing transaction prices can also be filtered.

  • rewrite: help clarifies relation to print –auto (#745)

  • roi: a new command to compute return on investment, based on hledger-irr

  • test: has more verbose output, more informative failure messages, and no longer tries to read the journal

  • csv: We use a more robust CSV lib (cassava) and now support non-comma separators, eg –separator ‘;’ (experimental, this flag will probably become a CSV rule) (#829)

  • csv: interpolated field names in values are now properly case insensitive, so this works:

    fields …,Transaction_Date,… date %Transaction_Date

  • journal: D (default commodity) directives no longer break multiplier amounts in transaction modifiers (AKA automated postings) (#860)

  • journal: “Automated Postings” have been renamed to “Transaction Modifiers”.

  • journal: transaction comments in transaction modifier rules are now parsed correctly. (#745)

  • journal: when include files form a cycle, we give an error instead of hanging.

  • upper-case day/month names in period expressions no longer give an error (#847, #852)


Robert Nielsen

unread,
Oct 1, 2018, 7:48:50 AM10/1/18
to hledger
Thank you, and when I tried updating on my PC, it was unusuccessful. I first ran

curl -O https://raw.githubusercontent.com/simonmichael/hledger/master/hledger-install/hledger-install.sh

and then I ran

bash hledger-install.sh

I copied some, but not all, of the error messages below from the second command:

Installing hledger-web
using stack Version 1.6.5 x86_64 hpack-0.20.0
Trying stack install --install-ghc --resolver=lts-12 hledger-web-1.11 hledger-1.11 hledger-lib-1.11 --verbosity=info
Selected resolver: lts-12.11
Unable to load cabal files for snapshot

----
Deleting cached snapshot file: /Users/robert/.stack/build-plan/lts-12.11.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/lts-haskell/issues/new
----

Unable to parse cabal file for bhoogle-0.1.3.5@sha256:a3393794b22faabeb564c57f4a9506390b6b97b9792c6b4e130f15bf116099fd,1806: NoParse "license" 7
Failed to install hledger-web-1.11 hledger-1.11 hledger-lib-1.11

Installing hledger-api
using stack Version 1.6.5 x86_64 hpack-0.20.0
Trying stack install --install-ghc --resolver=lts-12 hledger-api-1.11 hledger-1.11 hledger-lib-1.11 --verbosity=info
Selected resolver: lts-12.11
Unable to load cabal files for snapshot

----
Deleting cached snapshot file: /Users/robert/.stack/build-plan/lts-12.11.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/lts-haskell/issues/new
----

Unable to parse cabal file for bhoogle-0.1.3.5@sha256:a3393794b22faabeb564c57f4a9506390b6b97b9792c6b4e130f15bf116099fd,1806: NoParse "license" 7
Failed to install hledger-api-1.11 hledger-1.11 hledger-lib-1.11

Installing hledger-iadd
using stack Version 1.6.5 x86_64 hpack-0.20.0
Trying stack install --install-ghc --resolver=lts-12 hledger-iadd-1.3.6 hledger-lib-1.11 --verbosity=info
Selected resolver: lts-12.11
Unable to load cabal files for snapshot

----
Deleting cached snapshot file: /Users/robert/.stack/build-plan/lts-12.11.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/lts-haskell/issues/new
----

Unable to parse cabal file for bhoogle-0.1.3.5@sha256:a3393794b22faabeb564c57f4a9506390b6b97b9792c6b4e130f15bf116099fd,1806: NoParse "license" 7
Failed to install hledger-iadd-1.3.6 hledger-lib-1.11

Simon Michael

unread,
Oct 1, 2018, 4:09:12 PM10/1/18
to hledger
Thanks for the testing. I have make hledger-install ensure a new-enough version of stack, it should work better if you try again.

Simon Michael

unread,
Oct 1, 2018, 6:35:45 PM10/1/18
to hledger, haskell-cafe
Corrections:

http://hledger.org has been updated with the latest install methods.

- hledger-install.sh now ensures a new-enough stack.

- stack users don't need to fetch hledger source, but do need to specify an extra dep on the command line, eg like so: 
stack install --resolver=lts-12 cassava-megaparsec-1.0.0 hledger-lib-1.11 hledger-1.11 hledger-ui-1.11 hledger-web-1.11 hledger-api-1.11

Robert Nielsen

unread,
Oct 1, 2018, 7:52:24 PM10/1/18
to hledger
Thank you, and I would be very glad for some additional assistance. With the command

bash hledger-install.sh

I am receiving messages including the ones below, and hledger is reporting it is still at 1.10.

Unable to parse cabal file for bhoogle-0.1.3.5@sha256:a3393794b22faabeb564c57f4a9506390b6b97b9792c6b4e130f15bf116099fd,1806: NoParse "license" 7

Failed to install hledger-ui-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0

Installing hledger-web
Installing stack
Stack has been installed to: /Users/robert/.local/bin/stack
NOTE: You may need to run 'xcode-select --install' to set
up the Xcode command-line tools, which Stack uses.

using stack Version 1.6.5 x86_64 hpack-0.20.0

Trying stack install --install-ghc --resolver=lts-12 hledger-web-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0 --verbosity=info


Selected resolver: lts-12.11
Unable to load cabal files for snapshot

----
Deleting cached snapshot file: /Users/robert/.stack/build-plan/lts-12.11.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/lts-haskell/issues/new
----

Unable to parse cabal file for bhoogle-0.1.3.5@sha256:a3393794b22faabeb564c57f4a9506390b6b97b9792c6b4e130f15bf116099fd,1806: NoParse "license" 7

Failed to install hledger-web-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0

Installing hledger-api
Installing stack
Stack has been installed to: /Users/robert/.local/bin/stack
NOTE: You may need to run 'xcode-select --install' to set
up the Xcode command-line tools, which Stack uses.

using stack Version 1.6.5 x86_64 hpack-0.20.0

Trying stack install --install-ghc --resolver=lts-12 hledger-api-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0 --verbosity=info


Selected resolver: lts-12.11
Unable to load cabal files for snapshot

----
Deleting cached snapshot file: /Users/robert/.stack/build-plan/lts-12.11.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/lts-haskell/issues/new
----

Unable to parse cabal file for bhoogle-0.1.3.5@sha256:a3393794b22faabeb564c57f4a9506390b6b97b9792c6b4e130f15bf116099fd,1806: NoParse "license" 7

Failed to install hledger-api-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0

Simon Michael

unread,
Oct 1, 2018, 8:36:09 PM10/1/18
to hledger
Hi Robert, thanks for following up. Let me check:

- did you download a new copy of hledger-install.sh ? (You need to)
- if so, can you paste the first 30 lines or so of your terminal session - the commands you typed, and the first 30 lines of output, copy/pasted exactly.

Thanks!
> --
> 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 hledger+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Robert Nielsen

unread,
Oct 1, 2018, 9:46:06 PM10/1/18
to hledger
I very much appreciate your help!

I hadn't downloaded the most recent version of ledger-install.sh. I created a new version (more on that in just a second), ran the command, and then got the output copied below.

Also, I am sure there is a shortcut for downloading the most recent version of ledger-install.sh, but I took the long way and copied the text of the file on Github saving it via my text editor. For future people reading this, perhaps you could mention the shortcut in case someone else runs into the same problem?


==================Begin Output:
hledger-install.sh 20181001 Mon Oct 1 21:36:56 EDT 2018
System info:
Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64
Install status before:
hledger 1.10 is installed at /Users/robert/.local/bin/hledger
hledger-ui 1.10 is installed at /Users/robert/.local/bin/hledger-ui
hledger-web 1.10 is installed at /Users/robert/.local/bin/hledger-web
hledger-api 1.10 is installed at /Users/robert/.local/bin/hledger-api
hledger-diff 0.2.0.14 is installed at /Users/robert/.local/bin/hledger-diff
hledger-iadd 1.3.5 is installed at /Users/robert/.local/bin/hledger-iadd
hledger-interest 1.5.2 is installed at /Users/robert/.local/bin/hledger-interest
hledger-install.sh is not found
stack 1.6.5 is installed at /usr/local/bin/stack
cabal 2.2.0.0 2.2.0.0 is installed at /usr/local/bin/cabal
----------
Installing hledger


Installing stack
Stack has been installed to: /Users/robert/.local/bin/stack
NOTE: You may need to run 'xcode-select --install' to set
up the Xcode command-line tools, which Stack uses.

using stack Version 1.6.5 x86_64 hpack-0.20.0

Trying stack install --install-ghc --resolver=lts-12 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0 --verbosity=info
Failed to install hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0

Installing hledger-ui


Installing stack
Stack has been installed to: /Users/robert/.local/bin/stack
NOTE: You may need to run 'xcode-select --install' to set
up the Xcode command-line tools, which Stack uses.

using stack Version 1.6.5 x86_64 hpack-0.20.0

Trying stack install --install-ghc --resolver=lts-12 hledger-ui-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0 --verbosity=info


Failed to install hledger-ui-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0

Installing hledger-web
Installing stack
Stack has been installed to: /Users/robert/.local/bin/stack
NOTE: You may need to run 'xcode-select --install' to set
up the Xcode command-line tools, which Stack uses.

using stack Version 1.6.5 x86_64 hpack-0.20.0
Trying stack install --install-ghc --resolver=lts-12 hledger-web-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0 --verbosity=info

Failed to install hledger-web-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0

Installing hledger-api
Installing stack
Stack has been installed to: /Users/robert/.local/bin/stack
NOTE: You may need to run 'xcode-select --install' to set
up the Xcode command-line tools, which Stack uses.

using stack Version 1.6.5 x86_64 hpack-0.20.0
Trying stack install --install-ghc --resolver=lts-12 hledger-api-1.11 hledger-1.11 hledger-lib-1.11 cassava-megaparsec-1.0.0 --verbosity=info

Simon Michael

unread,
Oct 1, 2018, 10:40:49 PM10/1/18
to hledger
Thanks Robert, that's perfect.

On Oct 1, 2018, at 3:46 PM, Robert Nielsen <niels...@gmail.com> wrote:
I hadn't downloaded the most recent version of ledger-install.sh. I created a new version (more on that in just a second), ran the command, and then got the output copied below.

Also, I am sure there is a shortcut for downloading the most recent version of ledger-install.sh, but I took the long way and copied the text of the file on Github saving it via my text editor. For future people reading this, perhaps you could mention the shortcut in case someone else runs into the same problem?


==================Begin Output:
hledger-install.sh 20181001 Mon Oct  1 21:36:56 EDT 2018
System info:
Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64
Install status before:
hledger 1.10 is installed at /Users/robert/.local/bin/hledger
hledger-ui 1.10 is installed at /Users/robert/.local/bin/hledger-ui
hledger-web 1.10 is installed at /Users/robert/.local/bin/hledger-web
hledger-api 1.10 is installed at /Users/robert/.local/bin/hledger-api
hledger-diff 0.2.0.14 is installed at /Users/robert/.local/bin/hledger-diff
hledger-iadd 1.3.5 is installed at /Users/robert/.local/bin/hledger-iadd
hledger-interest 1.5.2 is installed at /Users/robert/.local/bin/hledger-interest
hledger-install.sh is not found

I think I see the problem. stack 1.6.5 is at /usr/local/bin:

stack 1.6.5 is installed at /usr/local/bin/stack
cabal 2.2.0.0 2.2.0.0 is installed at /usr/local/bin/cabal
----------
Installing hledger

1.6 is too old, so we install the latest (1.7.1):

Installing stack

to the usual place, ~/.local/bin:

Stack has been installed to: /Users/robert/.local/bin/stack
NOTE: You may need to run 'xcode-select --install' to set
     up the Xcode command-line tools, which Stack uses.


Unfortunately this is still preempted by the old stack:

using stack Version 1.6.5 x86_64 hpack-0.20.0

because /usr/local/bin comes before ~/.local/bin in $PATH (or the latter is not in $PATH at all).

I'll think about a robust way to avoid this (all: ideas welcome). For right now, you should probably just remove /usr/local/bin/stack so you can move forward.

Thanks again.


Simon Michael

unread,
Oct 1, 2018, 10:43:07 PM10/1/18
to hledger
Ie:

$ rm /usr/local/bin/stack
$ bash hledger-install.sh



Robert Nielsen

unread,
Oct 2, 2018, 5:37:31 PM10/2/18
to hledger
Success! hledger is reporting version 1.11 installed. Thank you, again.

Rob

Simon Michael

unread,
Oct 5, 2018, 5:11:44 PM10/5/18
to hledger
For the record, I've updated hledger-install.sh to warn when a too-old stack is shadowing the new one just installed. Rather than try to figure out where the new one is (which can vary), it now just exits with a message like:

  Error: an older stack (1.6) is first in $PATH, shadowing the new version.
Please delete or rename /usr/local/bin/stack and run hledger-install again.
Seems to work here.

André Fincato

unread,
Oct 6, 2018, 12:25:53 PM10/6/18
to hle...@googlegroups.com
Hi Simon!

I upgraded to the latest hledger version the other day, and got to use it for the first time today: when hledger suggest a similar transaction, it now displays a lot of “garbage” (looks like hledger querying for the suggested transaction) in the suggestion field, see screenshot.

What can I do? I upgrade with the bash script from the website, and had no error log that I remember during the building of the new version.


Thanks,
André


Simon Michael

unread,
Oct 6, 2018, 3:44:58 PM10/6/18
to hledger
Yikes. Thanks for the bug report, I have released 1.11.1 with this (and https://github.com/simonmichael/hledger/issues/884) fixed.



On Oct 6, 2018, at 6:25 AM, André Fincato <an...@andrefincato.info> wrote:

Hi Simon!

I upgraded to the latest hledger version the other day, and got to use it for the first time today: when hledger suggest a similar transaction, it now displays a lot of “garbage” (looks like hledger querying for the suggested transaction) in the suggestion field, see screenshot.

What can I do? I upgrade with the bash script from the website, and had no error log that I remember during the building of the new version.


Thanks,
André

<Screen Shot 2018-10-06 at 18.11.08.png>

André Fincato

unread,
Oct 11, 2018, 5:10:23 AM10/11/18
to hle...@googlegroups.com
I confirm that it works now!


af
Reply all
Reply to author
Forward
0 new messages