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

Serialiser_Engine: Handle the case of a class containing another class that was only changed internally #1301

Merged

Conversation

adecler
Copy link
Member

@adecler adecler commented Nov 6, 2019

NOTE: Depends on

BHoM/Versioning_Toolkit#6

See BHoM/Versioning_Toolkit#6 for more details

Additional comments

When a class is modified only internally, there is no Deprecated tag used anywhere (since the class is still active, just modified). This makes it very difficult to detect when deserialising another class that has this modified class as one of the inner properties. The only solution I could find here is to deserialise as custom object so the text now only contains upgraded json/bson and then deserialise again. This works fine and doesn't break the case of deleted classes. Make sure you test any case you can think of though as this is probably the part that is most likely to fail in some weird cases.

@adecler adecler added the type:feature New capability or enhancement label Nov 6, 2019
@adecler adecler added this to the BHoM 3.0 β MVP milestone Nov 6, 2019
@adecler adecler self-assigned this Nov 6, 2019
@FraserGreenroyd FraserGreenroyd changed the title Handle the case of a class containing another class that was only changed internally Serialiser_Engine: Handle the case of a class containing another class that was only changed internally Nov 7, 2019
@FraserGreenroyd
Copy link
Contributor

Just added which engine is affected to PR title for change log 😄 will try and review today unless someone else jumps in first 😄

@adecler
Copy link
Member Author

adecler commented Nov 7, 2019

Just added which engine is affected to PR title for change log 😄 will try and review today unless someone else jumps in first 😄

I will never learn 😿

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

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

Test script worked, everything looks to make sense, LGTM.

@adecler adecler merged commit 9774432 into master Nov 9, 2019
@adecler adecler deleted the Versioning_Toolkit-#5-UpgradeForClassInternalChanges branch November 9, 2019 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants