launch icon indicating copy to clipboard operation
launch copied to clipboard

argument collision in included files (xml and yaml)

Open asherikov opened this issue 2 months ago • 2 comments

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • humble
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

test.yaml

   launch:
       - include:
             file: "$(find-pkg-share my_package)/launch/inc1.yaml"
       - include: 
             file: "$(find-pkg-share my_package)/launch/inc2.yaml"

inc1.yaml

   launch:
       - arg: {name: "my_parameter", default: "my_parameter_value_1"}
       - executable:
             cmd: "echo inc1 $(var my_parameter)"
             output: "screen"

inc2.yaml

   launch:
       - arg: {name: "my_parameter", default: "my_parameter_value_2"}
       - executable:
             cmd: "echo inc2 $(var my_parameter)"
             output: "screen"

Output:

   [INFO] [echo-1]: process started with pid [86076]
   [INFO] [echo-1]: process has finished cleanly [pid 86076]
   [INFO] [echo-2]: process started with pid [86078]
   [echo-1] inc1 my_parameter_value_1
   [INFO] [echo-2]: process has finished cleanly [pid 86078]
   [echo-2] inc2 my_parameter_value_1

Actual behavior

Default value of my_parameter in inc2 is overrided by default value of parameter with the same name in inc1

Expected behavior

Parameters in separate files should not collide.

Additional information

The issue can be avoided by additionally scoping each include with group, however, I strongly believe that scoping should be implied by inclusion.

asherikov avatar Dec 19 '24 09:12 asherikov