-
Notifications
You must be signed in to change notification settings - Fork 220
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
Adding cleanRecordPaparazzi...
task to help tidy up orphaned snapshots
#1316
Conversation
cleanRecordPaparazzi...
task to help tidy up orphaned snapshots
cleanRecordPaparazzi...
task to help tidy up orphaned snapshotscleanRecordPaparazzi...
task to help tidy up orphaned snapshots
paparazzi-gradle-plugin/src/main/java/app/cash/paparazzi/gradle/PaparazziPlugin.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this will close #529.
@jamesmosley55 explored this in the past and we had preferred an more incremental approach via https://docs.gradle.org/current/userguide/custom_tasks.html#incremental_tasks vs a delete-all-then-record approach. Imagine changing the name of test method in FormBlocker, and deleting 1000+ images and rewriting 998? Maybe I'm prematurely optimizing?
What James was exploring was creating an index of image paths when recording and checking that on rerun to do an in-memory diff, eliminating the paths that are no longer present.
Also, can we add tests as part of this PR?
paparazzi-gradle-plugin/src/main/java/app/cash/paparazzi/gradle/PaparazziPlugin.kt
Show resolved
Hide resolved
paparazzi-gradle-plugin/src/main/java/app/cash/paparazzi/gradle/PaparazziPlugin.kt
Show resolved
Hide resolved
paparazzi-gradle-plugin/src/main/java/app/cash/paparazzi/gradle/PaparazziPlugin.kt
Outdated
Show resolved
Hide resolved
i feel like if you're calling
yep! working on that |
cleanRecordPaparazzi...
task to help tidy up orphaned snapshotscleanRecordPaparazzi...
task to help tidy up orphaned snapshots
This adds a global task
deletePaparazziSnapshots
and variant-specific taskscleanRecordPaparazzi[Debug]
A clean-record task helps identify and tidy-up orphaned snapshots after test coverage/naming changes.