Skip to content

Document OkHttp 3 source compatibility in AGENTS.md - #60320

Merged
cortinico merged 1 commit into
mainfrom
cipolleschi/document-okhttp3-source-compatibility
Nov 26, 2026
Merged

cortinico merged 1 commit into
mainfrom
cipolleschi/document-okhttp3-source-compatibility

Conversation

@cipolleschi

Copy link
Copy Markdown
Contributor

Summary

#58971 introduced okhttp3.HttpUrl.Companion.toHttpUrlOrNull, which is unavailable in OkHttp 3.14.9. Downstream consumers building React Native from source with that version failed to compile, leading to the revert in #60318. Tests using a newer OkHttp version did not cover the compatibility requirement.

Add an explicit rule to the OSS root AGENTS.md: shared Android Java and Kotlin code, including devsupport, must remain source-compatible with OkHttp 3.14.9. The guidance names the incompatible companion extension, gives Request.Builder().url(...) as a compatible alternative, and explains that the okhttp3 package name persists in newer major versions. Contributors changing OkHttp usage must compile affected sources against OkHttp 3, run relevant tests with the repository's configured version, and record the selected versions and validation results in the PR.

Changelog

[INTERNAL] [CHANGED] - Document the OkHttp 3 source compatibility requirement for Android contributions

Test Plan

  • node_modules/.bin/prettier --check AGENTS.md passed with the repository configuration.
  • node_modules/.bin/markdownlint-cli2 AGENTS.md '#**/__docs__/*.md' passed with zero issues.
  • git diff --check passed.
  • Reviewed the diff to confirm only AGENTS.md changes. Runtime tests were not run for this documentation change.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 26, 2026
@github-actions github-actions Bot added the Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. label Nov 26, 2026
@cortinico
cortinico merged commit fa3f4f2 into main Nov 26, 2026
61 of 62 checks passed
@cortinico
cortinico deleted the cipolleschi/document-okhttp3-source-compatibility branch November 26, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants