-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for regression in Node2Code. #11373
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
{ | ||
"Uuid": "2c2cfb4e-70f7-4462-bca2-facc02603823", | ||
"IsCustomNode": false, | ||
"Description": null, | ||
"Name": "builtinAddNode", | ||
"ElementResolver": { | ||
"ResolutionMap": {} | ||
}, | ||
"Inputs": [], | ||
"Outputs": [], | ||
"Nodes": [ | ||
{ | ||
"ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", | ||
"NodeType": "FunctionNode", | ||
"FunctionSignature": "+@var[]..[],var[]..[]", | ||
"Id": "b9ce5822dce94a8bbd13d11b36c2c5b2", | ||
"Inputs": [ | ||
{ | ||
"Id": "44f8e12394444e529e6dff105400cea8", | ||
"Name": "x", | ||
"Description": "x value.\n\nvar[]..[]", | ||
"UsingDefaultValue": false, | ||
"Level": 2, | ||
"UseLevels": false, | ||
"KeepListStructure": false | ||
}, | ||
{ | ||
"Id": "95db0f3d6dd74a7298ecbcc325a9e530", | ||
"Name": "y", | ||
"Description": "y value.\n\nvar[]..[]", | ||
"UsingDefaultValue": false, | ||
"Level": 2, | ||
"UseLevels": false, | ||
"KeepListStructure": false | ||
} | ||
], | ||
"Outputs": [ | ||
{ | ||
"Id": "452c6cbeaf7a4e0faa31d9336ad6a288", | ||
"Name": "var[]..[]", | ||
"Description": "var[]..[]", | ||
"UsingDefaultValue": false, | ||
"Level": 2, | ||
"UseLevels": false, | ||
"KeepListStructure": false | ||
} | ||
], | ||
"Replication": "Auto", | ||
"Description": "Adds x to y.\n\n+ (x: var[]..[], y: var[]..[]): var[]..[]" | ||
}, | ||
{ | ||
"ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", | ||
"NodeType": "CodeBlockNode", | ||
"Code": "32;\n17;", | ||
"Id": "969d2265352c4e1ca335049dca655ad4", | ||
"Inputs": [], | ||
"Outputs": [ | ||
{ | ||
"Id": "b5754723e63f4537bb1a0e632f96716a", | ||
"Name": "", | ||
"Description": "Value of expression at line 1", | ||
"UsingDefaultValue": false, | ||
"Level": 2, | ||
"UseLevels": false, | ||
"KeepListStructure": false | ||
}, | ||
{ | ||
"Id": "7ce41a3ce4864602b533dc5112c29b32", | ||
"Name": "", | ||
"Description": "Value of expression at line 2", | ||
"UsingDefaultValue": false, | ||
"Level": 2, | ||
"UseLevels": false, | ||
"KeepListStructure": false | ||
} | ||
], | ||
"Replication": "Disabled", | ||
"Description": "Allows for DesignScript code to be authored directly" | ||
} | ||
], | ||
"Connectors": [ | ||
{ | ||
"Start": "b5754723e63f4537bb1a0e632f96716a", | ||
"End": "44f8e12394444e529e6dff105400cea8", | ||
"Id": "abb969fc755a4d9d8b8230a33b95d4ec" | ||
}, | ||
{ | ||
"Start": "7ce41a3ce4864602b533dc5112c29b32", | ||
"End": "95db0f3d6dd74a7298ecbcc325a9e530", | ||
"Id": "81f9f996548d48fb9d686bca6ce3548c" | ||
} | ||
], | ||
"Dependencies": [], | ||
"NodeLibraryDependencies": [], | ||
"Bindings": [], | ||
"View": { | ||
"Dynamo": { | ||
"ScaleFactor": 1.0, | ||
"HasRunWithoutCrash": true, | ||
"IsVisibleInDynamoLibrary": true, | ||
"Version": "2.11.0.3451", | ||
"RunType": "Automatic", | ||
"RunPeriod": "1000" | ||
}, | ||
"Camera": { | ||
"Name": "Background Preview", | ||
"EyeX": -17.0, | ||
"EyeY": 24.0, | ||
"EyeZ": 50.0, | ||
"LookX": 12.0, | ||
"LookY": -13.0, | ||
"LookZ": -58.0, | ||
"UpX": 0.0, | ||
"UpY": 1.0, | ||
"UpZ": 0.0 | ||
}, | ||
"NodeViews": [ | ||
{ | ||
"Id": "b9ce5822dce94a8bbd13d11b36c2c5b2", | ||
"IsSetAsInput": false, | ||
"IsSetAsOutput": false, | ||
"Name": "+", | ||
"ShowGeometry": true, | ||
"Excluded": false, | ||
"X": 333.5, | ||
"Y": 175.0 | ||
}, | ||
{ | ||
"Id": "969d2265352c4e1ca335049dca655ad4", | ||
"IsSetAsInput": false, | ||
"IsSetAsOutput": false, | ||
"Name": "Code Block", | ||
"ShowGeometry": true, | ||
"Excluded": false, | ||
"X": 167.0, | ||
"Y": 181.0 | ||
} | ||
], | ||
"Annotations": [], | ||
"X": 0.0, | ||
"Y": 0.0, | ||
"Zoom": 1.0 | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my memory serves correctly, then the AST walkers are a bit inconsistent when it comes to returning new AST nodes or the same node - maybe this should return a copy of the node instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AST walkers are meant to return new nodes only if they are rewritten and return the original node if there is no change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah! Is that documented somewhere? Would it make sense to add a note about that to the base class or something? Not that it needs to be part of this pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do.