Skip to content

refactor(superdeck): vendor the syntax highlighter; drop CocoaPods - #126

Merged
leoafarias merged 3 commits into
build/macos-deployment-targetfrom
refactor/vendor-syntax-highlight
Sep 23, 2026
Merged

leoafarias merged 3 commits into
build/macos-deployment-targetfrom
refactor/vendor-syntax-highlight

Conversation

@leoafarias

Copy link
Copy Markdown
Collaborator

Intent

Stack 2/8, based on #125. It removes the last native dependencies that force CocoaPods, then removes CocoaPods from every Apple app.

Why: syntax_highlight depends on super_clipboard only for its CodeEditor widget, which SuperDeck never uses. That dependency pulls super_native_extensions and irondash_engine_context into every SuperDeck app:

  • Neither supports Swift Package Manager, so macOS and iOS fall back to CocoaPods. CocoaPods trunk goes read-only on 2026-12-02.
  • super_native_extensions 0.9.1 crashes on Android devices with 16 KB memory pages.
  • We're already on the latest stable of all three. The SPM fixes exist only in upstream pre-releases, and syntax_highlight 0.5.0 caps super_clipboard below them.
  • The upstream PRs that would drop super_clipboard (serverpod/syntax_highlight feat: add Claude Code configuration #20, feat(core): add Deck.schema for complete presentation validation #22) have gone unreviewed since April and July 2026.

Commits

  1. test(superdeck): record the highlighter's exact rendered spans (text, color, weight, style) for Dart, JSON, YAML, Markdown, Python and the Dart fallback, on light and dark backgrounds.
  2. refactor(superdeck): vendor only highlighter.dart and span_parser.dart (BSD-3; the parser originally comes from Flutter DevTools), plus the grammars and themes, under lib/src/markdown/syntax_highlight/vendor/. It follows the vendor/ convention: attribution header, LICENSE, and the two local changes marked SUPERDECK PATCH (the import path and the asset paths).
    • The dependency is replaced by string_scanner.
    • pubspec.lock drops syntax_highlight, super_clipboard, super_native_extensions and both irondash packages.
    • The native plugins also leave the demo's Linux and Windows plugin registrants.
  3. build(apple): with every plugin now on SPM, remove CocoaPods from the demo and playground macOS apps and the demo iOS app, following Flutter's migration guide (pod deintegrate, delete the Podfiles and locks, remove the Pods xcconfig includes and workspace references). The iOS project also takes Flutter's pending migrations and a 15.0 deployment target, the lowest Xcode 27 supports.

Impacted packages

superdeck (a dependency change for downstream apps, noted in CHANGELOG), and the demo and playground platform projects.

Commands run

  • fvm flutter test in packages/superdeck: 776 passing, including the ci-excluded goldens with no updates. The recorded-spans test passes against the vendored copy, so there's no visual change.
  • fvm dart analyze --fatal-infos in all 7 packages: no issues.
  • fvm flutter build macos --debug for demo and playground after a clean: both build with no CocoaPods.
  • fvm dart run melos run test:integration:macos --no-select: 39 passing.
  • fvm flutter build ios --debug --no-codesign for the demo: builds.

Known toolchain issue (not caused by this PR)

flutter build ios --simulator fails with Flutter 3.44.6 on Xcode 27. Flutter calls lipo -verify_arch arm64 x86_64, but Xcode 27's lipo accepts one architecture per call ("-verify_arch requires exactly one input file"). Device builds and single-architecture simulator runs are unaffected.

Characterizes highlighting for Dart, JSON, YAML, Markdown, Python, and the Dart fallback on light and dark backgrounds, so a change of highlighter implementation must reproduce the output exactly.
syntax_highlight depends on super_clipboard for a CodeEditor widget SuperDeck never uses, which pulls super_native_extensions and irondash_engine_context into every SuperDeck app: native plugins with no Swift Package Manager support and a known Android 16 KB page-size crash. Upstream fixes (serverpod/syntax_highlight #20, #22) have been unreviewed since April and July 2026.

Vendor only the highlighter and its span parser, with their grammars and themes, under an attribution header and licence. Rendered output is unchanged: the recorded-spans test passes against the vendored copy.
Every plugin for macOS and iOS now resolves through Swift Package Manager, so de-integrate CocoaPods from the demo and playground macOS apps and the demo iOS app: drop the Podfiles, their locks, the Pods xcconfig includes, and the workspace references, as Flutter's migration guide describes.

The iOS project also takes Flutter's pending migrations (UIScene lifecycle, implicit-engine plugin registration, Swift Package Manager integration) and a 15.0 deployment target, the lowest Xcode 27 supports.
@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 86ced33):

https://superdeck-dev--pr126-refactor-vendor-synt-3inwiqj7.web.app

(expires Fri, 23 Oct 2026 03:33:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bd68fc230762285849207e7e120aaf87cd4ca2f9

@leoafarias
leoafarias added this pull request to stack #128 September 23, 2026 03:37
@leoafarias
leoafarias merged commit a6bdd18 into main Sep 23, 2026
5 checks passed
@leoafarias
leoafarias deleted the refactor/vendor-syntax-highlight branch September 23, 2026 04:26
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.

1 participant