Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare Workers not working on Dart 3.3? #64

Open
insign opened this issue Mar 13, 2024 · 2 comments
Open

Cloudflare Workers not working on Dart 3.3? #64

insign opened this issue Mar 13, 2024 · 2 comments

Comments

@insign
Copy link

insign commented Mar 13, 2024

Since I found the project recently we are on Dart 3.3 but I got a lot of errors without changing anything, then tried to updated some version on pubspec.yaml but nothing changed on errors:

I followed dart pub site instructions for Cloudflare Workers, everything worked fine til I asked to build:

⚡ dart run edge build cloudflare_workers --dev
Building package executable... (2.3s)
Built edge:edge.
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.

I'm using Sonoma.

Since I found this project very promising I'm to help fix any issue if possible. Thank you.

@insign
Copy link
Author

insign commented Mar 13, 2024

Also doc at https://docs.dartedge.dev/platform/cloudflare shows wrong command

@kwado-tech
Copy link

kwado-tech commented Dec 8, 2024

The current dart_edge package supports an older dart version given its defined constraints

environment:
  sdk: ">=2.18.5 <3.0.0"

@Ehesp kindly help here as this package needs to be updated to support dart latest version

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

No branches or pull requests

2 participants