Skip to content
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

YAML merge key parsing not correct under lists/array environment #150

Closed
qiayuanl opened this issue Jul 23, 2021 · 2 comments · Fixed by #153
Closed

YAML merge key parsing not correct under lists/array environment #150

qiayuanl opened this issue Jul 23, 2021 · 2 comments · Fixed by #153

Comments

@qiayuanl
Copy link

Hello, I found that the YAML merge key is working well under the struct environment but not correct under the lists/array environment.

YAML code:

  defaults: &defaults
    A: 1
    B: 2
  struct:
    <<: *defaults
    A: 23
    C: 99
  array:
    - <<: *defaults
      A: 23
      C: 99

roslaunch outupt:

array:
- A: 23
  B: 2
  C: 99
defaults:
  A: 1
  B: 2
struct:
  A: 23
  B: 2
  C: 99

mon launch output:

array:
- '<<':
    A: 1
    B: 2
  A: 23
  C: 99
defaults:
  A: 1
  B: 2
struct:
  A: 23
  B: 2
  C: 99

Difference:

Note the causing by the lists/array environment

- '<<':
    A: 1
    B: 2
@xqms
Copy link
Owner

xqms commented Jul 27, 2021

Hi @QiayuanLiao, thanks for the report! Any deviation from roslaunch is definitely a bug.

Merge keys are not official YAML syntax and are not supported by the YAML parser we are using (yaml-cpp). So @Cartoonman implemented merge key handling inside rosmon... See #117 for details.

I guess a small fix is needed, but I don't have time to look at it at the moment. If you can come up with a PR I'd be happy to look at it, though.

@xqms
Copy link
Owner

xqms commented Aug 2, 2021

PR #153 should fix your issue. Could you please test it?

@xqms xqms closed this as completed in #153 Aug 2, 2021
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 a pull request may close this issue.

2 participants