Improve docs for snapshot updates#479
Merged
mitsuhiko merged 6 commits intomitsuhiko:masterfrom May 15, 2024
Merged
Conversation
This attempts to clarify when snapshots are written to draft `.snap.new` files as opposed to overwriting `.snap` files
Collaborator
Author
|
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.
Collaborator
Author
|
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 |
Collaborator
Author
|
This is ready to merge & not controversial |
max-sixty
added a commit
that referenced
this pull request
Sep 15, 2024
In an effort to simplify the configs, this merges the `INSTA_UPDATE` and `INSTA_FORCE_UPDATE` configs. Conceptually, `INSTA_FORCE_UPDATE` overwrites `INSTA_UPDATE`; 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 and this makes a step towards that.~ Adjusted to use the underlying version of `insta`; I think a good approach! ~It stacks on #479, which should merge first.~ Merged ~I'd be open to writing some tests for this if that'd be helpful.~ Written
This file contains hidden or 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
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.newfiles vs. to overwriting.snapfiles vs. doing nothing to snapshots.It also changes
.with_extension(...), lmk if you prefer those on a separate PR