This message was deleted.
# caching
s
This message was deleted.
c
Inputs can be marked as @Internal to avoid being part of cache key.
j
That's true but can't that only be done at the definition of the task, i.e by the google proto plugin. Or is there a way for me to configure an existing task?
c
which property appears to be problematic? See many properties on GenerateProtoTask (assuming that’s the one), some of which are @Internal relating to executables.
For example, the code to find protoc is:
Copy code
String protocPath = computeExecutablePath(protocLocator.get())
    List<String> baseCmd = [ protocPath ]
    baseCmd.addAll(dirs)
…based off of protocLocator:
Copy code
@Internal("Input captured by getExecutables()")
  abstract Property<ExecutableLocator> getProtocLocator()
j
In the latest version it is the 'alternativePaths' property. For me it picks up a windows exe which has some hash, while on CI it picks up a linux exe which has a different hash. And yep, that's the correct task
c
hmm. all those appear to be
@Internal
. There is
getSnapshotArtifacts
that uses the alternate paths, however, perhaps that is the problem. Not aware of a way to override those annotations outside the task.
j
Oh! Sorry, I see. I was referring to the latest released version. Indeed in master they seem to have 'fixed' it. So it sounds like I just need to wait for a release
c
awesome!
j
aha and they even have a commit which is detailing exactly my case. https://github.com/google/protobuf-gradle-plugin/commit/8df229f8dc8e4521882fbf69806ab91ba4d51d5e Thanks again! Hopefully it's not too long for a release this will be very valuable for me.
❤️ 1
v
As a work-around as far as I remember, you would make a subclass of that task, there override the property in question and give it the annotation you want it to have.
n
@Clay Johnson just worked on this! Please push Google to make a release if you have any channels available with them.