Skip to content

Map keys must be unique (DUPLICATE_KEY) on anchors #78

@Zayon

Description

@Zayon

The following yaml is a valid docker-compose.yaml declaration but vscode shows a "Map keys must be unique (DUPLICATE_KEY)" error on the <<: *bar line.

version: 3.8

x-foo: &foo
  FOO: FOO

x-bar: &bar
  BAR: BAR

services:
  foo-bar:
    image: my-image
    environment:
      <<: *foo
      <<: *bar

Disabling the docker extension ms-azuretools.vscode-docker make the error disappear.

This issue is fixed in the YAML parser, see eemeli/yaml#21

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions