Rethink compile failure UX: simple generic fallback, separate preset-specific summaries #70
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/preview.nvim#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The current compile failure UX is trying to do too much in one place, and it is producing misleading summaries for LaTeX in particular.
Concrete examples from testing tonight:
EmergencCollected error summary (may duplicate other messages):Running 'pdflatex -file-line-error ...'because it contains the substringerrorI think this needs to be split into two explicitly separate problems.
First, the generic layer should be minimal, simple, and reliable. It should not try to be clever. Out of the box, a compile failure should never render an empty string. The generic behavior should just canonicalize available process output into a short, non-empty preview snippet and make the full raw output accessible to users. In other words, keep the default summary boring and correct, and make the underlying compiler output easy to inspect.
Second, the preset-specific layer should be handled separately. That is where smarter summaries belong. For example, LaTeX almost certainly needs custom handling for wrapped messages and latexmk/pdflatex output shape. The same is likely true for other presets with their own output formats. This part is inherently more complex and should not be conflated with the generic fallback.
Suggested direction:
Important scope note: both the generic layer and the preset-specific layer need work, but they should be fixed independently.
Also worth calling out explicitly: the preset-specific side will require manual testing across every built-in preset. This is not something we can safely treat as a purely abstract parser refactor. We should expect to literally test failing inputs and output rendering for each preset/configuration to make sure the summaries are actually better in practice.
A useful reference point here is VimTeX: it keeps the generic failure message simple, relies on structured parsing for LaTeX-specific detail, and exposes raw output / quickfix when parsing is insufficient. preview.nvim probably wants a similarly clean separation of responsibilities.