Turbopack: fix trace crates after concurrent trace format changes (#100656)
## Summary Fixes the canary build. `turbopack-trace-utils` currently fails to compile (`rust check`, `rustdoc`, cargo unit/bench tests, wasi and every native build are red since #99809). #99809 (typed, delta-encoded trace timestamps) landed after two PRs it was never built together with: - **#99527** added `memory_footprint` to `TraceRow::MemorySample`. The new `TraceRow::try_map_timestamp` from #99809 rebuilds each variant field by field and doesn't copy it (`E0027`/`E0063` in `tracing.rs`). It now copies the field, and a new test checks that a `MemorySample` keeps all its fields through timestamp encoding, serialization and decoding. - **#100205** added trace-server test helpers for the untyped format. Their rows now have the wrong timestamp type, and a second `encode` writes rows without a `TimestampBase` (`E0428` plus 18 `E0308` in `reader/turbopack.rs` tests). The helpers now build `TraceRow<'_, u64>` rows and use the shared encoder. The partial-read test encodes one continuous trace and splits it before the last row, instead of encoding the last row on its own (that would now give it its own base). No assertions changed. The only production change is copying `memory_footprint`; the serialized format is unchanged. ## Verification - `cargo test` for `turbopack-trace-utils`, `turbopack-trace-server` and `turbopack-trace-size`, including all #100205 re-entry tests - `cargo clippy --all-targets -- -D warnings` for those crates; rustdoc with `-D warnings` <!-- 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>
Showing
Please
register
or
sign in
to comment