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

Correct Map keys must be unique warnings in definitions YAML #1753

Open
1 of 3 tasks
dougbu opened this issue Jan 4, 2024 · 0 comments
Open
1 of 3 tasks

Correct Map keys must be unique warnings in definitions YAML #1753

dougbu opened this issue Jan 4, 2024 · 0 comments

Comments

@dougbu
Copy link
Member

dougbu commented Jan 4, 2024

When developers have definitions/shared/linux.yaml open in VS Code and perhaps other editors, they'll observe numerous Map keys must be unique errors. These errors don't impact our builds or commands like .\osob-cli.cmd definitions b/c parsers from YamlDotNet ignore the problem and chooses the last value (if the values are different). However the errors make it more difficult to find real problems in the YAML.

One issue is with definitions such as

- <<: *Windows11Client
  <<: *ServicingSubscription
  Name: windows.11.amd64.client.svc
  Public: false

The << pseudo-key appears twice. Our current version of YamlDotNet doesn't handle e.g., <<: [ *Windows11Client, *ServicingSubscription ] when the merged maps contain lots of references. I haven't tested enough to confirm whether the issue is the depth of references to some of our anchors, the overall complication of our YAML, or something else.

likely fix would be to upgrade to a more recent YamlDotNet version. We're at v6.0.0 (published 2019-03-15) though v13.7.1 has been out for 3 months (at the time of this writing). Interesting fixes for YAML deserialization include:

Release Note Category

  • Feature changes/additions
  • Bug fixes
  • Internal Infrastructure Improvements

Release Note Description

Upgraded to a new YamlDotNet version (v13.7.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant