-
Notifications
You must be signed in to change notification settings - Fork 15
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
Versioning_Engine: Add BHoM version in serialisation #2434
Conversation
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.
Really minor suggestion from code review. Have not done functionality review as have been tied up with 4.1.b.1 stuff. I agree with your points though @adecler in terms of restriction to merging. Just to make sure I fully understand though, if we didn't merge this till after the 4.2 beta, the problem would still only exist for pre-4.1 betas as you've described? (i.e. waiting more betas to ensure clear comms does not jump the version affected?). This is mostly to help make sure I've fully understood the message in your comment, but also to make sure if this is not the correct understanding that adequate comms and reviewing resource are given to this PR this milestone as appropriate 😄
Exactly! This means the longer we wait, the less impact this PR will have. On the other hand, versioning will keep being slow until this is merged (as it starts from the first available upgrader instead of the one matching the version inside the json). |
Taken #2411 into account, I would not mind earlier release - it was never a smart thing to open a script with an older BHoM version than the script was created in. However, that is only my biased perspective, and will not be too upset if the decision is made to wait until 4.3. |
@BHoMBot check serialisation |
@adecler to confirm, the following checks are now queued:
|
I second this - happy for this feature to be merged. |
All to summarise the discussion we just had and clarify the scope of the testing:
|
Thanks for further detail @adecler. I also think we should merge this asap. Following on from my question earlier I realise now why I was uncertain if this was enough testing. I install last nights alpha
I build this branch.
Fairly certain this is just a case of the PR needing an update to master to correct the AssemblyFileVersion. |
09b95c3
to
0cb3780
Compare
@rolyhudson , Yes, I was just noticing the same thing 😄 . I have rebased the PR so all is now on 4.2. |
@BHoMBot check serialisation |
@adecler to confirm, the following checks are now queued:
|
I have added a set of test files here to make sure that every single object/method serialised with this PR can still be opened in older 4.2 and 4.1 versions. Here's how to do the test:
|
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.
I've re-run the original test script and the newer serialisation tests and happy with the results.
It should also be reviewed by others before merging.
@BHoMBot check required |
I have updated the code to keep versioning deeper in the serialisation. The orignal version where the |
@BHoMBot check required |
@adecler to confirm, the following checks are now queued:
|
FAO: @FraserGreenroyd The check they wish to have dispensation on is code-compliance. If you are providing dispensation on this occasion, please reply with:
|
@adecler to confirm, the following checks are now queued:
|
@FraserGreenroyd, the bot is trying to enforce non-static methods to be extensions methods. So probably something we want to fix. |
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.
Re tested following changes still happy to approve.
@BHoMBot check ready-to-merge |
@adecler to confirm, the following checks are now queued:
There are 11 requests in the queue ahead of you. |
@adecler to confirm, the following checks are now queued:
|
Can everyone confirm that they are happy with merging 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.
I'm happy from my review of this @adecler
Issues addressed by this PR
Closes #2346
This add the versioning info to each object during serialisation.
It is important to note that only version 4.1 will be able to open files from version 4.2. We've never had a good support for backward compatibility. So it was already not recommended to open a file from a version more recent than what is installed on your machine since modified objects/methods would likely break. This, however would break every single component for version 4.0 and older trying to open a file from version 4.2. Looking at BHoM analytics, we currently have around 45% of the people using version 4.0 or older.
Again, this only affects versions 4.0 and older opening files from 4.2 BUT I would not merge this PR until:
Test files
https://burohappold.sharepoint.com/:f:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/BHoM_Engine/Serialiser_Engine/%232346-AddVersionToJson?csf=1&web=1&e=5OxN0P
This file should open and run without problem in version 4.2 and beta 4.1. Beta 4.0 and older would fail on all components