When applying DataFixerUpper on some recursive root type, and there is a data fixer that fixes that root type, that type will not be recursively fixed.
When using writeFixAndRead/writeAndRead with a recursive type, the fixer function itself is invoked with sub-types already upgraded; but we try to parse this typed structure with the input type. We need to instead 'patch' those sub-types to the new types within the input type. TypeRewriteRule already knows how to do that, so we can capture the type from this.
Two small issues:
DataFixerUpper
on some recursive root type, and there is a data fixer that fixes that root type, that type will not be recursively fixed.writeFixAndRead
/writeAndRead
with a recursive type, the fixer function itself is invoked with sub-types already upgraded; but we try to parse this typed structure with the input type. We need to instead 'patch' those sub-types to the new types within the input type.TypeRewriteRule
already knows how to do that, so we can capture the type from this.