[ty] cargo insta test --force-update-snapshots#22313
Conversation
Snapshot tests recently started reporting this warning: > Snapshot test passes but the existing value is in a legacy format. > Please run cargo insta test --force-update-snapshots to update to a > newer format. This PR is the result of that forced update. One file (crates/ruff_db/src/diagnostic/render/full.rs) seems to get corrupted, because it contains strings with unprintable characters that trigger some bug in cargo-insta. I've manually reverted that file, but kept everything else.
|
| @@ -1,7 +1,5 @@ | |||
| --- | |||
| source: crates/ruff_python_formatter/tests/fixtures.rs | |||
| input_file: crates/ruff_python_formatter/resources/test/fixtures/black/cases/fmtskip5.py | |||
There was a problem hiding this comment.
Hmm, why did it remove all the input files. I would very much like to retain this information in some form or another as it is very convenient to navigate to the test file.
There was a problem hiding this comment.
Was this added by insta::glob and not added by datatest? Just a guess
|
It would be nice to merge a solution to the warnings soon, because the warnings are extremely noisy when running tests for ty locally right now |
|
I couldn't figure out a clever way to restore all the |
|
For context, when I looked into why exactly these legacy format warnings were printing, at least some of them were because the old snapshots were only equal to current output after trimming leading newlines. Specifically:
|
## Summary Force-update insta snapshots across all ty crates. Seems like those are maybe from old PRs that were merged after #22313?
Snapshot tests recently started reporting this warning:
This PR is the result of that forced update.
One file (crates/ruff_db/src/diagnostic/render/full.rs) seems to get corrupted, because it contains strings with unprintable characters that trigger some bug in cargo-insta. I've manually reverted that file, but kept everything else.