While working on asdf-format/libasdf-gwcs#5 something I found out is libfyaml actually has a hard-coded limit for how deeply-nested of an fy_node stucture it allows you to copy: https://github.com/pantoniou/libfyaml/blob/aebb61b81727746d67ec5435fc0f696b685ecbf1/src/lib/fy-doc.c#L1970
What's even more annoying is there is in principle a flag you can set in libfyaml to increase (or decrease) the maximum allowed node depth, but here it doesn't even use the user setting and just uses the hard-coded default of 16.
This tends to especially appear in WCS's where there are often many nested transform compositions (I am also thinking GWCS might be able to do more to simplify transforms down but that's its own issue).
This is worked around some in #183, but it could still be a foot-gun for user code as well.
The upstream behavior seems well-intentioned, but is I think too restrictive for real-world usecases. Would be good to propose an upstream fix to make this controllable (or even allow infinite depth). In the meantime this could also be worked manually with a recursive bottom-up copy process.
While working on asdf-format/libasdf-gwcs#5 something I found out is libfyaml actually has a hard-coded limit for how deeply-nested of an
fy_nodestucture it allows you to copy: https://github.com/pantoniou/libfyaml/blob/aebb61b81727746d67ec5435fc0f696b685ecbf1/src/lib/fy-doc.c#L1970What's even more annoying is there is in principle a flag you can set in libfyaml to increase (or decrease) the maximum allowed node depth, but here it doesn't even use the user setting and just uses the hard-coded default of 16.
This tends to especially appear in WCS's where there are often many nested transform compositions (I am also thinking GWCS might be able to do more to simplify transforms down but that's its own issue).
This is worked around some in #183, but it could still be a foot-gun for user code as well.
The upstream behavior seems well-intentioned, but is I think too restrictive for real-world usecases. Would be good to propose an upstream fix to make this controllable (or even allow infinite depth). In the meantime this could also be worked manually with a recursive bottom-up copy process.