Closed lukas-mercari closed 1 month ago
Thank you for your investigation. I believe the contents of the output directory are changed during the build process, causing the test to fail.
checkIfOutputIsUsed java.lang.AssertionError: Expected count: 0, actual count: 1 summary:ResultSummary(total=1, recorded=0, added=0, changed=1, unchanged=0) at io.github.takahirom.roborazzi.RoborazziGradleProject.checkResultCount(RoborazziGradleProject.kt:327) at io.github.takahirom.roborazzi.RoborazziGradleProject.checkResultCount$default(RoborazziGradleProject.kt:312) at io.github.takahirom.roborazzi.RoborazziGradleProjectTest.checkIfOutputIsUsed(RoborazziGradleProjectTest.kt:204) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
@takahirom Sorry, I ran out of time to finish this today. Unfortunately I don't have a good idea on how gradle works, so all changes take me a bit of time. 😄 Let me double check the behaviour in the next days, possibly also in combination with what we conclude in #363.
Judging from my local runs it works for resolving the error I mentioned in the description -- and thus I can reproduce the issue that #366 fixes again.
@lukas-mercari Thanks! Let me know if you think we should release these PRs. https://github.com/takahirom/roborazzi/pull/374 https://github.com/takahirom/roborazzi/pull/366
@lukas-mercari If you feel like we're getting stuck, I think it's okay to release these changes as they are. I'd rather improve things gradually than aim for perfection. What do you think? If you need more time, that's fine too.
@takahirom Sorry, it got delayed a bit since I went travelling! 🙇 Indeed I think it'd make sense to merge the two PRs.
Thanks!
I sometimes get this error:
It's a bit hard to reproduce, since I believe the configuration cache needs to kick in, but the following steps usually work:
I believe the issue is essentially what is described in https://github.com/gradle/gradle/issues/2016.