Skip to content

BHoM_Engine: fix Hash() method not working with CustomObjects #2855

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

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

alelom
Copy link
Member

@alelom alelom commented Jun 9, 2022

Issues addressed by this PR

Closes #2844

The issue was that there was an old piece of code in the Hash function that was supposed to grab the Key of the CustomData dictionary when the input object was a CustomObject, to then determine what to do with this key. This part was not implemented properly. It was not discovered earlier due to lack of usage of this workflow. This is now fixed by moving the code in the correct area of the algorithm. I also added tests in the DiffingTests prototypes to capture this usage, see below.

Test files

Changelog

Additional comments

@alelom alelom added severity:critical No workaround exists. Essential to continue size:S Measured in minutes type:bug Error or unexpected behaviour labels Jun 9, 2022
@alelom alelom self-assigned this Jun 9, 2022
@alelom alelom requested review from adecler and al-fisher as code owners June 9, 2022 15:00
@alelom alelom requested a review from IsakNaslundBh June 9, 2022 15:00
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.

Tests in diffing prototypes is passing.

Am now able to compute the Hash of a Custom object that is consistent with inputs changing. Approved

@alelom
Copy link
Member Author

alelom commented Jun 9, 2022

@BHoMBot check compliance
@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Jun 9, 2022

@alelom to confirm, the following checks are now queued:

  • code-compliance
  • documentation-compliance
  • project-compliance
  • branch-compliance
  • dataset-compliance
  • copyright-compliance
  • code-compliance
  • documentation-compliance
  • project-compliance
  • core
  • null-handling
  • serialisation
  • versioning
  • installer

There are 48 requests in the queue ahead of you.

@alelom
Copy link
Member Author

alelom commented Jun 9, 2022

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Jun 9, 2022

@alelom to confirm, the following checks are now queued:

  • ready-to-merge

There are 63 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Jun 9, 2022

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Jun 9, 2022

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@IsakNaslundBh IsakNaslundBh merged commit 8201315 into main Jun 10, 2022
@IsakNaslundBh IsakNaslundBh deleted the BHoM_Engine-#2844-fixHashCustomObjects branch June 10, 2022 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:critical No workaround exists. Essential to continue size:S Measured in minutes type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BHoM_Engine: Hash generation is crashing for CustomObjects
2 participants