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: Fix remaining problems with serialisation #1756

Merged
merged 5 commits into from
May 13, 2020

Conversation

adecler
Copy link
Member

@adecler adecler commented May 9, 2020

NOTE: Depends on

BHoM/BHoM#857
BHoM/Test_Toolkit#247

Issues addressed by this PR

Closes #1620
Closes #1755
Closes #1737

Yatta !! Finally got all types working (at least those on my computer).

image

This fixes the serialiser itself but will be accompanied by a few corrections on the non-compliant types themselves to get it all working (see PRs in the depends on section)

Test files

https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/01_Test%20Scripts/BHoM_Engine/Serializer_Engine/serialisationTest.gh?csf=1&web=1&e=1okDsJ

If you have types failing on your machine, please make sure they compliant first. A common issue for example is an incorrect constructor for IImmutable classes.

Changelog

  • Move RegisterClassMap and add serialiser for regex
  • Take care of the case where a bitmap is null
  • Handle Enumerable as top objects and GenericTypeDefinition
  • Don't send nulls to versioning

Additional comments

FYI, A dummy object cannot be created for MaterialComposition because it has a restriction inside its constructor that throws an exception if that constraint is not met.

Copy link
Contributor

@IsakNaslundBh IsakNaslundBh left a comment

Choose a reason for hiding this comment

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

Have one still failing my end:

image

first had had a look at the dummy object created, and it is not valid from a BHoM point of view, and wanted to check if that is causing it. But does not seem like it. Creating a valid one still fails to de-serialise for me.

@adecler
Copy link
Member Author

adecler commented May 12, 2020

@IsakNaslundBh , it works perfectly fine for me so we probably need to do a screen share on this one:

image

Copy link
Contributor

@IsakNaslundBh IsakNaslundBh left a comment

Choose a reason for hiding this comment

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

After chat with arnaud, ready to approve as this generally makes things better (the tapered profiles does no de-serialise correctly on my machine on master either).

I have raised the following issues to get this fixed:
BHoM/BHoM#860
#1760

Approving on the basis that the rest is working as expected

@IsakNaslundBh
Copy link
Contributor

/azp run BHoM_Engine.CheckInstaller

@IsakNaslundBh
Copy link
Contributor

/azp run BHoM_Engine.CheckCompliance

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adecler adecler merged commit 3bff86e into master May 13, 2020
@adecler adecler deleted the Serialiser_Engine-#1620-FixSerialisation branch May 13, 2020 02:10
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
2 participants