On loading a Macro, all children get instantiated -- if you can instantiate a Macro, you'll be able to load that Macro (barring an edge case where replace was used to change a child...this could perhaps be handled on the save side).
The same is not true for Workflow, whose children are created dynamically -- a newly instantiated Workflow is empty. Thus, any storage of the children will also need to store the source for those child classes so that necessary packages can be re-registered prior to loading, e.g. Node.package_identifier: str | None.
Whenever a node gets created by the creator, package info should be automatically included.
Loading a workflow where some of the nodes were local and not from a package is also an issue -- this could be resolved by hard-serializing the entire class, or by preventing saving, but like macros who have had a child replaced, this problem can be delayed and doesn't pertain directly to including package info when it exists.
On loading a
Macro
, all children get instantiated -- if you can instantiate aMacro
, you'll be able to load thatMacro
(barring an edge case wherereplace
was used to change a child...this could perhaps be handled on the save side).The same is not true for
Workflow
, whose children are created dynamically -- a newly instantiatedWorkflow
is empty. Thus, any storage of the children will also need to store the source for those child classes so that necessary packages can be re-registered prior to loading, e.g.Node.package_identifier: str | None
.Whenever a node gets created by the creator, package info should be automatically included.
Loading a workflow where some of the nodes were local and not from a package is also an issue -- this could be resolved by hard-serializing the entire class, or by preventing saving, but like macros who have had a child replaced, this problem can be delayed and doesn't pertain directly to including package info when it exists.