-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
The info
plugin does not includes inherited configurations
#6750
Comments
Oh, I forgot about that, I think I once said I will provide some hotfix 😓 So the current issues I know about are:
@squidfunk If you don't have any plans on tackling this issue over the next 1-2 weeks, I could attempt a fix and a PR. Is that acceptable? |
@kamilkrzyskow thanks for offering. I plan to fix it asap, but I'm currently too busy with #6307. We need to think a little deeper about this, because we now also have the projects plugin that can contain multiple nested MkDocs projects, so the entire approach of collecting all files that are visible to MkDocs might not have been the best idea, because we can't catch all of them with that approach: mkdocs-material/src/plugins/info/plugin.py Lines 122 to 125 in 25a663f
I'm thinking of collecting all files and blacklisting those we don't want to pack, like site packages (if using a venv in the same folder), I haven't started working on this, but if you like to, you're invited to do so! |
OK, then I shall see what I can do during the week and report back. |
@kamilkrzyskow did you manage to look into this? |
Oh, it's been 2 weeks already 👀, I missed both deadlines. Sorry about the delay @squidfunk.
The idea was supposed to be process all files in the This would support the best case scenario, where all files are children of Scenario 1 - All children/some/path/mkdocs.yml
/some/path/inherit.yml
/some/path/requirements.txt
/some/path/snippets/abbreviations.md
/some/path/mkdocs build and would also support the currently not supported scenario with nested config directory, as it's still a child of Scenario 2 - All children but with nested configs/some/path/configs/mkdocs.yml
/some/path/configs/inherit.yml
/some/path/requirements.txt
/some/path/snippets/abbreviations.md
/some/path/mkdocs build --config-file configs/mkdocs.yml However, I'm not sure how to handle a case where the Scenario 3 - Not all children/some/path/configs/mkdocs-1.yml
/some/path/configs/mkdocs-2.yml
/some/path/configs/inherit.yml
/some/path/requirements.txt
/some/path/globals/snippets/abbreviations.md
/some/path/output/mkdocs build --config-file ../configs/mkdocs-1.yml --site-dir site-1
So do I error message the user and ask them to run You mentioned handling snippets, I thought that handling files top to bottom would be enough to include them, but looking at Scenario 3 the user might store the snippets externally, As for excluding files, we could use https://github.com/github/gitignore/blob/main/Python.gitignore as reference and add some excluded cache files, I consider processing For users wanting more control, similarly to https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/options/#exclude we could allow to add their own excluded paths. So this is the current state of things, not looking great after 2 weeks 😓 |
I think we shouldn't rely on
Jup, because otherwise we loose files that are implicitly used, such as Snippets (used by the Snippets extension) or sources (used by mkdocstrings) + any cases I currently can't think of. Limiting inclusion to the files visible to MkDocs was quite naive of me, as we're missing out on too many cases, so we should depart from it. Additionally, packaging too much is not as severe as missing files for reproduction.
I haven't thought of the use cases where the MkDocs file is in a separate directory. I think the "config in subdirectory" case is rather rare, as the canonical recommended way is to put it at the top. Additionally, we demand minimal reproductions, which means the user can just change the structure for the reproduction (assuming the error doesn't lie within this very structure, but it is not recommended anyway).
It should be quite safe to assume that we won't have a
Yes, let's to that. I'd say we keep it as stupid and simple as possible:
The info plugin also shouldn't require us to add new dependencies, because everybody will install those dependencies on every download, which wastes time and resources – we need to keep the barrier as low as possible, and "just add |
Keeping open until released. |
Released as part of 9.5.13. @kamilkrzyskow I had to issue a release today due to a pretty severe path computation bug in the projects plugin. We're moving the improvements you're cooking up in #6874 to the next release. |
Context
No response
Bug description
When you create a report with the
info
plugin having aINHERIT
key in your Mkdocs configuration, the generated ZIP does not includes inherited configurations.Related links
Reproduction
Create a minimal example, generate your report building and check that the inherited configuration file is not added.
Steps to reproduce
mkdocs new .
mkdocs.yml
content by:parent.yml
file with the content:mkdocs build
Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: