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
Warn users if they are using an old/different version #640
Comments
I actually think this is becoming more important. Otherwise multiple users could end up deploying the same docs with different MkDocs versions. For example, Alice is working on Project X and installed MkDocs six months ago. Then Bob joins the project and installs MkDocs today when he wants to deploy the documentation, he gets a more recent version than Alice did. Now when they deploy the documentation, the deployed docs will switch between the old and new version - possibly adding or removing bugs and features. |
Given that we include the MkDocs version in the git commit message we could use that information to warn about using older versions than a previous deploy. |
Ah, so you are suggesting that the What happens when doth Alice and Bob upgrade? Should they still get the warning the first time they deploy? Or should the warning only issue for Alice before she upgrades? In order words, should we allow newer versions to deploy silently but warn on older versions, or should we always warn on mismatched versions? This is what is not clear to me. |
Good question. I am not sure. I am not sure I even like the idea in general. I guess we should allow newer versions - otherwise that could be annoying. Although, if it is just a warning, that would be fine. So, how about:
|
That works for me. I like the "info" message on a newer version. |
One problem with the proposal is that the "message" is configurable. Yes, the default message includes the MkDocs version, but users can override that with anything they want. I suppose this could be configured to only work if a version string is found in the message (if the previous commit does not include a version, then skip the check). Then we could warn users that if they want the check to be performed then their custom messages needs to conform to some pattern. We already call |
For the record, a few ways to get the most recent message are:
With Note that To reference a branch other than the branch of the working tree, use
|
pip has a nice feature where they warn users if they are using an old version and prompt them to update. I think it would be neat to add something like this. The code they use for it is here: https://github.com/pypa/pip/blob/7.0.3/pip/utils/outdated.py#L95
The text was updated successfully, but these errors were encountered: