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

fix: generate valid toml when outputting nested structs #936

Merged
merged 3 commits into from
Mar 1, 2023

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Mar 1, 2023

Related issue(s)

Resolves #934

Description

Summary of changes

toml wasn't automatically ordering fields before tables in the toml it generated so we were manually partitioning the input map to ensure this happens. We however not we're enforcing this for nested tables which also include non-table fields.

toml has been since updated to handle this automatically so I've updated to the new version.

Dependency additions / changes

toml has been bumped to 0.7.2

Test additions / changes

Added a regression test for #934

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.
  • This PR requires documentation updates when merged.

Additional context

@TomAFrench TomAFrench changed the title fix: properly order nested tables to generate valid toml fix: generate valid toml when outputting nested structs Mar 1, 2023
@TomAFrench TomAFrench added this pull request to the merge queue Mar 1, 2023
Merged via the queue into master with commit ba947a7 Mar 1, 2023
@TomAFrench TomAFrench deleted the struct-inputs-toml-issue branch March 1, 2023 16:53
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.

Error: values must be emitted before tables in nargo prove
2 participants