Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs for DOI #116

Merged
merged 2 commits into from
Jan 9, 2024
Merged

Fix docs for DOI #116

merged 2 commits into from
Jan 9, 2024

Conversation

DerDrodt
Copy link
Contributor

@DerDrodt DerDrodt commented Dec 15, 2023

src/lib.rs Outdated
@@ -354,6 +355,7 @@ macro_rules! entry {
struct MyVisitor;

#[derive(Deserialize)]
#[serde(deny_unknown_fields)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You proposed to warn instead in the original issue. I'm aware that we have no infrastructure for warnings at the moment, however, I do agree with you that we should try to stay forward-compatible and that denying parsing is too strict here. Would you be okay with removing this from the PR for now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want just the doc fixes in this PR and the warnings in another one or should I create warnings in this PR as well?

About warnings: I can certainly do that but I might not find the most elegant solutions and will most likely have to change the API in some parts.

Copy link
Member

@reknih reknih Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer separate PRs so we can land the docs changes sooner!

It would be great if you did. I think there are two possible designs: Returning a Result<(T, NonCriticalDiags[]), CriticalDiags[]> or passing a pointer to a tracer struct that contains the warnings (like Typst does: https://github.com/typst/typst/blob/c20b6ec6e157b753e90aa60ccd5b50f6f31cb7f6/crates/typst/src/lib.rs#L84).

@DerDrodt DerDrodt changed the title Fail on unknown fields and fix docs Fix docs for DOI Jan 9, 2024
@reknih reknih merged commit b1e5b30 into typst:main Jan 9, 2024
1 check passed
@reknih
Copy link
Member

reknih commented Jan 9, 2024

Thanks!

@DerDrodt DerDrodt deleted the fix-108 branch January 9, 2024 09:55
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.

DOI not available in CSL
3 participants