sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.67k stars 98 forks source link

Trace messages not useful at whitespace #647

Open alerque opened 5 years ago

alerque commented 5 years ago

Warning messages that include a the first item of the trace by default are really cryptic when the error is actually in something the parser does in between commands (for example when leaving hmode because of a double newline).

./sile tests/bug-337.sil
This is SILE 0.9.5.1
<tests/bug-337.sil>

! Underfull frame: 279.0440485 extra space required but 1 stretchiness available at in "␤␤"
[1] [2] 

These traces probably need to include something about the next command because that would tell more about what the typesetter is doing.

simoncozens commented 5 years ago

Shouldn’t it also be giving line number / file name information?

Omikhleia commented 2 years ago

Since there has been lots of work from @alerque in 0.13-0.14 around traces and output messages, is this still applicable?

alerque commented 2 years ago

Unfortunately this is still relevant. I did a lot of work on traces and message formatting, but this particular issue is untouched.

When an implicit \par (two blank lines in a low) trigger a page break run and that run triggers an underful warning, the only location data we throw is "␤␤" without even a useful line number* It says something about line 1, but that's because that's where the \document opened and that's all the location we're giving.