feat(react-native): add event release mode to the build tooling - #4617
Merged
Conversation
Contributor
Contributor
|
Size Change: +3.55 kB (+0.02%) Total Size: 20.3 MB 📦 View Changed
ℹ️ View Unchanged
|
22 tasks
ablaszkiewicz
force-pushed
the
ab/feat/react-native-event-release-mode
branch
from
August 24, 2026 10:08
d2d21b6 to
4906c27
Compare
ablaszkiewicz
changed the base branch from
main
to
ab/fix/react-native-release-coordinates
August 24, 2026 10:08
ablaszkiewicz
force-pushed
the
ab/feat/react-native-event-release-mode
branch
from
August 24, 2026 13:47
4906c27 to
48400f1
Compare
ablaszkiewicz
changed the base branch from
ab/fix/react-native-release-coordinates
to
fix/expo-ios-symbol-upload
August 24, 2026 13:47
Contributor
🦔 ReviewHog reviewed this pull requestFound 0 must fix, 1 should fix, 0 consider. Published 1 finding (view the review). |
Contributor
|
ReviewHog Alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏 |
Contributor
Author
|
This needs to wait for the new CLI - PostHog/posthog#87660 |
ablaszkiewicz
force-pushed
the
ab/feat/react-native-event-release-mode
branch
from
August 24, 2026 18:35
537d17a to
4c95e09
Compare
ablaszkiewicz
marked this pull request as ready for review
August 24, 2026 22:09
Contributor
|
Reviews (1): Last reviewed commit: "fix(react-native): honor an environment ..." | Re-trigger Greptile |
marandaneto
reviewed
Aug 26, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
Automated advisory code review.
A Hermes chunk id is derived from bundle content, so two releases that ship the same JavaScript land on one symbol set. The release lives on that symbol set, so the second release either collides or reports the first one's release. `releaseMode: 'event'` on the Expo config plugin uploads the build's Hermes source maps, iOS dSYMs and Android R8 mappings release-independent. Each exception then resolves its own release from the $app_namespace / $app_version / $app_build the SDK already sends. The choice reaches every upload hook: POSTHOG_RELEASE_MODE in the Xcode bundle phase, POSTHOG_NO_RELEASE_BIND in the dSYM phase, and a posthog.releaseMode entry in android/gradle.properties that both the Hermes upload and the com.posthog.android mapping upload read. posthog-xcode.sh and posthog.gradle also accept the mode directly. Both pin the resolved value into the CLI's environment, so a variable inherited from the build environment cannot override an explicit choice. An unrecognized mode fails the build instead of falling back to the default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The bundle phase reads POSTHOG_RELEASE_MODE from the environment, so a build configured that way rather than through the plugin prop uploaded its Hermes maps release-independent and kept binding its dSYMs. posthog-ios reads only POSTHOG_NO_RELEASE_BIND, and posthog-cli's dsym upload binds no environment variable of its own, so the generated phase now resolves the mode when it runs and translates it. An unrecognized value fails the build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An older posthog-cli rejects --release-mode with a bare argument-parser error. posthog-xcode.sh and posthog.gradle now read the CLI version first and name the upgrade. The floor is a placeholder until PostHog/posthog#87660 releases, and until then event mode fails with a message that says so. POSTHOG_SKIP_CLI_VERSION_CHECK=1 allows a CLI built from source. Also guards --posthog-release-mode against a missing value, corrects the documented floors (posthog-cli 0.13.0 for the Android mapping upload, posthog-ios 3.69.1 for dSYMs), and adds a test that holds the release mode lists in posthog-xcode.sh, posthog.gradle and the dSYM phase to POSTHOG_RELEASE_MODES. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The dSYM phase is refreshed only when its text matches something the plugin generated, and every release-mode variant now carries the runtime case block. A phase written by an SDK without release-mode support matched nothing, so an upgraded project kept its old phase and event mode unbound its Hermes maps but not its dSYMs. The pre-release-mode text is now part of the ownership check, with a test that feeds it verbatim. The injected com.posthog.android gradle plugin moves from 1.4.0 to 1.5.1. 1.4.0 ignores posthog.releaseMode and keeps binding the R8 mapping to a release, while 1.5.0 is the first version that reads it. The prop docs and the changeset state the floor, and that a project whose android/build.gradle already carries the classpath line keeps its version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…er tests posthog-xcode.sh hands Info.plist to a posthog-cli 0.15.1 or newer as --info-plist, so the tests for the wrapper's own plist resolution now run against a CLI below that floor. They also stub PlistBuddy, which Linux CI does not have, the same way the hand-over tests do. Also wraps one line in expoconfig.ts to prettier's width. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ablaszkiewicz
force-pushed
the
ab/feat/react-native-event-release-mode
branch
from
August 26, 2026 09:34
2330985 to
b364b04
Compare
posthog-cli 0.16.0 (PostHog/posthog#87660) carries --release-mode on the hermes commands, so the placeholder floor that refused event mode outright becomes a real version check in posthog-xcode.sh and posthog.gradle. The changeset and the expo plugin docs name the minimum, and the wrapper tests drop the floor substitution now that the shipped floor is real. A new test holds the two floors to the same version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
@PostHog/team-client-libraries this is now ready to merge. I've merged that other PR and bumped version here |
turnipdabeets
approved these changes
Aug 27, 2026
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.
Changes
Adds event release mode flag and its propagation to ios/android tooling. Sibling PR in which everything was tested - PostHog/posthog#87660