Skip to content
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 unintended serialization of the SelectedIndex for Input nodes #12087

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DynamoCore/Graph/Nodes/NodeInputData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class NodeInputData
/// The index of the selected item.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public int SelectedIndex { get; set; }
public int? SelectedIndex { get; set; }
Copy link
Member

@mjkkirschner mjkkirschner Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's likely this is an API break.
I don't know if we care - but I think it fits in:

❌ DISALLOWED: Changing the type of a member

The return value of a method or the type of a property or field cannot be modified. For example, the signature of a method that returns an Object cannot be changed to return a String, or vice versa.

this may cause binary compatibility issues with any code that referenced this member, can you check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right. That was my reading of it as well. I do think we should probably make the change though. I will double check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjkkirschner Yep it does fail if you directly read or set the SelectedIndex but I think we should fix this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - finally time to do this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marked as 3.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep let's do this. Just updated the branch @mjkkirschner @QilongTang


private static Dictionary<Type, NodeInputTypes> dotNetTypeToNodeInputType = new Dictionary<Type, NodeInputTypes>
{
Expand Down