Skip to content

feat(source-maps): Flutter upload guidance - #281

Merged
ablaszkiewicz merged 3 commits into
mainfrom
ab/feat/flutter-source-maps
Jul 27, 2026
Merged

feat(source-maps): Flutter upload guidance#281
ablaszkiewicz merged 3 commits into
mainfrom
ab/feat/flutter-source-maps

Conversation

@ablaszkiewicz

@ablaszkiewicz ablaszkiewicz commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Related PRs

Part of the Flutter source-map upload rollout:


What

Companion to PostHog/wizard#985. Flutter compiles one Dart source through three compilers, so each platform has its own symbol artifact — the web path runs posthog-cli over build/web, the native paths delegate to the existing Android and iOS examples.

Calls out the Flutter deltas that delegation would otherwise get wrong: Gradle's root is android/ and Xcode's SRCROOT is ios/, so both reach up for the project-root .env; the plugin is declared in android/settings.gradle.kts; isMinifyEnabled is skipped (Flutter always shrinks release builds); CocoaPods is always the upload-symbols.sh path.

Also pins the Gradle plugin to 1.4.0 — the Android reference carries a $version placeholder, and an agent run resolved it to a nonexistent 3.19.0.

🤖 Generated with Claude Code

Flesh out the Flutter variant of error-tracking-upload-source-maps so the
agent can wire all three of Flutter's upload paths.

Flutter compiles one Dart source through three different compilers, so each
platform has its own symbol artifact: dart2js source maps for web, R8
mapping files for Android, dSYMs for iOS. The web path runs posthog-cli over
build/web; the native paths delegate to the existing Android and iOS
examples, with the Flutter-specific deltas called out.

Those deltas are what the delegation would otherwise get wrong:
- Gradle's root project is android/ and Xcode's SRCROOT is ios/, so both
  native paths reach up for the project-root .env.
- Plugin versions live in android/settings.gradle.kts, so the plugin is
  declared there and applied versionless in the app module.
- Flutter always shrinks release builds, so the Android example's
  isMinifyEnabled step is skipped.
- Flutter is always CocoaPods, fixing the upload-symbols.sh path.

Also pins the Gradle plugin to 1.4.0 — the Android reference carries a
"$version" placeholder, and an agent run resolved it to a nonexistent
3.19.0 by reusing the SDK's version line.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

ablaszkiewicz and others added 2 commits July 27, 2026 13:18
The Flutter test-affordance bullet said "verifies the web path only",
so the agent produced a web-only verification step and left Android and
iOS untested.

Give a flow per wired platform, and state what the button can't prove:
on Android and iOS it raises a Dart exception, which needs no symbol set
because mapping.txt and dSYMs cover the Java/Kotlin and Swift layers,
not compiled Dart. Verify those by the symbol set appearing instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drop what the agent doesn't act on: the dart2js sourcesContent note, the
Dart-vs-native symbolication explanation in the test step, the npx-fallback
gotcha (already covered by the Android/iOS bullets it delegates to), and a
duplicated POSTHOG_CLI_HOST rule.

Stop pinning the Gradle plugin to 1.4.0 — the Android bullet already says
never to reuse the SDK version, so follow that instead of hardcoding.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ablaszkiewicz
ablaszkiewicz marked this pull request as ready for review July 27, 2026 12:47
@ablaszkiewicz
ablaszkiewicz requested a review from a team as a code owner July 27, 2026 12:47
@ablaszkiewicz
ablaszkiewicz merged commit e674f66 into main Jul 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants