Skip to content

BHoM_Engine: Fix issues with system types from newer runtimes to older #3489

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

IsakNaslundBh
Copy link
Contributor

Issues addressed by this PR

Closes #3487

Fix issues with types failing to deserialise in newer runtimes.

  • Always call the Base.Create.Type() method for all non-engine types. This was already done for the case that the type was serialised as a string. No reason we should be using the method for when type is serialised as a document as well
    Type type = BH.Engine.Base.Create.Type(bson.AsString, true, true);
  • The above handles problems with the m_ExplicitSystemTypes not caught before in the GetType method
  • Fix handling of ref (out) types to handle the case for:
    • Qualified name (check contains rather than ends with)
    • Generic types
  • Add missing explicit system types shown to be failing

Test files

Test file on SharePoint

Changelog

Additional comments

Re-opening based on develop, as other was intended to be done as hotfix and was based on main.

Now that strategy is changed, wanted to re-open to keep commit history clean without deployment commits.

…pe method

That method is handlign far more than just oM classes. Should be used for other types as well.
Only keeping the check for IsEngineNamespace as that still should work fine
Changing from checking that the string ends with & to instead contains to handle the case of qualified ref type
and if so, simply try to create it before running into the rest of all the checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BHoM_Engine: Issues deserialising some system types from later runtime in older runtime
1 participant