On Wed, Jul 19, 2023 at 11:45 AM Daniele Nicolodi <dani...@grinta.net> wrote:
> On 19/07/23 19:11, Eric Altendorf wrote: > > Do you know where in the code this was getting checked and dropped? > > It should be here > > https://github.com/beancount/beancount/blob/193645460fd7aafcb3d9e0359edabc21e389db81/beancount/core/position.py#L64-L104 > > > I'm encountering a similar problem with trying to set a {USD} marker > > CostSpec, as the workaround for transferring cost basis through account > > tranfsers, as described here: > > https://github.com/beancount/beancount/issues/476 > > Reading the code above, serializing a CostSpec with a currency but no > unit or total cost does not seem to be supported. If there is an use > case for this, the serialization function needs to be patched. > Excellent, thank you! I can patch this locally so I can make progress. I know Martin is busy this week, but after he's back, I'll leave it up to him whether it makes sense to do this patch in general, and/or to address https://github.com/beancount/beancount/issues/481 Either way, silent dropping of data in serialization seems like something that might be good to address -- if there are self-consistency rules for the Position data structure, we might want to enforce those at construction time, as you suggested. > > Cheers, > Dan > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beancount+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/430dc956-7186-d485-52a2-68edf3f1f56e%40grinta.net > . > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAFXPr0vANk%2B-HBCkujCBKuWZ9%2BnZu06vGknckyYkw91VzFWvNQ%40mail.gmail.com.