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

Avoid ValueAfterTable when serializing configs #101

Merged
merged 1 commit into from
Jul 30, 2022

Conversation

drdrsh
Copy link
Collaborator

@drdrsh drdrsh commented Jul 30, 2022

It seems that the toml serializer maintains the order of fields in the struct in the final file. So we should always put simple fields before nested fields in all serializable structs to avoid ValueAfterTable errors.
These errors occur when the toml serializer is about to produce ambiguous toml structure like the one below

[main]
field1_under_main = 1
field2_under_main = 2

[main.subconf]
field1_under_subconf = 1
field3_under_main = 3 # This field will be interpreted as being under subconf and not under main

@levkk levkk merged commit e591865 into postgresml:main Jul 30, 2022
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 this pull request may close these issues.

None yet

2 participants