Repository navigation
Add a plugin compatibility matrix - #118
Merged
Merged
Conversation
Build a small site with each of 30 popular plugins, themes and Markdown extensions from the catalog, once on upstream MkDocs 1.6.1 and once on this checkout, and fail when a plugin builds on upstream but not here. This is the safety net for the 2.0 work: every engine change can now show it does not break the plugins people depend on. - compat/cases.yaml: one case per plugin, ranked by catalog score - compat/__main__.py: runner (uv venv per case and engine, strict build) - .github/workflows/compat.yml: runs on PRs touching mkdocs/, weekly, and on demand, and posts the table to the job summary - hatch env `compat` and a CONTRIBUTING.md section
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a compatibility matrix that builds a small site with each of 30 popular plugins, themes and Markdown extensions, once on upstream MkDocs 1.6.1 and once on this checkout. It fails when a plugin builds on upstream but not here.
This is the safety net for the 2.0 work. "Your plugins keep working" is the main promise of 2.0, and this lets every engine change (incremental builds, caching, dropping deprecated config) show that it keeps that promise. Performance is already covered by the CodSpeed benchmarks.
What's in it
compat/cases.yaml: one case per plugin, taken from the top of the catalog by project score. Each case sets the plugin's config and the files it needs, for example a Material blog post, an mkdocstrings module, a Jupyter notebook or a gen-files script. Projects that cannot build offline are skipped: they clone repositories, call the GitHub API or need system PDF libraries.compat/__main__.py: the runner. For each case and engine it creates a fresh venv with uv and runsmkdocs buildwithstrict: true. Before building, it checks thatimport mkdocsgives the expected version. This matters because plugins pull in the upstreammkdocsdistribution, so the runner reinstalls this checkout last. The check works with today's layout and with Install the mkdocs package out of upstream MkDocs' way #115..github/workflows/compat.yml: runs on PRs and pushes that touchmkdocs/,compat/orpyproject.toml, weekly to catch new plugin releases, and on demand. It writes the table to the job summary.hatch run compat:run, plus a short section inCONTRIBUTING.md.First results
All 30 cases pass on both engines, and a full run takes about 1 minute with 8 jobs.
¹ Only checks that the extension loads, because rendering needs a diagram server.
To check that a failure is reported, I renamed
BasePlugininmkdocs/plugins.pylocally. The redirects case was then marked regression and the command exited with status 1.Related Issue
Part of the serve and build performance work tracked in #59. This is the safety net to have in place before optimizing.
Checklist
docs/about/release-notes.mdupdated (if applicable): not needed, since this is contributor tooling with no user-facing changeGenerated by Claude Code