[core] Decouple platform_interface from Flutter for pure-Dart web
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- dart
- 領域
- api, build-system
調査の方向性
まず firebase_core_platform_interface/pubspec.yaml と MethodChannelFirebase の実装を読み、次に issue で説明されている関連する *_platform_interface パッケージと web パッケージを比較します。Option A と Option B を比較検討し、FirebaseException/PlatformException の契約について maintainers と確認します。方向性が選択され、受け入れ条件が解決されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Context & Problem
Recent cleanups (#18604, #18624) removed package:flutter/foundation.dart, package:flutter/material.dart, and package:flutter_web_plugins imports from *_platform_interface data models and firebase_core_web. Because FlutterFire web implementations (firebase_core_web, firebase_auth_web, cloud_firestore_web) are built on dart:js_interop and package:web, they can compile to JS and Wasm GC without pulling in dart:ui or the Flutter engine.
However, non-Flutter Dart web frameworks (e.g. Jaspr) and pure-Dart environments cannot resolve these packages using standalone dart pub get because firebase_core_platform_interface (and sibling *_platform_interface packages) still declare flutter: sdk: flutter in pubspec.yaml.
The sole remaining reason *_platform_interface depends on flutter: sdk: flutter is that it bundles the default MethodChannel* implementation (package:flutter/services.dart). Meanwhile, package:plugin_platform_interface itself is already 100% pure Dart.
Proposed Options
We would like feedback from the maintainers on two architectural options to remove the flutter: sdk: flutter dependency from the platform interface layer:
Option A: Move MethodChannel* out of *_platform_interface (In-Place Pure Dart)
- Move
MethodChannelFirebase(package:flutter/services.dart) fromfirebase_core_platform_interfaceinto the app-facingfirebase_corepackage (or a dedicatedfirebase_core_method_channelsubpackage). - Remove
flutter: sdk: flutterandenvironment: flutter:fromfirebase_core_platform_interface/pubspec.yaml. - Pros: Zero new packages;
*_platform_interfacebecomes 100% pure Dart immediately. - Cons: Technically a breaking change for external consumers or test suites that directly instantiate
MethodChannelFirebasefromfirebase_core_platform_interface(requires scheduling for the next major version bump).
Option B: Extract Pure-Dart Leaf Package (package:firebase_common / *_interface)
- Extract pure-Dart platform contracts and shared domain models (
FirebaseAppPlatform,FirebaseOptions,FirebaseException,Timestamp,GeoPoint, etc.) into a zero-dependency pure-Dart package (e.g.package:firebase_common). - Have
*_platform_interfacere-export these types alongsideMethodChannel*, while*_webpackages depend directly on the pure-Dart package. - Pros: 100% backwards-compatible; requires no major version bump to existing
*_platform_interfacepackages; enables code sharing with server-sidefirebase-admin-dart. - Cons: Introduces a new leaf package to publish and maintain in the monorepo.
Acceptance Criteria
- Select preferred direction (Option A vs. Option B) for decoupling
MethodChannel*(package:flutter/services.dart) from the pure-Dart interface layer. - Confirm whether pure-Dart platform interfaces should standardize exclusively on
FirebaseExceptionrather than catching/throwingPlatformException.
- 主要言語
- Dart
- スター
- 9.3k
- フォーク
- 4.1k
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 56
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/flutterfire のほかの issue
-
Needs Attention platform: android type: infrastructure umbrella
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
firebase/flutterfire#18832 ·
メンテナーはふだん 1 日以内に返信
-
Needs Attention platform: ios platform: macos plugin: cloud_firestore type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 20/100
firebase/flutterfire#18829 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[firebase_auth]: authStateChanges() never emits null when the user is force-signed-out before the stream is listened to (iOS, macOS, Android)対応中かも @JulianPscheid が 8 日前に担当しました。 オープンNeeds Attention platform: android platform: ios platform: macos plugin: auth reproduced type: bug
難易度 4/5 1〜2日 初心者へのやさしさ 15/100
firebase/flutterfire#18796 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
blocked: customer-response Needs Attention platform: ios plugin: messaging Stale type: bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
firebase/flutterfire#18776 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
[firebase_storage] Windows native crash in upload progress callback, sink ownership and thread dispatch再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンblocked: flutter platform: windows plugin: storage reproduced type: bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
firebase/flutterfire#18664 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
firebase/flutterfire の issue をすべて見る
似ている issue
-
type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
Standalone dash flashes as its own RSVP step (e.g. Russian dialogue)対応中かも @bezig01 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
daniel-pimenta-cc/ledor#53 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100