-
Notifications
You must be signed in to change notification settings - Fork 636
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
update forge units package #14480
update forge units package #14480
Conversation
|
@@ -12,9 +10,9 @@ namespace DynamoUnits | |||
/// </summary> | |||
public class Quantity | |||
{ | |||
internal readonly ForgeUnitsCLR.Quantity forgeQuantity; |
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.
did this namespace change? If so why is this package not version 5?
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.
answered in the general chat
Oh I guess they will really only reference the Dynamo wrapper types, so it should be fine. Though my other question stands about ForgeUnits versioning strategy. Is ForgeUnits not semantically versioned? |
ForgeUnits is semantically versioned. |
good info, thanks for sharing it. |
@@ -32,7 +32,7 @@ | |||
}, | |||
{ | |||
"ConcreteType": "UnitsUI.Units, UnitsUI", | |||
"SelectedIndex": 218, |
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.
Looks like updating to the new forgeUnits will break some existing units nodes (specifically the dropdown UI nodes - ex. that list all units, all symbols or all quantities maybe some others too)
Looks like we are serializing the index in dropdown nodes which will break if the underlying list of items changes (which happened for this upgrade)
Do you guys think this is serious enough to try to migrate in some way ?
FYI @mjkkirschner @sm6srw
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.
Maybe this only happens when the dropDown's SelectedString property does not find a match in the existing itemList.
So an edge case...
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.
Ugh...it is weird. Looks like DropDown nodes serialize both the SelectedString and the SelectedIndex. No sure about the order of deserialization. When one is deserialized it tries to override the other....
https://github.com/DynamoDS/Dynamo/blob/master/src/Libraries/CoreNodeModels/DropDown.cs#L91-L147
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.
@QilongTang Looks like you implemented the serialization of DropDown SelectedString and SelectedIndex.
#9367
Did you expect that the SelectedIndex might become out of sync with SelectedString ?
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.
SelectedString is deserialized after SelectedIndex, so when the index is out of sync because of item sources updated, changed, we fall back to SelectedString later as a second chance. Let me know if that is clear
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.
Ok..so this is only an issue when the SelectedString is no longer found. That means it was bad from the start .... or it is missing from the underlying item list, which would be a breaking change (so it might acceptable for it not to work properly)
Purpose
Update the ForgeUnits nuge package to 4.1.1
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
(FILL ME IN) Brief description of the fix / enhancement. Mandatory section
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of