-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustdoc --version --verbose
no longer displays commit hashes + date since beta 1.67
#107094
Comments
it's weird because the info is still displayed correctly in the very first oneliner-summary, but if there was some tool that reads the data by looking at |
This appears to have been introduced by #104184. The issue is that the macro uses CFG_VER_DATE/CFG_VER_HASH which is only set when compiling rustc. One option is to try to share some code with |
Mentoring instructions: set Lines 792 to 794 in 4e163af
Line 235 in 7c3f0d6
(Maybe we should try to unify those functions so they don't duplicate so much code and problems like this don't happen in the future?) |
I think it should be possible to write a run-make test ensuring this works properly. |
@rustbot claim |
Hi @zephaniahong! im starting my journey of contributing to Rust, i found this issue a good starter for myself, do you think you would be open to let me take this chance to get familiar with the code base? |
@anth0nyleung Hey! Go for it!🤗 |
Alternatively, you could check out #108111. I THINK that might be more straightforward. But I'll let you decide(: |
@rustbot claim |
I tried doing this change in tool.rs
Then i did a
But it appears that the commit-hash and commit-date is still unknown. Im wondering if the issue is that
This is my first time making changes and testing in this project, please feel free to correct me if im testing / building in the wrong way. |
@anth0nyleung I'd suggest changing rust/compiler/rustc_driver_impl/src/lib.rs Lines 702 to 705 in ae5473c
env! instead of option_env so it's easier to tell when these variables are unset without having to build a full stage 2 compiler.
|
Retagging as stable/stable regression, this already shipped in 1.67 as far as I can tell. |
@anth0nyleung Are you still (interested in) working on this issue? I'd like to claim it otherwise. |
@duckymirror please go ahead and claim it! |
@rustbot claim |
This should fix issue rust-lang#107094.
…larsan68 Set commit information environment variables when building tools This fixes rust-lang#107094. ~I'm trying to add a regression test for this issue.~ **Update**: I've added a test and a new test header `needs-git-hash` which makes sure it doesn't run when commit hashes are ignored (`bootstrap`'s `ignore-git` option).
…larsan68 Set commit information environment variables when building tools This fixes rust-lang#107094. ~I'm trying to add a regression test for this issue.~ **Update**: I've added a test and a new test header `needs-git-hash` which makes sure it doesn't run when commit hashes are ignored (`bootstrap`'s `ignore-git` option).
stable is fine:
~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustdoc --version --verbose
but beta and nightly are no longer showing commit-hash and commit-date information:
~/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/bin/rustdoc --version --verbose
~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustdoc --version --verbose
The text was updated successfully, but these errors were encountered: