-
Notifications
You must be signed in to change notification settings - Fork 354
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
Regression with Pitest 1.11.6 #1175
Comments
Hi David, There error is being thrown by the arcmutate base plugin rather than pitest. We've seen this error after switching branches without cleaning, so stale bytecode is present which invalidates assumptions. We'll put a fix out so this doesn't create an error, however you may encounter further issues if stale bytecode is present. |
Hi Henry! Where is said bytecode cached? I'm running the build through the Gradle plugin, and cleaning the project plus disabling task caches does nothing to get around the problem. The verbose logging doesn't hint anything about locations for bytecode. |
Or maybe I'm missing something about the perspective you're looking at the problem from. In my case, the build works with Pitest 1.11.5, and if the only thing I do is to change the version to 1.11.6, the mutation test crashes. |
By "cached" I meant still present in the build dir (pitest doesn't store any bytecode). We've seen this sort of issue with maven after branch switches, and a clean has always fixed it. Gradle's caching complicated things, but it sounds like something similar might be happening. The only changes between pitest 1.11.5 and 1.11.6 are some update of links from http to https, and a bug fix that prevents filters being applied twice if you add some configuration to a filter that is active by default. It's hard to see how either change could result in this failure. I think you may be using an old version of the base/extended mutators plugin. The latest version is https://search.maven.org/artifact/com.groupcdg.arcmutate/base/1.0.2/jar Its maven coordinates changed, so you may have missed the update. This particular error should not occur with the latest version, although you may encounter a similar issue if you have bytecode where the number of parameters in a method have changed since client code was compiled against it. |
With the new coordinates, the issue no longer persists, so that's good. But the issue as a whole makes me worried. |
After some arduous debugging I suspect that the issue is caused by unstable hashes which is why there is a difference between JDK 11 and JDK 17, and I believe the culprit is
For a failing run, the For a passing run, it's run after some other interceptors: When some of the other interceptors have been run, the The reason why the mutations are removed is because of |
I can confirm that when I change the package of the problematic module, I can reproduce the issue consistently on both JDK 11 and JDK 17, which means there was a bug in In conclusion, if the set operation is changed to produce an ordered set, the |
Thanks for digging into this. I'll put a change in so features are applied in a consistent and predicatable order. |
One of my tests (which I unfortunately cannot disclose started failing when I bumped Pitest from 1.11.5 to 1.11.6. The project is using
com.groupcdg.pitest:extended-mutators:0.1.5
as well:The text was updated successfully, but these errors were encountered: