isoos / service_worker

Service Worker API for Dart
https://pub.dartlang.org/packages/service_worker
BSD 3-Clause "New" or "Revised" License
36 stars 19 forks source link

dart2js causes lots of warnings #6

Closed zoechi closed 7 years ago

zoechi commented 7 years ago
[Info from Dart2JS]:
Compiling datingnode_angular|web/pwa.dart...
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:613:3:
The type 'int' of getter 'timeStamp' declared in 'ExtendableEvent' is not assignable to the type 'double' of the overridden field inherited from 'Event'.
  int get timeStamp => _getProperty(_delegate, 'timeStamp');
  ^^^^^^^^^^^^^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16646:16:
This is the overridden field 'timeStamp' declared in class 'Event'.
  final double timeStamp;
               ^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:597:1:
'ExtendableEvent' doesn't implement the getter 'isTrusted' declared in 'Event'.
Try adding an implementation of 'isTrusted' or declaring 'ExtendableEvent' to be 'abstract'.
class ExtendableEvent implements Event {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16612:14:
The getter 'isTrusted' is implicitly declared by this field in class 'Event'.
  final bool isTrusted;
             ^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:597:1:
'ExtendableEvent' doesn't implement the getter 'scoped' declared in 'Event'.
Try adding an implementation of 'scoped' or declaring 'ExtendableEvent' to be 'abstract'.
class ExtendableEvent implements Event {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16632:14:
The getter 'scoped' is implicitly declared by this field in class 'Event'.
  final bool scoped;
             ^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:597:1:
'ExtendableEvent' doesn't implement 'List<EventTarget> deepPath()' declared in 'Event'.
Try adding an implementation of 'deepPath' or declaring 'ExtendableEvent' to be 'abstract'.
class ExtendableEvent implements Event {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16655:3:
The method 'deepPath' is declared here in class 'Event'.
  List<EventTarget> deepPath() native;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:731:1:
'InstallEvent' doesn't implement the getter 'isTrusted' declared in 'Event'.
Try adding an implementation of 'isTrusted' or declaring 'InstallEvent' to be 'abstract'.
class InstallEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16612:14:
The getter 'isTrusted' is implicitly declared by this field in class 'Event'.
  final bool isTrusted;
             ^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:731:1:
'InstallEvent' doesn't implement the getter 'scoped' declared in 'Event'.
Try adding an implementation of 'scoped' or declaring 'InstallEvent' to be 'abstract'.
class InstallEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16632:14:
The getter 'scoped' is implicitly declared by this field in class 'Event'.
  final bool scoped;
             ^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:731:1:
'InstallEvent' doesn't implement 'List<EventTarget> deepPath()' declared in 'Event'.
Try adding an implementation of 'deepPath' or declaring 'InstallEvent' to be 'abstract'.
class InstallEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16655:3:
The method 'deepPath' is declared here in class 'Event'.
  List<EventTarget> deepPath() native;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:847:1:
'NotificationEvent' doesn't implement the getter 'isTrusted' declared in 'Event'.
Try adding an implementation of 'isTrusted' or declaring 'NotificationEvent' to be 'abstract'.
class NotificationEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16612:14:
The getter 'isTrusted' is implicitly declared by this field in class 'Event'.
  final bool isTrusted;
             ^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:847:1:
'NotificationEvent' doesn't implement the getter 'scoped' declared in 'Event'.
Try adding an implementation of 'scoped' or declaring 'NotificationEvent' to be 'abstract'.
class NotificationEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16632:14:
The getter 'scoped' is implicitly declared by this field in class 'Event'.
  final bool scoped;
             ^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:847:1:
'NotificationEvent' doesn't implement 'List<EventTarget> deepPath()' declared in 'Event'.
Try adding an implementation of 'deepPath' or declaring 'NotificationEvent' to be 'abstract'.
class NotificationEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16655:3:
The method 'deepPath' is declared here in class 'Event'.
  List<EventTarget> deepPath() native;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:866:1:
'PushEvent' doesn't implement the getter 'isTrusted' declared in 'Event'.
Try adding an implementation of 'isTrusted' or declaring 'PushEvent' to be 'abstract'.
class PushEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16612:14:
The getter 'isTrusted' is implicitly declared by this field in class 'Event'.
  final bool isTrusted;
             ^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:866:1:
'PushEvent' doesn't implement the getter 'scoped' declared in 'Event'.
Try adding an implementation of 'scoped' or declaring 'PushEvent' to be 'abstract'.
class PushEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16632:14:
The getter 'scoped' is implicitly declared by this field in class 'Event'.
  final bool scoped;
             ^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:866:1:
'PushEvent' doesn't implement 'List<EventTarget> deepPath()' declared in 'Event'.
Try adding an implementation of 'deepPath' or declaring 'PushEvent' to be 'abstract'.
class PushEvent extends ExtendableEvent {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16655:3:
The method 'deepPath' is declared here in class 'Event'.
  List<EventTarget> deepPath() native;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:689:3:
The type 'int' of getter 'timeStamp' declared in 'FetchEvent' is not assignable to the type 'double' of the overridden field inherited from 'Event'.
  int get timeStamp => _getProperty(_delegate, 'timeStamp');
  ^^^^^^^^^^^^^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16646:16:
This is the overridden field 'timeStamp' declared in class 'Event'.
  final double timeStamp;
               ^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:656:1:
'FetchEvent' doesn't implement the getter 'isTrusted' declared in 'Event'.
Try adding an implementation of 'isTrusted' or declaring 'FetchEvent' to be 'abstract'.
class FetchEvent implements Event {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16612:14:
The getter 'isTrusted' is implicitly declared by this field in class 'Event'.
  final bool isTrusted;
             ^^^^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:656:1:
'FetchEvent' doesn't implement the getter 'scoped' declared in 'Event'.
Try adding an implementation of 'scoped' or declaring 'FetchEvent' to be 'abstract'.
class FetchEvent implements Event {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16632:14:
The getter 'scoped' is implicitly declared by this field in class 'Event'.
  final bool scoped;
             ^^^^^^
[Warning from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/service_worker/src/service_worker_api.dart:656:1:
'FetchEvent' doesn't implement 'List<EventTarget> deepPath()' declared in 'Event'.
Try adding an implementation of 'deepPath' or declaring 'FetchEvent' to be 'abstract'.
class FetchEvent implements Event {
^^^^^
[Info from Dart2JS on datingnode_angular|web/pwa.dart]:
web/packages/$sdk/lib/html/dart2js/html_dart2js.dart:16655:3:
The method 'deepPath' is declared here in class 'Event'.
  List<EventTarget> deepPath() native;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Do you get these as well? Did you try to get rid of them?

isoos commented 7 years ago

This looks new to me, investigating.

isoos commented 7 years ago

Can you point me to your repo or example code that I can use to reproduce this?

zoechi commented 7 years ago

At first I was curious if this is just me or if it's a known "problem". I'll investigate further then (perhaps it's caused by some transformer settings or similar), but it will take about a week until I will be able to come back to this. Thanks a lot for having a look!

isoos commented 7 years ago

/ping @zoechi: could you update the issue on how you get the warnings?

zoechi commented 7 years ago

Sorry, I wasn't able to get back to that part of the project yet (was on vacation in the meantime) I'll look into it and add a comment how it turned out.