Skip to content
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

Call mkdocs using -m #5542

Merged
merged 1 commit into from
Apr 2, 2019
Merged

Call mkdocs using -m #5542

merged 1 commit into from
Apr 2, 2019

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Mar 27, 2019

There are some cases were rtd uses the old installed version of mkdocs
instead of the one installed by the user, like in
#5532 (comment)

Which gives an error because it's using a yaml file
supported only in new mkdocs versions.

This is similar to #5107

There are some cases were rtd uses the old installed version of mkdocs
instead of the one installed by the user, like in
readthedocs#5532 (comment)

Which gives an error because it's using a yaml file
supported only in new mkdocs versions.

This is similar to readthedocs#5107
@stsewd
Copy link
Member Author

stsewd commented Mar 27, 2019

This was added since 0.15 mkdocs/mkdocs@bcb88ab#diff-872c8dbf5130934d0765867735f24482 (2015). So I think we are safe to use it.

@stsewd stsewd requested a review from a team March 27, 2019 01:32
@humitos
Copy link
Member

humitos commented Mar 27, 2019

What's the problem behind this PR and what's the solution? How does -m workaround this to make it work?

@stsewd
Copy link
Member Author

stsewd commented Mar 27, 2019

Is the description.

#5532 (comment) when a user uses system packages option, the call to mkdocs is incorrect/non-deterministic. Sometimes it calls to the mkdocs installled outside the virtualenv and sometimes to the mkdocs installed inside the virtualenv.

I'm guessing this also fixes the issue in the corporate site.

Calling using -m we make sure to always use the mkdocs version from the virtualenv

You can replicate this locally by setting the system packages option on a mkdocs project pinning to mkdocs >=1, some times it gives errors in the mkdocs.yml file and others not, trey building with cache and wipiing.

@stsewd
Copy link
Member Author

stsewd commented Mar 27, 2019

More details are in the other linked PR #5107

@humitos
Copy link
Member

humitos commented Mar 27, 2019

when a user uses system packages option, the call to mkdocs is incorrect/non-deterministic. Sometimes it calls to the mkdocs installled outside the virtualenv and sometimes to the mkdocs installed inside the virtualenv.

Calling using -m we make sure to always use the mkdocs version from the virtualenv

👍

Please, add this explanation as a comment in the code so it's clear next time we read that part of the code.

@stsewd
Copy link
Member Author

stsewd commented Mar 27, 2019

Well, we already use this form for all commands, except sphinx, it doesn't support -m

@humitos
Copy link
Member

humitos commented Mar 27, 2019

None of the other commands have a comment about the reason. Please, add the comment. It doesn't bother us at all and it will help all the contributors in the future.

@stsewd stsewd merged commit 1f9abe6 into readthedocs:master Apr 2, 2019
@stsewd stsewd deleted the fix-mkdocs-call branch April 2, 2019 16:08
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.

3 participants