You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turbopack: use the same serialization method for lookup as for storing (#84754)
### What?
This makes sure to use the same method for serializing CachedTaskType
for storing and lookup.
Before that we instantiated the serialization twice and that caused some
weird behavior on linux.
Before this fix I was seeing that serialization of CachedTaskType was
not byte to byte identical between storing and lookup. This caused tasks
to not be found, which will lead to very weird effects: stale tasks,
cell not found, etc.
I was expecting that pot serialization is deterministic, but turns out
it isn't fully deterministic. It has some logic to deduplicate Symbols
(like enum variant names). But it deduplicates these `&'static str`s
based on the pointer address of the static string. Turns out that Rust
doesn't guarantee that static strings are deduplicated in all cases.
I assume that we are somehow running into that problem when having two
variants of the serialization. They ended up serializing task types
differently (one didn't have a symbol deduplicated in the serialized
form. But that's more a wild guess. It did fix the bug, but I have a
hard time understanding why this is happening.
On long term, I think we should change pot to avoid using pointer
addresses and do a real comparision instead.
0 commit comments