feat(react-native): default release mode to event - #4706
Conversation
Source maps, dSYMs and R8 mappings upload release-independent by default, and each event resolves its own release. The resolved mode is written into the generated phases, so a build does not inherit the posthog-cli default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
posthog-ios is moving to uploading dSYMs unbound by default, so a symbol-set phase that exports nothing would read as event. Both arms now export POSTHOG_NO_RELEASE_BIND, and the previous block stays recognized so projects prebuilt by an earlier SDK still get refreshed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
|
Size Change: +2.42 kB (+0.01%) Total Size: 20.8 MB 📦 View Changed
ℹ️ View Unchanged
|
🦔 PostHog Review reviewed this pull requestFound 0 must fix, 2 should fix, 1 consider. Published 3 findings (view the review). |
|
PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏 |
The prebuild writes the resolved mode into the Xcode phases and into gradle.properties, and both beat the environment variable at build time. An absent prop now reads POSTHOG_RELEASE_MODE before it falls back to event, so the documented opt-out works again. The prop documentation described the old default. A prebuild now also warns when the project pins com.posthog.android below 1.5.0, which ignores posthog.releaseMode and leaves the two halves on different modes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
42678fd to
4c6ff0b
Compare
|
Closing this. We are removing event release mode from this package instead of defaulting to it. Event mode only helps when two releases ship a byte-identical artifact. The symbol id is a content hash on every platform, so an ordinary feature release already gets its own symbol set and never collides. The case that does collide is a React Native release that changes only JavaScript, where the native artifact repeats. Against that narrow benefit, the mobile paths carry real cost. A dSYM upload covers every embedded target but creates one release, so an extension crash resolves no release once the binding is gone. A replacement PR follows that removes the mode from this package. The flag was experimental and undocumented, so the removal is direct. |
Related PRs
Event mode is live today. Each build must ask for it. These PRs make it the default. The modes themselves do not change.
Problem
Changes
releaseModeresolves toeventin the Expo config plugin,posthog.gradleandposthog-xcode.sh.POSTHOG_RELEASE_MODE. An Expo project must set the variable before the prebuild runs.com.posthog.androidbelow 1.5.0. That version ignoresposthog.releaseMode.POSTHOG_NO_RELEASE_BINDfor both modes.releaseMode: 'symbol-set'keeps the old behavior.posthog.releaseMode=symbol-setandPOSTHOG_RELEASE_MODE=symbol-setdo the same.Land PostHog/posthog-ios#789 with this PR. That PR changes the posthog-ios default, so a symbol-set phase must name the opt-out.
How did you test this code?
jestinpackages/react-native.POSTHOG_NO_RELEASE_BIND=0.POSTHOG_SKIP_CLI_VERSION_CHECK=1. They use posthog-cli 0.15.x, below the event mode floor.findOutdatedPostHogAndroidPluginVersioncovers 1.4.0, 0.9.9, 1.5.0, 1.5.2, 2.0.0 and a project with no classpath.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written with Claude Code (Opus 5). Skills invoked:
/writing-pr-descriptions.resolveReleaseModePropreturnsPostHogReleaseMode, notPostHogReleaseMode | undefined. The builders keep the optional parameter, because the plugin matches old dSYM phases by exact text.The dSYM export came out of a review against the posthog-ios PR. Together the two PRs would otherwise unbind the dSYMs of a symbol-set build.