You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, if you specify a node name but not a node namespace when using either Node or LifecycleNode, you will get something from launch like <node_namespace_unspecified>/foo when you ask for the full node name. This is likely surprising to users who are likely not thinking about the namespace when giving the name of the node.
My suggestion is to change this so that if you give only a node name to launch that launch should assume you mean that the node namespace should also be set to empty. That way you avoid the situation where launch knows the name of the node but not the namespace.
Implementation considerations
This will break users that are setting a namespace explicitly in the source code but not in their launch files. For example, if the user put "ping" as the namespace and "foo" as the node name in the source code, but then put only "bar" as the node name in the launch file, before this change it would result in the node name being "ping/bar", but after this change it would be just "/bar".
In my opinion, the new behavior is less surprising and people relying on the old behavior can easily change their logic.
We can also make it so that users can tell launch to not make this assumption (on a case by case basis or globally) to regain the old behavior if desired.
We can additionally deprecate this in a cycle, warning when providing only a node name for one release (with a way to suppress that warning) and make the assumption of empty namespace in the next release.
The text was updated successfully, but these errors were encountered:
In my opinion, the new behavior is less surprising and people relying on the old behavior can easily change their logic.
Hmm, if you have more than one node in the same process this would wreak havoc.
I agree these unspecified tokens are a bit terse, but they do reflect the fact that launch has no idea what the fully qualified node name is. Perhaps returning unknown or a question mark for its node name would emphasize that. Or maybe we can raise an informative exception on node name request.
Feature request
Feature description
At the moment, if you specify a node name but not a node namespace when using either
Node
orLifecycleNode
, you will get something from launch like<node_namespace_unspecified>/foo
when you ask for the full node name. This is likely surprising to users who are likely not thinking about the namespace when giving the name of the node.My suggestion is to change this so that if you give only a node name to launch that launch should assume you mean that the node namespace should also be set to empty. That way you avoid the situation where launch knows the name of the node but not the namespace.
Implementation considerations
This will break users that are setting a namespace explicitly in the source code but not in their launch files. For example, if the user put "ping" as the namespace and "foo" as the node name in the source code, but then put only "bar" as the node name in the launch file, before this change it would result in the node name being "ping/bar", but after this change it would be just "/bar".
In my opinion, the new behavior is less surprising and people relying on the old behavior can easily change their logic.
We can also make it so that users can tell launch to not make this assumption (on a case by case basis or globally) to regain the old behavior if desired.
We can additionally deprecate this in a cycle, warning when providing only a node name for one release (with a way to suppress that warning) and make the assumption of empty namespace in the next release.
The text was updated successfully, but these errors were encountered: