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
Treacherous multi-currency auto-inference #758
Comments
Personal opinion, this is the correct behavior. The default should apply to any unannotated value. Maybe we could implement some kind of warnings for this instead? |
Oh I didn't explain clearly the issue I was thinking of. I do think the default should apply to any unannotated unit indeed. The issue I was considering is actually larger than this example: I think the following shouldn't balance (for the reason mentioned above of being treacherous in some cases):
BTW, another example was raised on IRC by @aszlig: intuitively, the market price is what would be used to balance such transactions (the fact that the manual states it's not what is done being in my humble opinion irrelevant to the fact that it's unintuitive). So this could lead to people writing such a transaction and thinking “oh alright I've bought it at market price”, not noticing the price was actually inferred and not verified in any way. |
Thanks for the feedback. +1 catchy issue name! Re your last point, Ledger does the opposite of what you find intuitive above - it infers a new market price from a transaction like that. I found this hard to learn and tried to simplify it by making a clear distinction between (one-time, fixed) transaction prices and (ambient, fluctuating) market prices. I do think you should bring this up on the mail list as well, as most users won't see this, and changing the long-established behaviour needs wider discussion. |
See also: #1177. |
Ever since 0f18378 we now have a way of addressing this. Calling hledger with |
With eg. the following ledger file:
The transaction is balanced to be $3 / -3€. Which sounds treacherous to me.
I think auto-inference could be straight-out removed, as the previous example could be rewritten with the more error-free:
What do you think about it?
The text was updated successfully, but these errors were encountered: