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
Introduce a recursive cycle check when writing (#345)
I noticed that writing can blow up when there are recusrive objects that reference each other.
(For example, in HTTP.jl, `Response` and `Request` reference each other)
This PR proposes a simple API for the `CompactContext` and `PrettyContext` where
`objectid` of objects will be tracked recursively when writing and it's configurable
what should be written out when a recursive cycle is detected.
Custom contexts can "hook in" to this behavior by subtyping `RecursiveCheckContext` and
including the required fields (see docs for new context). Otherwise, there shouldn't
be any functional change to APIs in any way.
0 commit comments