Skip to content

Add old versioning surfaced by new serialiser - #365

Open
IsakNaslundBh wants to merge 20 commits into
developfrom
Versioning_Toolkit-#364-AddOldVersioningSurfacedByNewSerialiser
Open

IsakNaslundBh wants to merge 20 commits into
developfrom
Versioning_Toolkit-#364-AddOldVersioningSurfacedByNewSerialiser

Conversation

@IsakNaslundBh

@IsakNaslundBh IsakNaslundBh commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Issues addressed by this PR

Closes #364

Related to, but not dependant on BHoM/BHoM_Engine#3631

Adds versioning for methods that were not versioned, and relied on type.GetMethod(..) fallback to be able to de-serialise correctly. This method is not requiring an exact match between input parameters and the method, for example, if a List was changed to IEnumerable, then that method would still be found.

This also surfaced one bug, where the incorrect method was returned.

The upgraders have intentionally been put in the file that matches where the versioning would have gone if it was done at time of change of the code.

Will want to slightly mroe long term turn off this fallback completly, and for that state, then these versionings will be absolutely required, at least for a full versioning run.

Should add, given that the deserialisation actually was working, and giving back something (although for a few cases not the correct thing) this meant the verisoning check was passing, hence quite natural that these where not done at the time of code-change.

Test files

To test this, go to the Engine branch, as well as develop, and make sure historic methods (especially the ones touched in the PR) still deserialise correctly.

Changelog

Additional comments

Previously worked for fallback case of type.GetMethod, and was giving the correct method back, but with new system need versioning
Previously returned A method, but was actually returning the wrong method from the deserialisation. Adding versioning, in combination with the new serialsier fixes this issue
@IsakNaslundBh
IsakNaslundBh requested a review from adecler October 29, 2026 14:37
@IsakNaslundBh IsakNaslundBh self-assigned this Oct 29, 2026
@IsakNaslundBh IsakNaslundBh added the type:feature New capability or enhancement label Oct 29, 2026
The previous name-space handling for these types also versioned some types that was later removed, without before having their namespace changed.

That made some other old types fail versioning. This new method fixes that issue
…s version attributes back in 6.1, as well as some missing versioning

Also, fixes an incorrect "Message for deleted" key and adding in a item->list versioning. Also adds a MessageForNoUpgrade message for SpacePLacementSchema where the signature was changed a bit to much for verisoning to make sense
The merge of the Revit Security and ICT projects into SecurityICT (6.3)
was only partly versioned, so old Security/ICT methods and objects
failed to deserialise.
Making sure that a required property is present on the object, which is required for IImutable obejcts
SHould use MessageFOrDeleted, not remove from test-set
method name should be .ctor, not the type for adapter constructors
…d allow wpf and winforms

This is already enabled for the CI systems. Allows methods relying on winforms/wpd/other windows dlls to deserialise correctly in the testing environment.
…d failuredumpdir

adding overload to help facilitate simpler testing of versioning locally
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.

Add Old missing versioning surfaced by new Serialiser changes

1 participant