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

[Core] Warn when input/output of mapping is deduced automatically #5238

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alxbilger
Copy link
Contributor

The search for "input" and "output" can be moved into the parse method. It is called anyway by the object factory. If we do that, the function create is identical to BaseObject::create. It is then useless to define it again.

In case a mapping is defined without "input" or "output", the warning looks like:

[WARNING] [RigidMapping()] The attribute 'input' of this component has not been defined. It is automatically set to '@/Torus3/MechanicalObject1'. It is recommended to define it to avoid any error.
[WARNING] [RigidMapping()] The attribute 'output' of this component has not been defined. It is automatically set to '@/Torus3/Surf2/MechanicalObject1'. It is recommended to define it to avoid any error.

To better understand the implicit mechanism, the full link is set. It is much more readable than "@../" and "@./"


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).

@alxbilger alxbilger added enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Jan 22, 2025
@fredroy
Copy link
Contributor

fredroy commented Jan 28, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants