-
Notifications
You must be signed in to change notification settings - Fork 193
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
Update remapping order of __ns and __node to not affect each other #299
Changes from 3 commits
873ada9
93a1b51
520d649
31ca246
33770a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,8 +324,7 @@ The replacement must be a single token which will become the node's new name. | |
|
||
Remapping rules are applied in the following order: | ||
|
||
1. Node name remapping | ||
1. Namespace remapping | ||
1. Namespace or Node name remapping | ||
1. All other rules | ||
|
||
Within each category, the rules are applied in the order in which the user gave them. | ||
|
@@ -339,8 +338,8 @@ Within each category, the rules are applied in the order in which the user gave | |
**Example of node/namespace remapping order:** | ||
|
||
- A node has name `talker` | ||
- A user gives the rules `talker:__ns:=/my_namespace` then `talker:__node:=foo` | ||
- The final namespace is the default `/` because the node name remap is applied before the namespace remap | ||
- A user gives the rules `talker:__ns:=/my_namespace` then `talker:__node:=foo`, or vice versa | ||
- The final fully qualified name is `/my_namespace/foo` because the namespace and node name remap are applied without affecting each other | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I would change this wording to: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you. I'll update it later. |
||
|
||
**Example of a default and node specific namespace remap:** | ||
|
||
|
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.
so now name are namespace rules are applied in the order they appear, right?
It would be great to make that clear here
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.
This is not the case, they order doesn't matter.
Their prefix is always the node name before remapping, maybe that can be made more clear.
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.
They're still ordered within a rule, right? If I give
talker:__node:=foo
andtalker:__node:=bar
, then is the final name isfoo
?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.
@ivanpauno
the order of name and namespace rules doesn't matter.
I think users like to understand some rules by referring to an example description.
talker:__ns:=/my_namespace
thentalker:__node:=foo
, or vice versa@sloretz
I supposed you mean the order of multiple items about __node or __ns, the answer is yes.
Yes.
Actually, the example description already showed messages,
/foo
because that rule was given firstthough the above example uses
talker:__ns:=/foo
and__ns:=/bar
About this kind of information, I'll not update it in this PR.