Skip to content

Add a plugin compatibility matrix - #118

Merged
shenxianpeng merged 1 commit into
mainfrom
compat-plugin-matrix
Oct 31, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
compat-plugin-matrix

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

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 runs mkdocs build with strict: true. Before building, it checks that import mkdocs gives the expected version. This matters because plugins pull in the upstream mkdocs distribution, 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 touch mkdocs/, compat/ or pyproject.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 in CONTRIBUTING.md.

First results

All 30 cases pass on both engines, and a full run takes about 1 minute with 8 jobs.

Plugin MkDocs 1.6.1 mkdocs-ng
mkdocs-material, mkdocstrings-python, pymdown-extensions, macros, git-revision-date-localized, glightbox, mike, redirects, techdocs-core, plantuml-markdown¹, mkdocs-jupyter, rss, markdown-exec, git-authors, include-markdown, mermaid2, minify, monorepo, awesome-nav, encryptcontent, bibtex, cinder, kroki¹, static-i18n, mkdocs-click, swagger-ui-tag, neoteroi-mkdocs, gen-files, literate-nav, autorefs 30/30 30/30

¹ Only checks that the extension loads, because rendering needs a diagram server.

To check that a failure is reported, I renamed BasePlugin in mkdocs/plugins.py locally. 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

  • New tests added for new behavior (if applicable)
  • Documentation updated (if applicable)
  • Release notes docs/about/release-notes.md updated (if applicable): not needed, since this is contributor tooling with no user-facing change

Generated by Claude Code

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
@shenxianpeng shenxianpeng self-assigned this Oct 30, 2026
@codspeed

codspeed Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 28 untouched benchmarks


Comparing compat-plugin-matrix (af42672) with main (e4b3f29)

Open in CodSpeed

@shenxianpeng shenxianpeng added the enhancement New feature or request label Oct 31, 2026
@shenxianpeng
shenxianpeng merged commit 348d9d9 into main Oct 31, 2026
24 checks passed
@shenxianpeng
shenxianpeng deleted the compat-plugin-matrix branch October 31, 2026 19:32
This was referenced Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants