facebookarchive/prepack
View on GitHubEnhance serializer tests with automated heap traversals
Open
#1,852 opened on May 3, 2018
enhancementhelp wantedserializertest needed
Repository metrics
- Stars
- (14,268 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Currently, the serializer tests only checks a heap projection: whatever the inspect function computes.
This is great for debugging issues, as each serializer test tends to be minimal and test a separate feature.
However, we are ignoring additional potential. What could be done is effectively synthesizing an alternative inspect function implementation that returns the result of a systematic, deterministic heap traversal.
Challenges:
- Ideally, we'd like to detect any changes to built-ins as well as changes rooted in the
globalobject. - Prepack does not preserve everything, e.g. function names and function source code change. So this should be abstracted by the traversal.
- Functions are interesting in general: How can we detect that their behavior didn't change? To start with, we can just ignore that and focus on the immediately accessible heap. Maybe some annotations are needed on how to invoke functions to get interesting outputs, which in turn can be traversed.