Skip to content

compat: install plugins after MkDocs NG, as users do - #124

Merged
shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-8gce4u
Nov 1, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-8gce4u

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

The compatibility matrix installed each plugin together with MkDocs NG and then reinstalled MkDocs NG last, so its files always won over the upstream mkdocs package that plugins pull in. That hid the install-order bug fixed in #115: a plain pip install mkdocs-ng mkdocs-material ran upstream 1.6.1, while the matrix reported 30/30.

Now MkDocs NG is installed first and the plugin after it, with no reinstall. Each case also checks that both import mkdocs and the mkdocs launcher report MkDocs NG's version. The build itself still runs as python -m mkdocs build, so cases that import a module from the site directory (mkdocs-click) keep working.

The workflow now also runs when the import hook changes (mkdocs_ng/, mkdocs_ng.pth, mkdocs_ng.start).

To check that the new test catches the bug, I pointed the ng engine at mkdocs-ng==1.9.0 from PyPI. The mkdocs-redirects case then errors with import mkdocs: expected mkdocs 1.9.0, got '1.6.1'. On this branch, all 30 cases pass on both engines.

Related Issue

Follow-up to #115.

Checklist

  • New tests added for new behavior (if applicable)
  • Documentation updated (CONTRIBUTING.md describes the install order)
  • Release notes docs/about/release-notes.md updated (if applicable). Not needed: this only changes CI.

Generated by Claude Code

The matrix installed each plugin together with MkDocs NG and then
reinstalled MkDocs NG last, so its files always won over the upstream
`mkdocs` package that plugins pull in. That hid the install-order bug
fixed in #115: `pip install mkdocs-ng mkdocs-material` ran upstream
1.6.1.

Now MkDocs NG is installed first and the plugin after it, with no
reinstall, and each case checks that both `import mkdocs` and the
`mkdocs` launcher report MkDocs NG's version. With mkdocs-ng 1.9.0 from
PyPI the mkdocs-redirects case now errors with "import mkdocs: expected
mkdocs 1.9.0, got '1.6.1'"; on this checkout all 30 cases pass.

The workflow also runs when the import hook (mkdocs_ng/, mkdocs_ng.pth,
mkdocs_ng.start) changes.
@shenxianpeng shenxianpeng self-assigned this Nov 1, 2026
@shenxianpeng
shenxianpeng merged commit 56ef1a4 into main Nov 1, 2026
23 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-8gce4u branch November 1, 2026 09:45
@shenxianpeng shenxianpeng mentioned this pull request Nov 1, 2026
2 of 3 tasks
@codspeed

codspeed Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 28 untouched benchmarks


Comparing claude/project-thread-8gce4u (36fa531) with main (9641bf8)

Open in CodSpeed

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.

1 participant