-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Autoupdate man page rev/date info upon git-archive #34254
Autoupdate man page rev/date info upon git-archive #34254
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This didn't seems good enough. A released version of rustc should not use a hash rev I think. Maybe something like |
@reeze: suggestion how to do that? |
There seems no way to auto update the version. but I think we could use a shell to get the current version when trying to generate |
|
The version number is set in the makefiles (specifically Beyond the scope of this PR, the state of the man page has bothered me any time I run across it. It needs some love. Putting the current version in there is a good start: it was definitely updated since 1.2. Additionally it could also use an audit (if all information in there is still accurate) and update (it's likely missing stuff). |
To get version numbers in our releases the template will need to be filled in by our build system - the tarballs produced by git and published by github are incomplete and not used for any purpose. The general outline of how to do this would be:
The version number is in mk/main.mk as CFG_RELEASE. The date is not, though perhaps we can just change the manfiles to not include the date. |
r? @brson (bot must have missed this) |
Triage: my previous comments still stand. The approach here needs to be elaborated further. |
☔ The latest upstream changes (presumably #35407) made this pull request unmergeable. Please resolve the merge conflicts. |
@sanmai-NL Using |
@brson: I'm weighing the options a bit before proceeding. What about using some very small standard CPython 2/3 code? I have some code ready for placeholder substitution (fully using their standard library). Advantage would be a reduced platform dependency compared to |
@sanmai-NL I'm fine with Python 2. The script would go in |
With python you have to be careful to invoke the correct one using the |
Closing due to inactivity, but feel free to resubmit with a rebase! |
See #25689, in particular this comment
r? @brson
This PR ensures that version-related references in man pages coming with ‘non-working copies’ of the source tree are kept in sync automatically. For copies created with
git archive
, including tagged releases (as probably consumed by packagers), the bottom line of the man pages forrustc
andrustdoc
will automatically read something like inman
:Instead of (at Rust 1.9.0):
This solution isn't dependent on manual creation of man pages; that can be reconsidered and this trick can be reused or replaced with whatever future means of autoproduction of man pages. In my view, being precise and current in docs also encourages keeping them current, and increases user confidence that they are indeed reliable and current.
A limitation of the solution is that it doesn't translate the git revision and date to some more readily understood ‘discrete’ tag, such as a version triple. This is AFAICT only possible when you bundle such documentation as an extra release artifact built and added automatically upon tagging. I've done that before for another project, but that must be agreed on first ...