Skip to content

0.4.9 contains a breaking change compared to 0.4.8 for preprocessors #1571

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

Closed
oberien opened this issue Jun 8, 2021 · 1 comment · Fixed by #1572
Closed

0.4.9 contains a breaking change compared to 0.4.8 for preprocessors #1571

oberien opened this issue Jun 8, 2021 · 1 comment · Fixed by #1572

Comments

@oberien
Copy link

oberien commented Jun 8, 2021

When using preprocessors, they should work if they are compiled for a semver-compatible mdbook version. However, if I compile a preprocessor using 0.4.8 and try to use it with 0.4.9, parsing stdin fails. This is due to the change in the commit c1b2bec. The __non_exhaustive field of Book was part of the json output passed to preprocessors:

[
  {processor-context...},
  {
    "sections": [...],
    "__non_exhaustive": null
  }
]

With c1b2bec, that field was removed and replaced with the #[non_exhaustive] annotation. Thus, the __non_exhaustive field isn't serialized anymore but still expected by preprocessors of earlier versions. Thus, 0.4.9 breaks all preprocessors compiled for 0.4.x where x < 9.

@oberien
Copy link
Author

oberien commented Jun 9, 2021

Thank you for the quick response and fix!

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 a pull request may close this issue.

1 participant