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

bump: insta 1.12.0 #366

Merged
merged 1 commit into from
Feb 9, 2022
Merged

bump: insta 1.12.0 #366

merged 1 commit into from
Feb 9, 2022

Conversation

baszalmstra
Copy link
Collaborator

@baszalmstra baszalmstra commented Feb 9, 2022

With the release of insta 1.12.0 a backward-incompatible change was introduced. This caused a large number of snapshot names to become invalid and undeterministic. This was an obscure feature that we admittedly abused.

I removed the use of AutoName from our source code and even moved some of the test results inline, which is a new feature of insta. This should reduce the context switch required when viewing snapshots and their corresponding tests since they are now all in one place. I didn't modify any of the algorithms so I assume the output is still valid, I didn't explicitly check this.

This should also fix the current CI failures.

@baszalmstra baszalmstra added the type: fix Bug fix or report label Feb 9, 2022
@baszalmstra baszalmstra self-assigned this Feb 9, 2022
@codecov
Copy link

codecov bot commented Feb 9, 2022

Codecov Report

Merging #366 (24e39d9) into main (77f1b01) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #366      +/-   ##
==========================================
+ Coverage   82.56%   82.63%   +0.07%     
==========================================
  Files         264      264              
  Lines       15234    15297      +63     
==========================================
+ Hits        12578    12641      +63     
  Misses       2656     2656              
Impacted Files Coverage Δ
crates/mun_syntax/src/tests/parser.rs 100.00% <ø> (ø)
...s/mun_hir/src/code_model/struct/validator/tests.rs 100.00% <100.00%> (ø)
crates/mun_hir/src/expr/validator/tests.rs 100.00% <100.00%> (ø)
crates/mun_hir/src/package_defs/tests.rs 86.04% <100.00%> (+0.68%) ⬆️
crates/mun_hir/src/ty/tests.rs 98.16% <100.00%> (+0.51%) ⬆️
crates/mun_hir/src/utils.rs 80.95% <100.00%> (+0.95%) ⬆️
crates/mun_syntax/src/tests/lexer.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77f1b01...24e39d9. Read the comment docs.

Copy link
Collaborator

@Wodann Wodann left a comment

Choose a reason for hiding this comment

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

A big reason for not having the expected results inline is that they are hard to create and update if the format changes. Instead cargo insta allows you to manage all output files easily.

How has that concern been handled?

@baszalmstra
Copy link
Collaborator Author

A big reason for not having the expected results inline is that they are hard to create and update if the format changes. Instead cargo insta allows you to manage all output files easily.

How has that concern been handled?

Yes "inline snapshots" have been a feature for some time now in insta. Running "cargo insta review" will also update the snapshot in the source code! See https://insta.rs/docs/snapshot-types/#inline-snapshots

@Wodann Wodann merged commit 6fa4e7b into mun-lang:main Feb 9, 2022
@Wodann Wodann added this to the Mun v0.4.0 milestone Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: fix Bug fix or report
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants