-
Notifications
You must be signed in to change notification settings - Fork 103
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
Make exception for plugins when checking for name uniqueness #721
Conversation
Signed-off-by: Addisu Z. Taddese <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #721 +/- ##
==========================================
+ Coverage 88.20% 88.21% +0.01%
==========================================
Files 76 76
Lines 11417 11430 +13
==========================================
+ Hits 10070 10083 +13
Misses 1347 1347
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one minor nit about wording of documentation
looks good otherwise
include/sdf/Element.hh
Outdated
@@ -532,6 +560,11 @@ namespace sdf | |||
/// \return A pointer to the named element if found, nullptr otherwise. | |||
public: ElementPtr GetElementImpl(const std::string &_name) const; | |||
|
|||
/// \brief List of elements to which exceptions are made when checking for | |||
/// name uniqueness. | |||
/// \return List of element types that are allowed to name collisions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a verb? "allowed to have name collisions"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Addisu Z. Taddese <[email protected]>
…im#721) Adds an exception for the <plugin> element so that no warning is emitted when a plugin name matches the names of other entities. Signed-off-by: Addisu Z. Taddese <[email protected]>
…ame uniqueness (#733) * Backport test utilities from sdf10 * Backport Console redirect functionality * Make exception for plugins when checking for name uniqueness (#721) * Replace unavailable error printing API Signed-off-by: Addisu Z. Taddese <[email protected]>
🦟 Bug fix
Fixes #712
Fixes #294
Summary
As discussed in #712, #294 and possibly other issues, the
name
attribute of<plugin>
is used by downstream applications like ign-gazebo to specify the class name within the plugin, so name collisions can occur frequently. This PR adds an exception for the<plugin>
so that no warning is emitted when a plugin name matches the names of other entities.I've added overloads to functions in
sdf::Element
so that this PR can be backported tosdf9
.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge