feat(serialized): deserialize with bytechecked #7460
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Note: this PR currently fails, description's to explain those and discuss how to move forward.
This PR replaces current
deserialize
from unsafe, non-bytechecked to bytechecked version. This truly enables bytechecked operation since now we actually deserializes with bytechecked one. Enabling this revelas few place doesn't mark bytecheck attributes, addresses it as well.However, this PR fails to build with this error message:
There is an upstream issue explains this already: rkyv/rkyv#214 , and it looks like those 2 struct s(
BlockStmt
andComponentValue
) may include circular references in its structs somehow. for exampleBlockStmt -> Vec<Stmt> -> Stmt::Block(BlockStmt)
.If this is true, this may explain some of esoteric failures when it gets to deserialization fail (or unexpected behaviors).
Now the question is how to resolve this. Quick peeking, it doesn't seem to obvious I can amend existing AST to conform the requirement.