-
Notifications
You must be signed in to change notification settings - Fork 13
Serialiser_Engine: Stop throwing error on System.DBNull #3276
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: Stop throwing error on System.DBNull #3276
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.
No longer running into the error when testing, nice work @Tom-Kingstone!
@albinber to confirm, the following actions are now queued:
|
@Tom-Kingstone to confirm, the following actions are now queued:
There are 24 requests in the queue ahead of you. |
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.
Thanks @Tom-Kingstone and @albinber
To recap some of the work from todays workshop on this, the 'issue' is caused by components in the UI utilising the System.DBNull
type for default values as opposed to traditional null
. When components are added or deleted, the Grasshopper write method is called to serialise the component in the state it was in, which then causes this issue where our serialiser encounters a System.DBNull
and throws an error when it can't serialise it.
This only then caused a problem on the canvas when a larger component, handling a lot of data, intercepts the error recorded and assigns it to that component, rather than the component (deletion) which triggered it. This then gives a confusing and poor UX.
This PR resolves that poor UX by treating items of type System.DBNull
as the same as null
for serialisation purposes, which I think makes the most logical sense for the time being.
I've run through a few tests on this and it all looks ok from what I can see, so I'm going to merge this for now so that if there are any issues, others can help us spot them via alphas.
Cheers again both 😄
@FraserGreenroyd to confirm, the following actions are now queued:
There are 3 requests in the queue ahead of you. |
@BHoMBot this is a DevOps instruction. I am requesting neutral checks on: unit-tests |
@FraserGreenroyd I have provided neutral checks to the checks requested. These checks will need to be run properly to obtain full results. |
NOTE: Depends on
Issues addressed by this PR
Closes #3210
after many hours of searching, finally found out that System.DBNull should serialise as null, so we should stop throwing errors when trying to serialise it.
Test files
3210-DBNullCannotBeSerialised.zip
Run through instructions made by myself in parent issue.
Changelog
Additional comments