fix: ignore disableCache in client#481
Conversation
|
Follow-up issue for the real |
c1f3b00 to
770bc04
Compare
770bc04 to
b0a7019
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1f3b005d3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| )] | ||
| pub fn disable_cache(&self) -> io::Result<()> { | ||
| self.send(&Request::DisableCache) | ||
| Ok(()) |
There was a problem hiding this comment.
Update stale disableCache e2e snapshots
With this new Ok(()) path, public clients no longer send Request::DisableCache, but the include-ignored e2e fixture still asserts that disableCache() forces the next run to miss; running cargo test -p vite_task_bin --test e2e_snapshots -- --include-ignored disable_cache_forces_reexecution now fails because the second run is a cache hit. Please update or remove the affected ipc_client_test/vite_dev_disable_cache snapshots alongside this behavior change so the documented Node-client suite matches the new contract.
Useful? React with 👍 / 👎.
Summary
Temporarily make
vite_task_client::Client::disable_cache()a no-op while we redesign thedisableCachecontract.The server-side
Request::DisableCachehandling remains intact and covered by a raw protocol integration test. The public client method keeps its existing API shape so consumers do not need code changes.Why
Vite/Vitest can currently call
disableCache()too early, during server/config setup. That causes cacheable tasks such asvitest runto opt out even when they never listen on a port or observe the filesystem.This PR avoids the false opt-out immediately. The real fix should move
disableCache()calls to the exact operations that make a task uncacheable, such as port listening and filesystem observation.Validation
mise exec -- cargo fmt --all --checkmise exec -- cargo check -p vite_task_client -p vite_task_servermise exec -- cargo test -p vite_task_server --test integrationmise exec -- cargo clippy -p vite_task_client -p vite_task_server --all-targets --all-features -- --deny warnings