Skip to content

Fix a binary-incompatible API change in Interceptor.Chain#9360

Merged
swankjesse merged 2 commits intomasterfrom
jwilson.0310.fix_binary_break
Mar 10, 2026
Merged

Fix a binary-incompatible API change in Interceptor.Chain#9360
swankjesse merged 2 commits intomasterfrom
jwilson.0310.fix_binary_break

Conversation

@swankjesse
Copy link
Collaborator

No description provided.

@swankjesse swankjesse requested a review from yschimke March 10, 2026 14:42
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@yschimke what’s the command to generate or validate this file? I couldn’t figure out how to run it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

apiDump?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This didn’t work for me. Did it regress with AGP 9 ?

rm -rf okhttp/api/android/okhttp.api
./gradlew apiDump
git diff HEAD

Copy link
Collaborator

Choose a reason for hiding this comment

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

apiCheck is working if I change something.

Copy link
Collaborator

@yschimke yschimke Mar 11, 2026

Choose a reason for hiding this comment

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

apiDump is correctly reverting those changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wonder what’s different between our environments....

$ ls  $ANDROID_HOME
build-tools	emulator	fonts		licenses	ndk		platform-tools	platforms	skins		sources		system-images

$ cat local.properties
sdk.dir=/Users/jessewilson/Library/Android/sdk

$ rm  okhttp/api/android/okhttp.api

$ ./gradlew apiDump --rerun-tasks
...

BUILD SUCCESSFUL in 456ms
58 actionable tasks: 1 executed, 57 up-to-date
Configuration cache entry reused.

$ git status
On branch jwilson.0310.headers_limits
Your branch is up to date with 'origin/jwilson.0310.headers_limits'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	deleted:    okhttp/api/android/okhttp.api

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooops, I was testing on the jvm file.

Kotlin/binary-compatibility-validator#312

Copy link
Collaborator

Choose a reason for hiding this comment

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

Workaround in #9375

I saw build flakes in CI on JDK8 without this

    file:///home/runner/work/okhttp/okhttp/mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt:156:21
    Symbol is declared in an unnamed module which is not read by current module.
@swankjesse swankjesse merged commit 385e70f into master Mar 10, 2026
27 checks passed
@swankjesse swankjesse deleted the jwilson.0310.fix_binary_break branch March 10, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants