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 arbitrary XML generic type serialization is limited only to core operators. Specific types such as TypeMapping can be useful outside the core to target generic types, however they currently cannot be so used because of an enforced feature-lock requiring them to be placed in properties with the default XML namespace:
If this test was extended even just slightly to check for generic TypeArguments attributes with the default type, regardless of the namespace of the element where they are placed, this would allow for much more powerful XML serialization strategies.
Care should be considered to ensure that conflicting serialization directives are not introduced by third-party types used this way.
The text was updated successfully, but these errors were encountered:
The attribute MyProperty is implicitly assumed to be under the same namespace p1 as CustomType.
This is problematic for reusing more broadly the existing generic type serialization strategies, since the TypeArguments attribute used e.g. in TypeMapping is always assumed to be used without prefix, i.e. it assumes that TypeArguments is a proper attribute of the generic type. This can work for generic types which are under the control of the core assembly, but would result in a name clash when serializing generic types containing themselves a property called TypeArguments.
Because of this, it is indeed best if this functionality is not extended too broadly. In the future we may want to revisit the entire topic of serialization and language models but for now, and in order to keep required modifications to a minimum, we should probably restrict the usage of serialized generic properties to known types, such as TypeMapping.
glopesdev
added a commit
to glopesdev/bonsai
that referenced
this issue
Mar 10, 2023
Currently arbitrary XML generic type serialization is limited only to core operators. Specific types such as
TypeMapping
can be useful outside the core to target generic types, however they currently cannot be so used because of an enforced feature-lock requiring them to be placed in properties with the default XML namespace:bonsai/Bonsai.Core/WorkflowBuilder.cs
Line 930 in 581d45e
If this test was extended even just slightly to check for generic
TypeArguments
attributes with the default type, regardless of the namespace of the element where they are placed, this would allow for much more powerful XML serialization strategies.Care should be considered to ensure that conflicting serialization directives are not introduced by third-party types used this way.
The text was updated successfully, but these errors were encountered: