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

Fix get dependency modules depending on order in constructor #358

Conversation

IsakNaslundBh
Copy link
Contributor

Issues addressed by this PR

Closes #357

Fixes problem with call order of ModuleLoader and setting AdapterIdType. See issue for more details

Test files

All unittests should pass after change or calls in the constructor for SA

Changelog

Additional comments

…Type after calling dependency modules

This makes half of the UnitTest fail, which is the intention, and what needs to be fixed.
Store the adapter rather than the AdapterIdFragmentType
Use the AdapterIdFragmentType on the stored IBHoMAdapter rather than the previously stored type
Add better null handling on the adapter and ID
@IsakNaslundBh IsakNaslundBh added the type:bug Error or unexpected behaviour label Mar 8, 2023
@IsakNaslundBh IsakNaslundBh requested a review from alelom March 8, 2023 15:32
@IsakNaslundBh IsakNaslundBh self-assigned this Mar 8, 2023
Copy link
Member

@alelom alelom left a comment

Choose a reason for hiding this comment

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

Approving based on code changes and unit tests.
This solution effectively fixes an issue that can happen due to the Modules and their loading order in the Adapter ctor. This is an issue that the current adapter has because of its structure, which we could improve via some of the ideas listed in #356.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 9, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

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

There are 39 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 9, 2023

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 Mar 9, 2023

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
Copy link
Contributor Author

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 9, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check versioning

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 9, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check versioning

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 9, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check versioning

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 10, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check versioning

There are 35 requests in the queue ahead of you.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 10, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check versioning

There are 6 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 10, 2023

Please be advised that the check with reference 11906993068 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 163 additional annotations waiting, made up of 163 errors and 0 warnings.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 10, 2023

@FraserGreenroyd to confirm, the following actions are now queued:

  • check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 10, 2023

Please be advised that the check with reference 11908247408 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 3749 additional annotations waiting, made up of 3749 errors and 0 warnings.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 10, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check versioning

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 10, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check ready-to-merge

There are 4 requests in the queue ahead of you.

@IsakNaslundBh IsakNaslundBh merged commit b848f32 into develop Mar 10, 2023
@IsakNaslundBh IsakNaslundBh deleted the BHoM_Adapter-#357-FixGetDependencyModulesDependingOnOrderInConstructor branch March 10, 2023 12:45
@bhombot-ci bhombot-ci bot mentioned this pull request Mar 13, 2023
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.

Structure_AdapterModules: ModuleLoader is not independant of call order in adapter constructor
3 participants