Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2814 +/- ##
==========================================
+ Coverage 76.32% 77.30% +0.97%
==========================================
Files 72 73 +1
Lines 40180 40986 +806
==========================================
+ Hits 30668 31683 +1015
+ Misses 9512 9303 -209 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bd21c42 to
019a7c1
Compare
| bencher.bench(|| black_box(strip_basedirs(black_box(&output), black_box(&basedirs)))); | ||
| } | ||
|
|
||
| #[divan::bench(args = [0, 1, 8, 32])] |
There was a problem hiding this comment.
please add the benchmark in a different pr
There was a problem hiding this comment.
Done, thank you for the comment. PR here for ref: #2838
fbe281c to
a528aca
Compare
| use crate::config::PreprocessorCacheModeConfig; | ||
| use crate::errors::*; | ||
|
|
||
| struct BasedirsStorage { |
There was a problem hiding this comment.
150 lines of forwarding just to carry a Vec<Vec>, and the day someone adds a method to Storage it will silently bypass this wrapper. could we pass the basedirs next to the storage into generate_hash_key instead?
| &cmd, | ||
| Command::StartServer | Command::InternalStartServer | Command::ShowStats(_, _) | ||
| ) { | ||
| Config::load_with_file_basedirs()? |
There was a problem hiding this comment.
hardcoding the command list here is fragile. if the daemon only uses the file value and client-side gets it from the handshake, is the env branch in config_from_env still used at all?
| digest.update(replacement); | ||
| } | ||
|
|
||
| fn encode_rust_value(value: &OsStr) -> &[u8] { |
There was a problem hiding this comment.
do we need this wrapper? as_encoded_bytes() reads fine on its own.
| return Ok(self.storage.clone()); | ||
| }; | ||
|
|
||
| let basedirs = config::parse_basedirs_env(value)?; |
There was a problem hiding this comment.
a relative value here makes handle_compile return Err, so the whole compile dies instead of falling back to the real compiler. what does the user actually see? and please add a test for it, it's in the PR description but not covered.
|
this patch is a bit too large to my taste, sorry |
Merging this PR will degrade performance by 10.82%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | time_macro_finder_chunked |
862.8 µs | 1,026.4 µs | -15.93% |
| ❌ | Simulation | time_macro_finder_no_macros |
2.9 ms | 3 ms | -5.39% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing tcashel:codex/request-scoped-basedirs (a528aca) with main (0f9467c)
Footnotes
-
6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
hi, this one can't be merged as it is:
|
|
Heads up from the Firefox side: with basedirs covering two checkouts, preprocessor cache mode can already return an object compiled against the other checkout's headers (#2863). I reproduced it on 0.18.0 by building checkout A, stopping the server, then building checkout B with a header changed. Right now that's partly limited because the server's startup basedirs win. Per-request basedirs would make it easier to hit, so it'd be good if this didn't land before a fix like #2868. In the meantime we're turning off Firefox's default SCCACHE_BASEDIRS for local builds (https://bugzilla.mozilla.org/show_bug.cgi?id=2086340). |
|
no news since my last ping, closing. reopen whenever you want to continue, thanks |
One sccache daemon currently captures
SCCACHE_BASEDIRSat startup, requiring a restart when another worktree needs a different root. This lets each compile request override the file-configured fallback. An absent value uses the fallback; an empty value disables it; an invalid relative path fails that request. Concurrent requests remain isolated in daemon and client-side modes.Depends on #2813; the request-only diff excludes that prerequisite. The storage wrapper preserves the current upstream raw-cache read API. Tests cover overrides, fallback, statistics, invalid paths, and concurrent requests in both modes.
Formatting, clippy, and the locked unit/integration suite pass on Apple silicon. CUDA cases skip locally; native Windows and CUDA validation are left to CI.
Fixes #2595. Developed with OpenAI Codex.