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
Currently, the rules about where aliases (for cyclic types) can occur are not strict enough, leading to confusing structures where you don't know when you're going to get an alias or a resolved node.
Now that the ID is calculated before the node itself is created, this could be used to ensure we can resolve to that reference ahead of time and only in structural positions, i.e. on a Sequence/Required/Optional/Index node.
Other changes I'd like to make alongside this one:
A layer above type/schema called node that would not accept parsed definitions but only what is now Inner and reduce it to a node.
This would be not be top-level callable, therefore we could construct nodes and stitch them together by referring cycles back to an object that is currently being constructed
Would be scopeless, simplifying caching
Would be wrapped by type/schema with scopes, which would make boundaries for .finalize explicit
Currently, the rules about where aliases (for cyclic types) can occur are not strict enough, leading to confusing structures where you don't know when you're going to get an alias or a resolved node.
Now that the ID is calculated before the node itself is created, this could be used to ensure we can resolve to that reference ahead of time and only in structural positions, i.e. on a Sequence/Required/Optional/Index node.
Other changes I'd like to make alongside this one:
A layer above type/schema called node that would not accept parsed definitions but only what is now
Inner
and reduce it to a node.This would be not be top-level callable, therefore we could construct nodes and stitch them together by referring cycles back to an object that is currently being constructed
Would be scopeless, simplifying caching
Would be wrapped by type/schema with scopes, which would make boundaries for
.finalize
explicitRelated issues: #1237, #1209, #1188
The text was updated successfully, but these errors were encountered: