occasionally gradle goes crazy and will give me ei...
# community-support
c
occasionally gradle goes crazy and will give me either a compile or runtime failure that makes 0 sense. Seems like it's got some bad output its reusing somewhere. running
./gradlew clean
doesn't seem to help. Even
./gradlew clean && rm -rf .gradle build
doesn't seem to help all the time (sometimes). Where else is gradle potententially keeping some of my projects outputs (aside from downloads)? is there an option I could run to say don't reuse anything? Is there a good way to even report this kind of issue? I can tar up any and everything but a minimal reproducer would not be likely because it's not always a thing, and so I wouldn't know how to reduce it since even the correct code might not get into that state. note: I've disabled build cache locally in hopes of solving this, no luck.
p
--rerun-tasks
should do what it says and rerun all tasks
If it's about tasks, it could be that some plugin you use or build logic has flaws in input/output declaration. My. advice would be to try reduce your reproducer by removing bits of logic until you can't reproduce anymore.
c
it's not consistent without changing any code
so that wouldn't work
p
I'm advising to reduce your build logic, not your code
c
right, but I could remove build logic and never see it, but not because the problem has been removed
p
You're saying it's an intermitent problem?
c
yes, which I believe I said in the OP, although not using that word
p
Got it
For intermitent issues what I do is find a scenario that sometimes reproduce the problem, and automate repeating it. Then figure out some iteration count that allows you to reproduce with confidence (10, 100, 1000, YMMV). Once you have that you can start removing pieces until it doesn't fail anymore.
c
like it just failed, so I ran with --info, and it decided "nope I'm fine"
🤦‍♂️
p
Anyway, I hope the above helps
👍 1
v
Iirc you could for example use the
gradle-profiler
for the repeated running.
c
it's usually pretty consistent once it starts failing, it's just not consistent otherwise. For example. This is failing to build in this job, and only this job. This job is only running
classes
I've even tried blowing away githubs cache's for the repo. It always sticks at the same point. I can't reproduce it locally, and because it's never finishing the build I can't get a scan. https://github.com/xenoterracide/spring-app-commons/actions/runs/8487960850/job/23256524112