next.js
6ebc729c - Turbopack: fix turbo-trace-size test after MemorySample gained active_worker_threads (#99824)

Commit
15 hours ago
Turbopack: fix turbo-trace-size test after MemorySample gained active_worker_threads (#99824) ### What? Fixes the `rust check` (clippy) and `test cargo unit` jobs on canary, which fail with: ``` error[E0063]: missing field `active_worker_threads` in initializer of `TraceRow<'_>` --> turbopack/crates/turbopack-trace-size/src/lib.rs:936:13 ``` The fix adds the missing field to the `TraceRow::MemorySample` row in the `turbo-trace-size` unit test. ### Why? This was a semantic merge conflict between two PRs that each passed CI on their own: - #99233 added `active_worker_threads` to `TraceRow::MemorySample`. - #99765 added the `turbo-trace-size` crate, whose test builds a `MemorySample` row without that field. Only test code is affected. Every other `MemorySample` constructor already sets the field. ### How? The test row now sets `active_worker_threads: 3`. The size assertions are computed from the serialized rows, so they don't change. Verified locally on top of `db03f83f`: before the change, `cargo test -p turbopack-trace-size` fails with the error above. After it, the following pass: - `cargo test -p turbopack-trace-size` - `cargo clippy --all-targets -- -D warnings` for `turbopack-trace-size`, `turbopack-trace-utils` and `turbopack-trace-server` - tests of `turbopack-trace-utils` and `turbopack-trace-server` <!-- NEXT_JS_LLM --> <!-- fleet 4a52842b-f1a2-43cb-9779-3655caada6a0 --> Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
Author
Parents
Loading