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

Using new config file for ignoring & force update #329

Closed
max-sixty opened this issue Jan 3, 2023 · 5 comments
Closed

Using new config file for ignoring & force update #329

max-sixty opened this issue Jan 3, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@max-sixty
Copy link
Sponsor Contributor

What happened?

I'm not sure if I'm making a basic mistake here, but thought it would be helpful on the margin to report this in case I'm not:

I have the following config file at insta.yaml:

behavior:
  force_update: true
review:
  include_ignored: false
  include_hidden: false

But running:

cargo insta test -p prql-compiler --lib
  • Doesn't force update snapshots. Running with --force-update-snapshots makes a change that the previous command had not made
  • Displays a warning warning: some paths are not picked up by cargo insta, use --include-ignored and --include-hidden if you have snapshots in ignored or hidden paths.. Possibly those configs only work under review:?

I confirmed that the config file is getting read (if I make it an invalid YAML file, cargo insta fails)

Reproduction steps

No response

Insta Version

1.24

rustc Version

rustc 1.65.0 (897e37553 2022-11-02)

What did you expect?

No response

@max-sixty max-sixty added the bug Something isn't working label Jan 3, 2023
@mitsuhiko
Copy link
Owner

include_ignored and include_hidden are already set to false by default so that won't do anything. I'm not sure why force_update wouldn't be honored however. I ran that against insta itself just now and it updates properly. Any chance this is running an old version of cargo-insta? Though that flag is picked up by insta itself so not sure why that would break anything.

@ngryman
Copy link

ngryman commented Jan 4, 2023

It seems to be a broader issue, review.include_ignored: true is also not honored (re #326).

image

@max-sixty
Copy link
Sponsor Contributor Author

Sorry, I think cargo-insta was updated but insta in the repo wasn't. force-update does work now that both have been updated.

include_ignored and include_hidden are already set to false by default so that won't do anything.

Yes, makes sense. Is there any way to disable the warning when running tests? That has returned.

(OK if the answer is — "it could be if you want to do a proper contribution"!)

@mitsuhiko
Copy link
Owner

I'm going to revisit this warning now. There should be a better way to accomplish this.

@max-sixty
Copy link
Sponsor Contributor Author

Thanks @mitsuhiko ! Closing this as completed by #334. Very grateful for all your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants