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

[Helper] PluginManager: support loading from Non-MSVC Multi-Configuration Build #5133

Merged

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Nov 21, 2024

My case is XCode on macOS but it should be the same problem with ninja multiconfig and other multiconfig generators.

If you compile in Release and in RelWithDebInfo, PluginManager will load the first one it can find recursively from the lib/ directory. So it can try to load Release-compiled plugins while being in RelWithDebInfo (and vice-versa)

This PR adds preprocessor definitions to the builds, and the config is known at compile-time.
For the moment, I just did it in PluginManager and the definitions are not propagated to the other dependencies as I think it may not be a good idea (is it ?).

The only other place I see it can be useful would be for SofaPython3, as the site-packages also uses the split multiconfig directories for its modules. (indeed it is not possible to load SofaPython3 scenes with XCode as it is more or less the same problem)

and I think the file organization in lib, bin, sites-packages, install should be revised...


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 issue: discussion Open topic of discussion pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request labels Nov 21, 2024
@hugtalbot hugtalbot added pr: dev meeting topic PR to be discussed in sofa-dev meeting and removed issue: discussion Open topic of discussion labels Nov 21, 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.

I discovered recently that our releases are configured with MinSizeRel: https://github.com/sofa-framework/ci/blob/7681010a6382eda0cec2df930c75a1237498f622/scripts/configure.sh#L472
So I suggest to support it as well

@fredroy fredroy added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Nov 21, 2024
@fredroy
Copy link
Contributor Author

fredroy commented Nov 22, 2024

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

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Nov 29, 2024
@bakpaul bakpaul added this to the v25.06 milestone Dec 4, 2024
@fredroy fredroy force-pushed the pluginmanager_support_multiconfig branch from c894a18 to 25874a7 Compare December 16, 2024 00:15
@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: dev meeting topic PR to be discussed in sofa-dev meeting pr: status to review To notify reviewers to review this pull-request labels Dec 18, 2024
@fredroy fredroy force-pushed the pluginmanager_support_multiconfig branch from 419fc86 to c8d50b4 Compare December 27, 2024 10:06
@epernod epernod merged commit bcc5a16 into sofa-framework:master Dec 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants