When closing a newly created blank document and then creating another new document, the BorrowTree in the DynamicExecutor is not the same as the first, even though both node networks are the same.
Blocks #1750
In fact, the second tree just has a total of 4 sources for the artboard node and its entire nested network, while the first tree has sources for every artboard node input and nested network input. Another observation is that the second inputs source map retains all the sources from the previous document (artboard id 17505474457066797865). It seems that the root issue is that the borrow tree is not being reset when changing networks. This means the nodes are being preserved, so nodes in the protonetwork for the new document are being skipped here:
if !self.nodes.contains_key(&id) {
self.push_node(id, node, typing_context).await?;
}
I think a solution could be to reset the borrow tree when switching documents, but I'm not sure what other effects this would have.
When closing a newly created blank document and then creating another new document, the
BorrowTree
in theDynamicExecutor
is not the same as the first, even though both node networks are the same. Blocks #1750How to reproduce:
Borrow tree from new document after refreshing (Artboard node id 17505474457066797865)
Borrow tree after refreshing (Artboard node id 648511539128895861)
In the first borrow tree, all the sources are added properly. For example, the artboard node has sources for all inputs
However, in the second borrow tree, only the source for the first input is added.
In fact, the second tree just has a total of 4 sources for the artboard node and its entire nested network, while the first tree has sources for every artboard node input and nested network input. Another observation is that the second inputs source map retains all the sources from the previous document (artboard id 17505474457066797865). It seems that the root issue is that the borrow tree is not being reset when changing networks. This means the nodes are being preserved, so nodes in the protonetwork for the new document are being skipped here:
I think a solution could be to reset the borrow tree when switching documents, but I'm not sure what other effects this would have.