Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Hidden inputs not added to BorrowTree inputs_source_map

Open adamgerhant opened this issue 8 months ago • 0 comments

Resolved types for the Import node (which is derived from the parent node) are not available for hidden node inputs. This is because although the hidden Type's are stored in the TypingContext, the document_node_types(&self) -> ResolvedDocumentNodeTypes function only gets types for inputs in the BorrowTree inputs_source_map. To fix this, all inputs need to be added to the inputs_source_map. I believe this will require a rework to how exposed inputs are handled. Is there even a reason to consider whether the input is hidden when compiling into proto nodes? Hiding an input is a UI only concept, the value node still has the same functionality.

This image shows the error. The Type is a (Concrete(())->Concrete(bool)), and is correctly passed to the next node, but it is displayed as General ApplicationFrameHost_Tip9Bq6YOi

I think this is purely visual, and doesn't affect any functionality. There is also some strange behavior where the last type becomes the type for the first hidden. In this example the location input has resolved type Concrete(())->Concrete(bool).

adamgerhant avatar Jun 01 '24 21:06 adamgerhant