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

[All] ObjectFactory: Explicit components registration #4429

Merged

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Jan 12, 2024

Main goal is to remove the ObjectFactory singleton (later) and the implicit registration of objects while loading dynamic libraries (plugins)

In this PR, the explicit registration is applied on components of Sofa.Component.StateContainer

The legacy RegisterObject mechanism is preserved and will warn the user at the compilation and at run-time.

EDIT:

  • add tests about plugins non-registering/registering implicitly/registering explicitly
  • add deprecations/warnings in RequiredPlugin
  • add a function registerPlugin in PluginManager. This function is simply an alias for loadPlugin() because loadPlugin() does much more than just loading a plugin by itself. In an eventual future, PluginManager should be refactored in a way that loadPlugin calls registerPlugin()

By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature topic for next dev-meeting PR to be discussed in sofa-dev meeting labels Jan 12, 2024
Copy link
Contributor

@alxbilger alxbilger left a comment

Choose a reason for hiding this comment

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

Very interesting PR. I have some suggestions to make the code clearer and more expressive.

@fredroy fredroy force-pushed the explicit_register_objectfactory branch from 836ecca to cc8e302 Compare January 15, 2024 02:09
@fredroy
Copy link
Contributor Author

fredroy commented Jan 15, 2024

[ci-build][with-all-tests]

@fredroy
Copy link
Contributor Author

fredroy commented Jan 15, 2024

[ci-build][with-all-tests][force-full-build]

@fredroy fredroy force-pushed the explicit_register_objectfactory branch 2 times, most recently from a0faa0b to b27d29d Compare January 15, 2024 08:36
@fredroy
Copy link
Contributor Author

fredroy commented Jan 16, 2024

[ci-build][with-all-tests][force-full-build]

@damienmarchal
Copy link
Contributor

Maybe some ideas here: #2712

@fredroy fredroy force-pushed the explicit_register_objectfactory branch from 91d97b6 to 9668657 Compare January 24, 2024 00:12
@fredroy fredroy force-pushed the explicit_register_objectfactory branch from 9668657 to 058edfb Compare February 1, 2024 06:26
@fredroy fredroy force-pushed the explicit_register_objectfactory branch from 058edfb to 77931f0 Compare February 9, 2024 02:20
@hugtalbot hugtalbot added the pr: highlighted in next release Highlight this contribution in the notes of the upcoming release label Feb 14, 2024
@fredroy fredroy force-pushed the explicit_register_objectfactory branch from 77931f0 to 624af7c Compare February 20, 2024 04:33
@fredroy
Copy link
Contributor Author

fredroy commented Feb 20, 2024

[ci-build][with-all-tests][force-full-build]

@bakpaul bakpaul added this to the v24.06 milestone Feb 20, 2024
@fredroy
Copy link
Contributor Author

fredroy commented Feb 20, 2024

[ci-build][with-all-tests][force-full-build]

@alxbilger alxbilger force-pushed the explicit_register_objectfactory branch from f3ea4e6 to fc2f61b Compare February 21, 2024 15:13
@fredroy fredroy force-pushed the explicit_register_objectfactory branch from 6eacd80 to a1914a9 Compare February 23, 2024 01:01
@hugtalbot hugtalbot added STC#17 Tasks for STC#17 coding sprint and removed topic for next dev-meeting PR to be discussed in sofa-dev meeting labels Feb 28, 2024
@fredroy fredroy added pr: status postponed To keep in mind that this PR was interesting but no one has time to make it mergeable now. and removed pr: status to review To notify reviewers to review this pull-request STC#17 Tasks for STC#17 coding sprint labels Feb 28, 2024
@hugtalbot hugtalbot removed pr: status postponed To keep in mind that this PR was interesting but no one has time to make it mergeable now. pr: highlighted in next release Highlight this contribution in the notes of the upcoming release labels Feb 28, 2024
@hugtalbot hugtalbot added the pr: highlighted in next release Highlight this contribution in the notes of the upcoming release label Jul 29, 2024
@hugtalbot hugtalbot added this to the v24.12 milestone Jul 31, 2024
@fredroy fredroy changed the title [All] POC: ObjectFactory: Explicit components registration [All] ObjectFactory: Explicit components registration Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: breaking Change possibly inducing a compilation error pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: new feature Implement a new feature pr: status ready Approved a pull-request, ready to be squashed STC#17 Tasks for STC#17 coding sprint
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants