Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix Rollup's metadata parser #36791
The parser used for rollup configs in _meta fields was not able to handle unrelated data in the meta field. If an unrelated object was encountered, it would half-consume the JSON object, realize it wasn't a rollup config, then stop parsing. This would leave the object halfway consumed and the parsing framework would throw an exception.
This commit replaces the parsing logic with a set of minimal static parsers, each for the specific component we care about (
More verbose, but less hacky than before and should be more robust.
Also adds tests (randomized and explicit) to make sure this doesn't break in the future.