Skip to content

Improve --update-data #15265

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

Closed
ikonst opened this issue May 18, 2023 · 1 comment · Fixed by #15283
Closed

Improve --update-data #15265

ikonst opened this issue May 18, 2023 · 1 comment · Fixed by #15283
Labels

Comments

@ikonst
Copy link
Contributor

ikonst commented May 18, 2023

Current --update-data is somewhat crude:

  • works by search and replace of substrings
  • handles only errors, not warnings or notices
  • only changes existing notes, does not add/remove notes
  • does not handle multiline notes

While handling all sorts of data suites is a large undertaking, I think we can do a better job for 'check' tests. I have some rudimentary code (that I used privately for a PR that caused a lot of changes) and I wanted to gauge interest on contributing it.

p.s. I agree "snapshots tests", at their worst, can result in cavalier approach to test failures. I hope code reviews can compensate for this. The downside to not having an efficient update mechanism is withholding beneficial refactors due to the cost associated.

@ikonst ikonst added the feature label May 18, 2023
@JelleZijlstra
Copy link
Member

Sounds like a good idea! PRs that improve error messages often need a lot of tweaks to tests, so it's good to make that easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants