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

Overlapping property with root property "" creates invalid YAML #363

Closed
ljacqu opened this issue Aug 26, 2023 · 1 comment
Closed

Overlapping property with root property "" creates invalid YAML #363

ljacqu opened this issue Aug 26, 2023 · 1 comment
Labels
Milestone

Comments

@ljacqu
Copy link
Member

ljacqu commented Aug 26, 2023

Reported by Wector11211—

Defining a property at empty string "" and another one like path "enabled" will result in invalid YAML being produced:

? ''
:   foo:
        # Comment that is present on all instances
        servers: []
    bar:
        # Comment that is present on all instances
        servers: []
enabled: true

I confirmed that this worked in 1.3. Expected would be an exception just like when two properties use the same path, or one property has a conflict with another property (like foo.bar and foo.bar.baz)

@ljacqu ljacqu added the bug label Aug 26, 2023
@ljacqu ljacqu added this to the 1.4.1 Release milestone Aug 26, 2023
ljacqu added a commit that referenced this issue Aug 27, 2023
@ljacqu
Copy link
Member Author

ljacqu commented Aug 27, 2023

(Kind of) breaking change

  • Prior to 1.4.0, ConfigMe "tolerated" a property at path "" to exist alongside other properties. This was never the intention since the paths of multiple properties overlap, which ConfigMe otherwise prevents. Conflicts are now also prevented for root properties (= property at path "").

If you used this behavior previously, put the root property under some other path. With a class implementing MigrationService, you can move existing data from the root property to the new path. See Wiki: Migration service

@ljacqu ljacqu closed this as completed Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant