Skip to content

Conversation

@trask
Copy link
Contributor

@trask trask commented Nov 15, 2025

@raphw raphw merged commit 7e753c6 into raphw:master Nov 16, 2025
8 checks passed
@raphw
Copy link
Owner

raphw commented Nov 16, 2025

Good catch, thanks.

@raphw raphw self-assigned this Nov 16, 2025
@raphw
Copy link
Owner

raphw commented Nov 17, 2025

I just went through the project, and I wonder if this is a fix, or changing behavior.

Instead of getProject().fileTree(getTarget()).getFiles()), we now only have getFiles(). I am pretty sure that there is a reason for this call.

I also found that getProject() is still called in AbstractByteBuddyTaskConfiguration, and in AbstractByteBuddyTask. Are those uses also problematic, or does this not count as those are used to setup the task, and not to execute it?

@trask

@trask
Copy link
Contributor Author

trask commented Nov 18, 2025

I just went through the project, and I wonder if this is a fix, or changing behavior.

Instead of getProject().fileTree(getTarget()).getFiles()), we now only have getFiles(). I am pretty sure that there is a reason for this call.

I think it's the same behavior

The old code:

The new code:

FWIW, we haven't seen any issue since implementing similar local patch: open-telemetry/opentelemetry-java-instrumentation#15313

I also found that getProject() is still called in AbstractByteBuddyTaskConfiguration, and in AbstractByteBuddyTask. Are those uses also problematic, or does this not count as those are used to setup the task, and not to execute it?

these haven't shown up as problematic for us, though we haven't finished updating the entire build to be configuration cache friendly yet: https://github.com/open-telemetry/opentelemetry-java-instrumentation/pulls?q=is%3Apr+Gradle+cache+in%3Atitle+is%3Aclosed+merged%3A%3E2025-11-11

@raphw
Copy link
Owner

raphw commented Nov 18, 2025

It seems like the file tree resolution was indeed not meaningful. Still confusing to me how the other uses are ok, though, but it is neither obvious how they could be avoided. I will just keep this and wait for feedback if something needs to be adjusted.

@trask trask deleted the gradle-config-cache-friendly branch November 18, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants