twilco / beancount

Rust tooling surrounding beancount, a text-based double-entry bookkeeping language.
59 stars 12 forks source link

Further verification #43

Open ThomasdenH opened 4 years ago

ThomasdenH commented 4 years ago

I'm thinking of how to proceed with further verification done by beancount. For example the balancing of transactions.

Beancount manipulates transactions during parsing, for example it fills empty postings and collects options. It would be nice to uphold these invariants in some way and pass them to things like plugins. At the same time, these constructs can't be used to reconstruct the original beancount file.

So, there is good reason to have two parallel systems of types publically exposed, while at the same time that can be confusing. I don't really have a good idea on how to solve it at the moment. Maybe there is sufficient overlap and additions akin to IncompletePosting will be enough.

ThomasdenH commented 4 years ago

So, the differences are at least:

Another question is; where would this functionality reside? Is this part of the parser crate?

ThomasdenH commented 4 years ago

Reading the beancount v3 document, this exact issue is brought up. Apparently v2 doesn't handle this well at the moment so there will be a switch to use explicit types there as well. Furthermore, beancount will use protobufs to interface with other code, which should make things like compliance testing very easy.