-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Improve docs for snapshot updates #479
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This attempts to clarify when snapshots are written to draft `.snap.new` files as opposed to overwriting `.snap` files
Requires #481 to pass |
max-sixty
added a commit
to max-sixty/insta
that referenced
this pull request
May 2, 2024
In an effort to simplify the configs, this merges the `INSTA_UPDATE` and `INSTA_FORCE_UPDATE`. I don't think it's possible to require these both; they naturally fit into the same config setting. I realized after starting this that we want to be careful about supporting new & old versions of `cargo-insta`. So this takes a conservative approach, only changing `insta` at first, but with the future updates to `cargo-insta` commented in the code. I realize that adds a bit of complication; though on balance I think simplifying the configs would be helpful. It stacks on mitsuhiko#479, which should merge first. I'd be open to writing some tests for this if that'd be helpful.
max-sixty
added a commit
to max-sixty/insta
that referenced
this pull request
May 2, 2024
In an effort to simplify the configs, this merges the `INSTA_UPDATE` and `INSTA_FORCE_UPDATE`. I don't think it's possible to require these both; they naturally fit into the same config setting. I realized after starting this that we want to be careful about supporting new & old versions of `cargo-insta`. So this takes a conservative approach, only changing `insta` at first, but with the future updates to `cargo-insta` commented in the code. I realize that adds a bit of complication; though on balance I think simplifying the configs would be helpful. It stacks on mitsuhiko#479, which should merge first. I'd be open to writing some tests for this if that'd be helpful.
Starting again, I would change some of the names:
...but it would be an annoying backward-compat cycle given we want to support different versions of |
This is ready to merge & not controversial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This attempts to clarify when snapshots are written to pending
.snap.new
files vs. to overwriting.snap
files vs. doing nothing to snapshots.It also changes
.with_extension(...)
, lmk if you prefer those on a separate PR