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

Warn only if snapshots are found in hidden or ignored locations #334

Merged
merged 2 commits into from Jan 5, 2023

Conversation

mitsuhiko
Copy link
Owner

@mitsuhiko mitsuhiko commented Jan 4, 2023

This changes the current warning that comes up whenever ignored or hidden paths exists to one that only comes up if actual snapshots are found in those locations.

Refs #329

@mitsuhiko
Copy link
Owner Author

Before merging this i also want to make this behavior entirely optional so that it can be disabled if it causes an unnecessary performance burden.

@max-sixty
Copy link
Sponsor Contributor

Thank you v much

One sample of performance, from #319 (comment):

Without ignoring, it is much slower — at least on prql, 3.69s vs. 4.15s with --no-ignore for cargo insta test, including the fixed costs of running the tests.

I guess because:

❯ fd | wc -l
     683

❯ fd -uu | wc -l
  101571

@max-sixty
Copy link
Sponsor Contributor

(as per that issue, checking when writing would get around the perf implications, but be more work, and fail to catch snapshots that are ignored after being written)

@mitsuhiko mitsuhiko merged commit b5e3a04 into master Jan 5, 2023
@mitsuhiko mitsuhiko deleted the feature/warn-if-found-only branch January 5, 2023 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants