fix(config-cache): Resolve CLI path via ValueSource task input (GRADLE-70)#1264
Open
runningcode wants to merge 2 commits into
Open
fix(config-cache): Resolve CLI path via ValueSource task input (GRADLE-70)#1264runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
0ae0479 to
889add0
Compare
0xadam-brown
approved these changes
Jun 4, 2026
romtsn
reviewed
Jun 8, 2026
| ### Fixes | ||
|
|
||
| - Compose tracing no longer adds the Sentry modifier multiple times for chained modifiers (e.g. `Modifier.fillMaxSize().padding()`) on Kotlin 2.2 and newer ([#1253](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1253)) | ||
| - Resolve the sentry-cli path as a task input instead of memoizing it in a static field, fixing stale-path build failures when switching branches with the configuration cache enabled ([#1264](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1264)) |
Member
There was a problem hiding this comment.
need to rebase and move this to Unreleased again, since there has been a new version released in the meantime
romtsn
reviewed
Jun 8, 2026
| ### Fixes | ||
|
|
||
| - Compose tracing no longer adds the Sentry modifier multiple times for chained modifiers (e.g. `Modifier.fillMaxSize().padding()`) on Kotlin 2.2 and newer ([#1253](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1253)) | ||
| - Resolve the sentry-cli path as a task input instead of memoizing it in a static field, fixing stale-path build failures when switching branches with the configuration cache enabled ([#1264](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1264)) |
Member
There was a problem hiding this comment.
Suggested change
| - Resolve the sentry-cli path as a task input instead of memoizing it in a static field, fixing stale-path build failures when switching branches with the configuration cache enabled ([#1264](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1264)) | |
| - Resolve the sentry-cli path as a task input instead of memoizing it in a static field, fixing stale-path build failures when switching branches with the configuration cache enabled ([#1264](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1264)) | |
| - This fixed the issue where sentry-cli could not be found (`A problem occurred starting process 'command ../sentry-cliXXX.exe'`) |
maybe add this for better SEO and discoverability?
Contributor
Author
There was a problem hiding this comment.
Good idea, added it
…E-70) The sentry-cli path was memoized in a static field on SentryCliProvider. That field survives across builds in the Gradle daemon and is not invalidated when switching branches, so a stale path pointing at a sentry-cli temp file from a previous checkout could be reused, causing "No such file or directory" failures when configuration caching is on. Remove the static memoization and stop threading the cli path through the configure() call chain. Each SentryCliExecTask now resolves the path itself in asSentryCliExec() via the existing cliExecutableProvider() ValueSource, which is properly invalidated on branch switches, and wires its own buildDirectory input. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
889add0 to
ca5f687
Compare
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ca5f687 to
eb3267a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The sentry-cli path was memoized in a
@Volatilestatic field onSentryCliProvider. That field survives across builds within the Gradle daemon and is not invalidated when switching branches, so a stale path pointing at a sentry-cli temp file extracted under a previous checkout could be reused — producingCould not start '…/.sentry-cliXXXX.exe' … No such file or directoryfailures when the configuration cache is enabled.This removes the static memoization and stops threading the cli path (
cliExecutable: Provider<String>) through theconfigure()call chain into every task. EachSentryCliExecTasknow resolves the path itself inasSentryCliExec()via the existingcliExecutableProvider()ValueSource(which Gradle correctly invalidates on branch switches), and wires its ownbuildDirectorytask input.This is one of two PRs splitting the config-cache work; the companion PR #1263 (GRADLE-82) makes the telemetry org lookup config-cache friendly. This PR keeps the
cliExecutableparameter onconfigure()because telemetry still needs it onmain; whichever PR lands second will drop that now-unused parameter in a small rebase.Fixes GRADLE-70
🤖 Generated with Claude Code