Mojang / DataFixerUpper

A set of utilities designed for incremental building, merging and optimization of data transformations.
MIT License
1.19k stars 138 forks source link

Fix: don't fail entire rewrite if recursive type did not match anywhere at top-level #85

Closed Gegy closed 9 months ago

Gegy commented 9 months ago

Usually, rewrites to recursive types are deeply nested - which will cause any failure to fallback to no-op (through most Type.all() implementations). The semantics of everywhere are similar to all - if nothing can be rewritten internally, that is not an error state.

This will cause no fixer function to be produced if a top-level recursive type has a fixer defined within a version range, but that type does not exist within the type being fixed.

Doesn't currently impact Vanilla, but became a bit more likely with 1a8eb415198a72c612163ad6c25505b57a891adb.