nativeapi 0.5.7 does not compile on Dart 3.14 (beta): Isolate.create unshipped
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- dart, flutter
- 領域
- desktop-dev
調査の方向性
Start by reading lib/nativeapi.dart and lib/src/run_native_app.dart, then reproduce the failure with the Dart 3.14 beta using the issue’s pubspec.yaml and dart compile kernel command. The suggested direction is to separate the runNativeApp export so unrelated users can compile; also investigate a Dart 3.14-compatible approach for its isolate APIs. Done means the reproduction compiles on the beta without requiring users who do not call runNativeApp to use the experimental flag.
索引モデルが issue の本文から書いたものです。
説明
Problem
With the Dart 3.14 beta SDK (3.14.0-315.3.beta, Flutter beta 3.50.0-0.3.pre), any program importing package:nativeapi/nativeapi.dart 0.5.7 fails to compile:
nativeapi-0.5.7/lib/src/run_native_app.dart:45:25: Error: Member not found: 'Isolate.create'.
final app = Isolate.create(debugName: 'nativeapi');
^^^^^^
It compiles with Dart 3.13.7 (stable).
Cause
Dart 3.14 unships the experimental isolate APIs that were accidentally exposed in Dart 3.13 (dart-lang/sdk#64285, dart:isolate section of the 3.14 CHANGELOG): Isolate.create, Isolate.runSync and Isolate.runEventLoopSync are removed from dart:isolate, and NativeCallable.isolateGroupBound is now gated behind the --experimental-shared-data VM flag. runNativeApp in lib/src/run_native_app.dart uses all four.
lib/nativeapi.dart exports src/run_native_app.dart on every non-web platform, so the file is compiled for every user of the library, including Flutter apps that never call runNativeApp. That also covers every user of package:window_manager/window_manager.dart 0.6.0, which re-exports package:nativeapi/nativeapi.dart (a show list does not stop the library from being compiled). Their tests fail to load on the beta channel.
Reproduction
pubspec.yaml:
name: nativeapi_repro
publish_to: none
environment:
sdk: ^3.13.0
dependencies:
nativeapi: 0.5.7
bin/main.dart:
import 'package:nativeapi/nativeapi.dart';
void main() {
print(WindowManager.instance);
}
dart pub get
dart compile kernel bin/main.dart
Dart 3.14.0-315.3.beta: the error above. Dart 3.13.7: compiles.
Suggestion
Moving runNativeApp out of nativeapi.dart into its own library (for example package:nativeapi/run_native_app.dart) would let Flutter apps and window_manager compile on Dart 3.14 again. runNativeApp itself needs another approach on 3.14, since NativeCallable.isolateGroupBound now requires --experimental-shared-data.
- 主要言語
- TypeScript
- スター
- 170
- フォーク
- 15
- 平均マージ
- 58分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
libnativeapi/nativeapi のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
libnativeapi/nativeapi#21 ·
libnativeapi/nativeapi の issue をすべて見る
似ている issue
-
needs investigation
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area:visualizer tech-debt
難易度 2/5 1時間未満 初心者へのやさしさ 66/100
jmbarzee/temporal-architect#292 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
riverqueue/river#1576 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
colbymchenry/codegraph#3228 ·
メンテナーはふだん 1 日以内に返信