invertase / dart_edge

Run Dart on the Edge - supporting Vercel & Cloudflare Workers (more coming soon).
https://docs.dartedge.dev
Apache License 2.0
322 stars 23 forks source link

Doesn't Work on Flutter Beta Channel #50

Open ekremkenter opened 1 year ago

ekremkenter commented 1 year ago

Sample function compiles fine on stable channel but throws error on beta channel. I am assuming this should be fixed before it reaches stable.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 3.13.0-0.2.pre, on macOS 13.4 22F66 darwin-arm64, locale en-TR)
⠹ Compiling 1 functions... (1.8s)Compilation of the Dart entry file failed:

../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/fetch.dart:377:55:
Warning: Initializers for parameters are ignored on static interop external functions.
  external static Response redirect(String url, [int? status = 302]);
                                                      ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/dom.dart:1835:36:
Warning: Initializers for parameters are ignored on static interop external functions.
  external factory Text._([String? data = '']);
                                   ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/dom.dart:1992:39:
Warning: Initializers for parameters are ignored on static interop external functions.
  external factory Comment._([String? data = '']);
                                      ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1173:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1205:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1237:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1270:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1302:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1334:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1366:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/css_typed_om_1.dart:1398:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [dynamic alpha = 1]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/encoding.dart:80:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [String? label = 'utf-8', TextDecoderOptions? options]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/encoding.dart:147:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [String? label = 'utf-8', TextDecoderOptions? options]);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/webrtc.dart:2200:59:
Warning: Initializers for parameters are ignored on static interop external functions.
  external factory RTCError._(RTCErrorInit init, [String? message = '']);
                                                          ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/webidl.dart:26:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [String? message = '', String? name = 'Error']);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/webidl.dart:26:38:
Warning: Initializers for parameters are ignored on static interop external functions.
      [String? message = '', String? name = 'Error']);
                                     ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:43:35:
Warning: Initializers for parameters are ignored on static interop external functions.
      [/* double | NaN */ dynamic x = 0,
                                  ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:44:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic y = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:45:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic z = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:46:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic w = 1]);
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:93:35:
Warning: Initializers for parameters are ignored on static interop external functions.
      [/* double | NaN */ dynamic x = 0,
                                  ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:94:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic y = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:95:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic z = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:96:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic w = 1]);
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:175:35:
Warning: Initializers for parameters are ignored on static interop external functions.
      [/* double | NaN */ dynamic x = 0,
                                  ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:176:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic y = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:177:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic width = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:178:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic height = 0]);
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:224:35:
Warning: Initializers for parameters are ignored on static interop external functions.
      [/* double | NaN */ dynamic x = 0,
                                  ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:225:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic y = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:226:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic width = 0,
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/geometry_1.dart:227:34:
Warning: Initializers for parameters are ignored on static interop external functions.
      /* double | NaN */ dynamic height = 0]);
                                 ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/compute_pressure.dart:77:48:
Error: External extension members with the keyword 'static' on JS interop and @Native types are disallowed.
  external static Iterable<PressureSource> get supportedSources;
                                               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/performance_timeline.dart:66:40:
Error: External extension members with the keyword 'static' on JS interop and @Native types are disallowed.
  external static Iterable<String> get supportedEntryTypes;
                                       ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/mediacapture_streams.dart:767:16:
Warning: Initializers for parameters are ignored on static interop external functions.
      [String? message = '']);
               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/notifications.dart:50:46:
Error: External extension members with the keyword 'static' on JS interop and @Native types are disallowed.
  external static NotificationPermission get permission;
                                             ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/notifications.dart:52:27:
Error: External extension members with the keyword 'static' on JS interop and @Native types are disallowed.
  external static int get maxActions;
                          ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/websockets.dart:48:53:
Warning: Initializers for parameters are ignored on static interop external functions.
  external factory WebSocket._(String url, [dynamic protocols = const []]);
                                                    ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/push_api.dart:47:40:
Error: External extension members with the keyword 'static' on JS interop and @Native types are disallowed.
  external static Iterable<String> get supportedContentEncodings;
                                       ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/webusb.dart:210:13:
Warning: Initializers for parameters are ignored on static interop external functions.
      [int? bytesWritten = 0]);
            ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/webusb.dart:288:13:
Warning: Initializers for parameters are ignored on static interop external functions.
      [int? bytesWritten = 0]);
            ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/media_source_2.dart:101:28:
Error: External extension members with the keyword 'static' on JS interop and @Native types are disallowed.
  external static bool get canConstructInDedicatedWorker;
                           ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/indexeddb_3.dart:597:64:
Warning: Initializers for parameters are ignored on static interop external functions.
  external static IDBKeyRange lowerBound(dynamic lower, [bool? open = false]);
                                                               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/indexeddb_3.dart:598:64:
Warning: Initializers for parameters are ignored on static interop external functions.
  external static IDBKeyRange upperBound(dynamic upper, [bool? open = false]);
                                                               ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/indexeddb_3.dart:600:14:
Warning: Initializers for parameters are ignored on static interop external functions.
      [bool? lowerOpen = false, bool? upperOpen = false]);
             ^
../../../../.pub-cache/hosted/pub.dev/js_bindings-0.1.2+2/lib/bindings/indexeddb_3.dart:600:39:
Warning: Initializers for parameters are ignored on static interop external functions.
      [bool? lowerOpen = false, bool? upperOpen = false]);
                                      ^
Error: Compilation failed.
maksym-tielnyi-solid commented 1 year ago

The same issue on the stable channel now, edge package version is 0.0.7.

#### General info

- Dart 3.1.0 (stable) (Tue Aug 15 21:33:36 2023 +0000) on "macos_arm64"
- on macos / Version 13.5 (Build 22G74)
- locale is en-UA
Tristan-2021 commented 1 year ago

The same issue on the stable channel: Flutter 3.13.0 • channel stable • Captura de pantalla 2023-08-30 a la(s) 19 17 10

kuyazee commented 1 year ago

What was the last version you guys had this working?

Currently having this issue on stable as well :(

henry2man commented 1 year ago

What was the last version you guys had this working?

I have a working project based on Dart 3.0.1 && edge 0.0.6+1, maybe you can check from that point.

Ehesp commented 1 year ago

Hey all this is due to changes in the js interop layer, which I think is so the interop code can compile to wasm.

We recently applied fixes to Zapp which had the same errors. I'll take a look at the fixes there and apply those (on Monday)

TC3000 commented 1 year ago

Can someone please confirm if this is now working?

lkmSasanga commented 1 year ago

@TC3000 Still not working :(

noga-dev commented 1 year ago

Temporary workaround is to use fvm with previous version.

fvm use 3.7.12 -f

then run edge via fvm dart run edge build supabase_functions --dev

nicolantean commented 1 year ago

Hi @Ehesp, do you have any updates about this?

dondragon2 commented 11 months ago

Temporary workaround is to use fvm with previous version.

fvm use 3.7.12 -f

then run edge via fvm dart run edge build supabase_functions --dev

Same error using this

oliverbytes commented 11 months ago

Any workarounds please?

oliverbytes commented 11 months ago

Any workarounds please?