-
Notifications
You must be signed in to change notification settings - Fork 109
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
Preserve the comments of the "cli.toml" on changes #2002
Conversation
82ba41f
to
d69605d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left lots of nits, none of them critical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional (manual) testing I would like to see done:
- Run multiple CLI processes concurrently / in parallel, such that they race to mutate a shared config file. Demonstrate that this does not corrupt or clear the config file, and describe the specific behavior.
- Manually create an ill-formed config file, run a CLI process that would mutate it, and demonstrate that the ill-formed file is not (further) corrupted or cleared. Describe the specific behavior.
I added an automated |
71d3830
to
82743f2
Compare
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io> Signed-off-by: Mario Montoya <mamcx@elmalabarista.com>
82743f2
to
2b38e8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing those comments!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Description of Changes
We would like to preserve a user's manual edits, including comments, so now 'tolm_edit' is used for mutating the config file.
Closes #1798.
API and ABI breaking changes
Marked breaking because of the change of crate to parse and save. Is the low-level used by 'toml'.
Expected complexity level and risk
2:
Marked breaking because of the change of how to parse and save the file (that mutates instead of generating a fresh immutable view of the config) even if according to test there is none.
Testing