Happy to raise or remove the limit in v2 if you want.
On Wed, Aug 2, 2023 at 8:48 PM Daniele Nicolodi <[email protected]> wrote: > On 02/08/23 11:43, Stefano Zacchiroli wrote: > > Heya, I'm hitting this error in the beancount v2 C parser (quoting from > > beancount/parser/tokens.c): > > > > if (lines > LONG_STRING_LINES_MAX) { > > PyErr_Format(PyExc_ValueError, "String too long (%d lines)", > lines); > > free(unescaped); > > return NULL; > > } > > > > What's the reason for that test/check? > > The idea is to detect instances where the user forgot a closing quote. > However, for how a beancount ledger is usually structured, it is very > hard to hit the line count limit before the ledger contains an unrelated > quote character that get interpreted as the closing quote. > > IIRC I wanted to remove the check when I restructured the parser, but > Martin wanted to keep it. The compromise was to set the line count limit > to a relatively large number, 64, which makes hitting the limit in case > of a syntax error even less likely, and thus the check less useful. > Lately the limit as been increased again to 256, but a version of > beancount with the limit raised has not been released yet. The limit in > v3 is still there and set to 256. > > Probably installing v2 from source solves your immediate need, but I > think we should just remove the limit. > > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/00ac805b-1f2a-e934-3ae3-1865c803b5cf%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhNNuDjKUjhpjuoLGy9do_O6%2BqykT5aRgA%2BjM5Ge%3DNweYg%40mail.gmail.com.
