Skip to content

Scoped macro evaluation [Noetic]#272

Merged
rhaschke merged 3 commits into
ros:noetic-develfrom
ubi-agni:scoped-macros-noetic
May 30, 2021
Merged

Scoped macro evaluation [Noetic]#272
rhaschke merged 3 commits into
ros:noetic-develfrom
ubi-agni:scoped-macros-noetic

Conversation

@rhaschke
Copy link
Copy Markdown
Contributor

Fixes #270.

... to be used for both, symbols and macros.
To this end, remove global_symbols from Table's source code and instead,
store this dict as its root.
If no root parent is passed, an empty dict is used, which simplifies lookup.
Copy link
Copy Markdown
Contributor

@Doomerdinger Doomerdinger left a comment

Choose a reason for hiding this comment

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

I am not incredibly farmiliar with the inner workings of xacro, but this all looks ok.
Fixed the issues I was seeing with scoping - but I was only able to test on Melodic.

@rhaschke rhaschke merged commit e07841a into ros:noetic-devel May 30, 2021
@rhaschke rhaschke deleted the scoped-macros-noetic branch May 30, 2021 15:03
rhaschke added a commit to ubi-agni/xacro that referenced this pull request Jan 20, 2022
The definition of a new scope for macro definitions (introduced in ros#272)
was lost in 6d67741.
This commit also introduces a corresponding unit test.
rhaschke added a commit that referenced this pull request Jan 20, 2022
… from Table

This is another fixup of #272, which introduced macros to be an instance of Table.
However, this also requires namespaced macro dicts to be Table instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Macros inside macros are not private once ran

2 participants