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
When formatDescriptor() is called on a deserialized descriptor of an object with a self-referential property at a nesting depth beyond maxDepth, it may throw a PointerLookupError.
The deeply-nested self-reference occurs at a depth greater than maxDepth
The shallow self-reference occurs at a depth at most maxDepth
The name of the property containing the deeply-nested self-reference is lexically less than the name of the property containing the shallow self-reference
I believe the problem to be that the descriptor is deserialized lazily, and the formatter never calls upon the deeply-nested self-referential value, so when the shallow self-reference is called upon, its pointer references a descriptor that hasn't been deserialized yet.
I first encountered this in AVA, where it can cause an error to be thrown when a snapshot assertion comparing against such a value fails.
I'm working on a PR that may fix this presently.
The text was updated successfully, but these errors were encountered:
When
formatDescriptor()
is called on a deserialized descriptor of an object with a self-referential property at a nesting depth beyondmaxDepth
, it may throw aPointerLookupError
.MRE:
This throws:
To reproduce the issue, the following must hold:
maxDepth
is non-zeromaxDepth
maxDepth
I believe the problem to be that the descriptor is deserialized lazily, and the formatter never calls upon the deeply-nested self-referential value, so when the shallow self-reference is called upon, its pointer references a descriptor that hasn't been deserialized yet.
I first encountered this in AVA, where it can cause an error to be thrown when a snapshot assertion comparing against such a value fails.
I'm working on a PR that may fix this presently.
The text was updated successfully, but these errors were encountered: