Repository navigation
compat: install plugins after MkDocs NG, as users do - #124
Merged
Merged
Conversation
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.
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.
The compatibility matrix installed each plugin together with MkDocs NG and then reinstalled MkDocs NG last, so its files always won over the upstream
mkdocspackage that plugins pull in. That hid the install-order bug fixed in #115: a plainpip install mkdocs-ng mkdocs-materialran 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 mkdocsand themkdocslauncher report MkDocs NG's version. The build itself still runs aspython -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.0from PyPI. The mkdocs-redirects case then errors withimport 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
docs/about/release-notes.mdupdated (if applicable). Not needed: this only changes CI.Generated by Claude Code