Skip to content

1.22.1: breaks auto-deduced amounts of forecasted balance assertions #1638

Description

@nobodyinperson

Hi,

hledger-1.22.1 introduces a regression preventing auto-deduced amounts of forecasted balance assertions of being calculated.

How To Reproduce

Take this log.hledger file:

2021-09-01   Normal Balance Assertion Works
    Checking   = -60
    Costs

~ 2021-10-01       explicit forecasted assertion
    Checking      = -100
    Costs             40

~ 2021-10-02       auto-deduced forecasted assertion
    Checking      = -100
    Costs
# Works with v1.22
➤  hledger-1.22 reg -f log.hledger --forecast 
2021-09-01 Normal Balance Assertion Works          Checking                  -60           -60
                                                   Costs                      60             0
2021-10-01 explicit forecasted assertion           Checking                  -40           -40
                                                   Costs                      40             0
2021-10-02 auto-deduced forecasted assertion       Checking                    0             0
                                                   Costs                       0             0
# Doesn't work with v1.22.1
➤  hledger-1.22.1 reg -f log.hledger --forecast
hledger-1.22.1: "" (lines 1-1)
could not balance this transaction:
can't have more than one real posting with no amount
(remember to put two or more spaces between account and amount)
2021-10-02 auto-deduced forecasted assertion
    ; generated-transaction: ~ 2021-10-02
    Checking                 = -100
    Costs

CallStack (from HasCallStack):
  error, called at ./Hledger/Cli/Utils.hs:125:27 in hledger-1.22.1-inplace:Hledger.Cli.Utils

Is this intended? Auto-deduced amounts for forecasted balance assertions are really handy to say e.g. ”I'll move all of the money from that account to another one at that time”.

Platform: up-to-date Manjaro x86_64 with hledger 1.22 and 1.22.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.bountyThar's some kind o' loot on offer..journalThe journal file format, and its features.regressionA backwards step, indicating a weakness in our QA. We don't like these.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions