Skip to content

test: return target-libdir in rustc cache-miss mock - #2885

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
weihanglo:fix-rustc-mock-target-libdir
Oct 7, 2026
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
weihanglo:fix-rustc-mock-target-libdir

Conversation

@weihanglo

Copy link
Copy Markdown
Contributor

#2852 changed how the compiler detection works. Now it requests both sysroot and target-libdir. We need to adjust the mock rustc accordingly.

This should fix the CI failure in https://github.com/mozilla/sccache/actions/runs/37596909346/job/112711671349.

Expand to see failures

---- server::tests::daemon_mode_rmeta_notification_delivery_on_rustc_miss stdout ----
[2026-10-07T08:56:15Z DEBUG sccache::compiler::compiler] Using rustc at path: "/tmp/sccache_testlQ0jel/rustc"
[2026-10-07T08:56:15Z DEBUG sccache::server] check_compiler: Unsupported compiler: rustc didn't print a target-libdir

thread 'server::tests::daemon_mode_rmeta_notification_delivery_on_rustc_miss' (8361) panicked at src/server.rs:2759:22:
unexpected response: Compile(UnsupportedCompiler("rustc didn't print a target-libdir"))
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: sccache::server::tests::compile_body
   3: sccache::server::tests::daemon_mode_rmeta_notification_delivery_on_rustc_miss
   4: sccache::server::tests::daemon_mode_rmeta_notification_delivery_on_rustc_miss::{closure#0}
   5: <sccache::server::tests::daemon_mode_rmeta_notification_delivery_on_rustc_miss::{closure#0} as core::ops::function::FnOnce<()>>::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

---- server::tests::client_side_mode_rmeta_notification_delivery_on_rustc_miss stdout ----
[2026-10-07T08:56:15Z DEBUG sccache::compiler::compiler] Using rustc at path: "/tmp/sccache_testVykQEK/rustc"
[2026-10-07T08:56:15Z DEBUG sccache::server] check_compiler: Unsupported compiler: rustc didn't print a target-libdir

thread 'server::tests::client_side_mode_rmeta_notification_delivery_on_rustc_miss' (8360) panicked at src/server.rs:2803:33:
compile started
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: <core::option::Option<sccache::protocol::CompileFinished>>::expect
   4: sccache::server::tests::client_side_mode_rmeta_notification_delivery_on_rustc_miss
   5: sccache::server::tests::client_side_mode_rmeta_notification_delivery_on_rustc_miss::{closure#0}
   6: <sccache::server::tests::client_side_mode_rmeta_notification_delivery_on_rustc_miss::{closure#0} as core::ops::function::FnOnce<()>>::call_once

🤖 LLM disclosure: code change was fully generated by LLM.

Compiler detection requests both sysroot and target-libdir. Return both
lines so the daemon and client-side rmeta notification tests reach
compilation.
@codecov-commenter

codecov-commenter commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.57%. Comparing base (0ed8ff0) to head (c20e681).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2885       +/-   ##
===========================================
+ Coverage   27.87%   77.57%   +49.70%     
===========================================
  Files          71       72        +1     
  Lines       38079    41409     +3330     
===========================================
+ Hits        10614    32124    +21510     
+ Misses      27465     9285    -18180     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@weihanglo
weihanglo marked this pull request as ready for review October 7, 2026 14:44
@sylvestre
sylvestre merged commit eb55704 into mozilla:main Oct 7, 2026
51 checks passed
@sylvestre

Copy link
Copy Markdown
Collaborator

Thanks for your PR

@weihanglo
weihanglo deleted the fix-rustc-mock-target-libdir branch October 7, 2026 19:40
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