Skip to content

Conversation

@jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Nov 27, 2025

Since the bootstrap implementation can contain bugs. See #132845 and #132875.

Instead, we use RUSTC_TEST_GIT_HASH env var that is directly set by CI, or by the user locally, to control when the tests/run-make/version-verbose-commit-hash gets run. Note that locally, setting RUSTC_TEST_GIT_HASH=1 only forces the test to run; the test will only pass if git hash is available, i.e. explicitly opt-in, or using a non-dev channel.

Fixes #132875.

r? ghost

try-job: aarch64-apple
try-job: test-various

@rustbot rustbot added A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Nov 27, 2025
@jieyouxu

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 27, 2025
Do not trust bootstrap about git hash availability

try-job: aarch64-apple
try-job: test-various
@rust-log-analyzer

This comment was marked as outdated.

@jieyouxu

This comment was marked as outdated.

@rust-bors

This comment was marked as resolved.

Since the bootstrap implementation can contain bugs.

Instead, we use `RUSTC_TEST_GIT_HASH` env var that is directly set by
CI, or by the user locally.
To always run `tests/run-make/version-verbose-commit-hash` in test jobs.
@jieyouxu jieyouxu force-pushed the git-hash-availability branch from 299c1fe to 39e27c1 Compare November 27, 2025 10:59
@jieyouxu
Copy link
Member Author

@bors try

rust-bors bot added a commit that referenced this pull request Nov 27, 2025
Do not trust bootstrap about git hash availability

try-job: aarch64-apple
try-job: test-various
@rust-bors

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- directives::tests::git_hash stdout end ----
---- directives::tests::families stdout ----

thread 'directives::tests::families' (181636) panicked at src/tools/compiletest/src/lib.rs:376:14:
`RUSTC_TEST_GIT_HASH` must be set under CI environments
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/panicking.rs:80:14
---
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- directives::tests::ignore_arch stdout end ----
---- directives::tests::asm_support stdout ----

thread 'directives::tests::asm_support' (181574) panicked at src/tools/compiletest/src/lib.rs:376:14:
`RUSTC_TEST_GIT_HASH` must be set under CI environments
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/panicking.rs:80:14
---
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- directives::tests::ignore_target stdout end ----
---- directives::tests::ignore_coverage stdout ----

thread 'directives::tests::ignore_coverage' (181719) panicked at src/tools/compiletest/src/lib.rs:376:14:
`RUSTC_TEST_GIT_HASH` must be set under CI environments
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/panicking.rs:80:14
---
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- directives::tests::llvm_version stdout end ----
---- directives::tests::is_big_endian stdout ----

thread 'directives::tests::is_big_endian' (181721) panicked at src/tools/compiletest/src/lib.rs:376:14:
`RUSTC_TEST_GIT_HASH` must be set under CI environments
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/panicking.rs:80:14
---
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- directives::tests::is_big_endian stdout end ----
---- directives::tests::matches_os stdout ----

thread 'directives::tests::matches_os' (181751) panicked at src/tools/compiletest/src/lib.rs:376:14:
`RUSTC_TEST_GIT_HASH` must be set under CI environments
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/panicking.rs:80:14
---
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- directives::tests::matches_os stdout end ----
---- directives::tests::matches_env stdout ----

thread 'directives::tests::matches_env' (181748) panicked at src/tools/compiletest/src/lib.rs:376:14:
`RUSTC_TEST_GIT_HASH` must be set under CI environments
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/3b4dd9bf1410f8da6329baa36ce5e37673cbbd1f/library/core/src/panicking.rs:80:14

@rust-bors
Copy link

rust-bors bot commented Nov 27, 2025

☀️ Try build successful (CI)
Build commit: 8523b25 (8523b250b8a0af9b70f36e2f1a9bfc84176e5e43, parent: 7b9905edb4df3aeaabd0d6cd0d4c09b183d7d965)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The run-make/version-verbose-commit-hash test doesn't reliably detect when the commit hash is missing

3 participants