-
-
Notifications
You must be signed in to change notification settings - Fork 325
imp: add: Verify balance assertions on each posting (#2355) #2356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thanks for this! We should try to explore and document how this differs from the behaviour of balance assertions when reading a journal. I think it must be at least a little different, if immediate feedback is desirable (and I agree that it is). Here are some things to check:
|
Sorry for letting this languish for a bit! Some other projects have consumed me. I'm happy to review/document all of this, and will try to do it later this week or early next week. |
(Let's ignore that it's taken me three weeks to resurface....) Doing all of this definitely revealed some bugs! I'll explore fixing them, just wanted to get them documented first:
|
Thanks for the update -
I think we can usually ignore that case - there's no way to write it in journal format. (Explicitly written posting amounts are always single-commodity.) Re posting dates etc, we like to be flexible but we can impose restrictions for sanity, if needed. |
As requested in #2355, this verifies balance assertions during
hledger add
. Here's an example of the new workflow. With the following journal file:The only thing that might be odd here is including the "To troubleshoot..." lines. I left those in because it's not bad advice for tracking down why an assertion might be failing, but also it isn't really helpful and might be misleading in the middle of an
hledger add
, so I'm open to removing those lines here.