Closed xenoterracide closed 1 week ago
I can't reproduce this. I cloned the repo and checked out the external/bug/ep
branch, and this is what I see:
$ ./gradlew compileJava --console=plain
Reusing configuration cache.
> Task :compileJava FAILED
/private/tmp/gradle-semver/src/main/java/com/xenoterracide/gradle/semver/AbstractGitService.java:28: error: [NullAway] dereferenced expression this.git is @Nullable
this.git.checkout();
^
(see http://t.uber.com/nullaway )
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
BUILD FAILED in 1s
1 actionable task: 1 executed
Configuration cache entry reused.
I was building using JDK 17.
CI reproduces it, tests are set to require java 21, while compile is 11.
https://github.com/xenoterracide/gradle-semver/actions/runs/8066098577/job/22033383615
Interesting. I cannot repro locally on a Mac building with JDK 11, 17, or 21. Not sure what's happening. In any case I expect the issue is with the Var check and not with NullAway.
hmm... I run linux locally, and so does the builder... I wonder if it could secretly have to do with Java on Linux... any chance you have the ability to try that? I sadly do not have access to a Mac.
hmm... I run linux locally, and so does the builder... I wonder if it could secretly have to do with Java on Linux... any chance you have the ability to try that? I sadly do not have access to a Mac.
Maybe you can spin up a Mac in your CI config to see if there is a difference? Unfortunately I don't have time to try on Linux right now, don't have a box handy.
@xenoterracide do you think we can close this one now? Still don't see how this is an issue in NullAway
🤷🏻♂️ All I'll say is I don't feel like anybody has tried to figure out where the problem is... I can't Tell error prone where the problem is can you? Seems like this is going to be a point-the-finger issue... Leaving me frustrated without a solution.
I can leave this open, but absent a consistent way to reproduce it's hard to dig further.
I feel like you're asking me to spend money on a Mac VM... Whereas Linux VMS are free... I suppose if you want I could give you a docker container? I presume you can run docker which is a Linux VM...
If you could create a docker container under which this repros that would be helpful. If that's a pain, if you can give the output of ./gradlew --version
on a machine where this repros, I can see if there's anything that jumps out at me.
So, still haven't gotten around to this, but I saw this issue yesterday with an UnusedVariable
... so I'm going to close anyways. I wish it wasn't always in the middle of more complicated things.
maybe this is an issue with errorprone, I'll cross report. None of these
@Var
's are not effectively final.this.git
is variable though.Full source here https://github.com/xenoterracide/gradle-semver/blob/external/bug/ep/buildSrc/src/main/kotlin/our.javacompile.gradle.kts
https://github.com/google/error-prone/issues/4305