Skip to content

Downgrade missing references and citations from errors to warning - #4974

Closed
laurmaedje wants to merge 5 commits into
mainfrom
ref-cite-warn
Closed

laurmaedje wants to merge 5 commits into
mainfrom
ref-cite-warn

Conversation

@laurmaedje

@laurmaedje laurmaedje commented Sep 17, 2024 •

Copy link
Copy Markdown
Member

Closes #4035

Both unresolved references and citations now result in warnings rather than errors. In the document, they are rendered in red, raw text.

// Warning: label `<earth>` does not exist in the document
Earth is a planet. @earth

image

Notably, references to duplicate labels are still an error.

Given this change, is becomes even more important that we prevent warning spam, so that important warnings like this one stand out. There are some ideas to have different importance for various warnings (for instance, by demoting less important warnings that do not have adverse affects on the document to a "lint" level), but that's still in-flux. In the web app, we might add a confirmation dialogue before downloading a PDF with outstanding warnings (but not with lints) in the future.

@PgBiel

PgBiel commented Sep 17, 2024 •

Copy link
Copy Markdown
Contributor

I feel like adding warning levels (or equivalent) first is more important (or, at least, should ship together), considering the following:

  1. I don't think the majority of users would want to force missing references to be displayed (would rather be notified about it and stop compilation), which implies this feature should be opt-in instead of opt-out in some way (e.g. a confirmation in the web app, a flag in the CLI, and so on);

  2. With the upcoming deprecation warnings and others, warning spam will invariably increase in the next update, making this one easy to miss, and I'd say missing references are a larger problem for a document and something that the user should certainly at least be made aware of, much like other errors.

  3. Once it is made a warning, it'd become a breaking change to block compilation in any way in the future.

Imho we should tackle this first before merging this feature. I don't think it is urgent enough to skip this discussion.

@laurmaedje

Copy link
Copy Markdown
Member Author

I've talked to @reknih. While I would have liked to get this through, I could just as well see the roles being reversed and me arguing your point, so I'll close this for now.

@laurmaedje laurmaedje closed this Sep 17, 2024
@Enivex

Enivex commented Sep 17, 2024 •

Copy link
Copy Markdown
Collaborator
  1. I don't think the majority of users would want to force missing references to be displayed (would rather be notified about it and stop compilation), which implies this feature should be opt-in instead of opt-out in some way (e.g. a confirmation in the web app, a flag in the CLI, and so on);

I have the exact opposite impression. The majority would rather have references be a warning, without blocking compilation.

@PgBiel

PgBiel commented Sep 17, 2024

Copy link
Copy Markdown
Contributor

Thanks for the input; I'll respond in the issue to keep the discussion organized.

@laurmaedje
laurmaedje deleted the ref-cite-warn branch November 2, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downgrade missing references from errors to warning

3 participants