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 writing config.toml and other files if no significant changes. #595

Closed
wants to merge 2 commits into from

Conversation

anforowicz
Copy link
Contributor

After this commit audits.toml, config.toml, and imports.lock will not be written if their contents wouldn't have changed ("contents" in a business logic sense - ignoring comments and/or formatting differences).

Fixes #589

After this commit `audits.toml`, `config.toml`, and `imports.lock` will
not be written if their contents wouldn't have changed ("contents" in a
business logic sense - ignoring comments and/or formatting differences).

Fixes mozilla#589
@anforowicz
Copy link
Contributor Author

/cc @danakj

@anforowicz
Copy link
Contributor Author

Ooops... I neglected to update test expectations... Let me fix this...

@anforowicz
Copy link
Contributor Author

Ooops... I neglected to update test expectations... Let me fix this...

Done

  • unknown_field_config - apparently unknown fields to not interfere with parseability of toml files, so now this succeeds. Being resilient to old or future fields seems desirable in general.
  • invalid_formatting - this is what this PR is all about - ignoring inconsequential formatting changes
  • project-json and project-suggest-json - AFAICT this just reordered some toml items, but made no "actual" changes. So, this LGTM.
  • dump-graph-full and dump-graph-full-json. The changed expectation here LGTM, but I only reviewed them in a somewhat shallow way. Please shout if there is some additional manual verification that I should attempt.

Copy link
Collaborator

@mystor mystor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I explain in #589 (comment), I don't think this is the approach we want to take. Marking as requesting changes for now.

@anforowicz
Copy link
Contributor Author

Abandoning this PR based on #589 (comment)

@anforowicz anforowicz closed this Mar 18, 2024
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.

cargo vet certify unnecessarily reformats config.toml
2 participants