Skip to content

build(deps): Bump Shadow to 9.6.1 - #6617

Open
runningcode wants to merge 1 commit into
mainfrom
no/fix-shadow-9.6.1
Open

runningcode wants to merge 1 commit into
mainfrom
no/fix-shadow-9.6.1

Conversation

@runningcode

Copy link
Copy Markdown
Contributor

📜 Description

Bumps Shadow from 9.4.1 to 9.6.1 and removes the dependencies { exclude(...) } block from relocateJavaagentLibs in sentry-opentelemetry-agent.

That block never excluded anything. DependencyFilter has no exclude(String), so Kotlin resolved each call to the outer ShadowJar.exclude(String), a file pattern that matches no file. Shadow 9.6.0 applies @ShadowDsl to DependencyFilter (GradleUp/shadow#2090), which turns those calls into a compile error. Rewriting them as exclude(dependency(...)) would be a no-op too: javaagentLibs resolves only Sentry modules, and two of the listed coordinates no longer exist.

The published artifacts keep their contents. Built the agent's distZip and every sample shadow jar on main and on this branch, with --no-build-cache:

  • The POM, sources and javadoc jars, and 5 of the 11 sample jars are byte-identical.
  • In the agent jar and the other 6 sample jars, every entry keeps its name, size and CRC. Only *.kotlin_module entries differ: they move to the end of the archive and lose their Unix mode, because Shadow 9.5.0 now writes them through its new KotlinModuleMetadataTransformer.
  • The agent's .module lists shadowRuntimeElements first instead of last, since Shadow 9.5.0 no longer adds variants in afterEvaluate. Apart from that and the jar hashes, it is identical.
  • Removing the block alone, on Shadow 9.4.1, gives byte-identical artifacts.

💡 Motivation and Context

Dependabot's #6607 makes the same bump, but every build there fails with the compile error above, and its branch is far behind main. This PR replaces it.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🤖 Generated with Claude Code

#skip-changelog

Shadow 9.6 marks DependencyFilter with a DSL marker. The agent's
dependencies { exclude("group:name") } calls had always resolved to the
outer ShadowJar.exclude(String) file pattern, so they never excluded
anything. They now fail to compile. javaagentLibs has none of those
artifacts, so drop the block.

Jar contents are unchanged. Shadow 9.5's KotlinModuleMetadataTransformer
reorders *.kotlin_module entries and drops their Unix mode, and the
shadowRuntimeElements variant now comes first in the .module file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@runningcode
runningcode marked this pull request as ready for review November 16, 2026 09:45
@runningcode
runningcode requested review from a team and adinauer as code owners November 16, 2026 09:45
@runningcode
runningcode requested review from markushi and romtsn and removed request for a team November 16, 2026 09:45
@sentry

sentry Bot commented Nov 16, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.64.0 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 16, 2026
exclude("**/module-info.class")
relocatePackages(this)

// exclude known bootstrap dependencies - they can't appear in the inst/ directory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adinauer do you know what you were trying to do here? they have no effect as this isn't an API on the shadowJar task.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC i copied those from the sample otel had, i'll check

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm (but feel free to wait for @adinauer to respond if you care to, of course).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants