onepub-dev/onepub

Compilation ERROR with Dart 3.5.0+

Closed this issue ยท 6 comments

Dart 3.5.0 doesn't have UnmodifiableUint8ListView any more. You should use .asUnmodifiableView().

Building package executables...
Failed to build onepub:onepub:
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: Type 'UnmodifiableUint8ListView' not found.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart:301:13: Error: The method 'UnmodifiableUint8ListView' isn't defined for the class '_SynchronousTarSink'.
 - '_SynchronousTarSink' is from 'package:onepub/src/pub/third_party/tar/lib/src/writer.dart' ('../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'UnmodifiableUint8ListView'.
      ..add(UnmodifiableUint8ListView(zeroBlock))
            ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart:302:13: Error: The method 'UnmodifiableUint8ListView' isn't defined for the class '_SynchronousTarSink'.
 - '_SynchronousTarSink' is from 'package:onepub/src/pub/third_party/tar/lib/src/writer.dart' ('../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'UnmodifiableUint8ListView'.
      ..add(UnmodifiableUint8ListView(zeroBlock));
            ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: 'UnmodifiableUint8ListView' isn't a type.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:51:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(guid));
                ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:55:31: Error: Method not found: 'UnmodifiableUint8ListView'.
  factory Guid.zero() => Guid(UnmodifiableUint8ListView(Uint8List(16)));
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:99:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(Uint8List.fromList(guidAsBytes)));
                ^^^^^^^^^^^^^^^^^^^^^^^^^
Failed to build onepub:opub:
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: Type 'UnmodifiableUint8ListView' not found.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart:301:13: Error: The method 'UnmodifiableUint8ListView' isn't defined for the class '_SynchronousTarSink'.
 - '_SynchronousTarSink' is from 'package:onepub/src/pub/third_party/tar/lib/src/writer.dart' ('../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'UnmodifiableUint8ListView'.
      ..add(UnmodifiableUint8ListView(zeroBlock))
            ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart:302:13: Error: The method 'UnmodifiableUint8ListView' isn't defined for the class '_SynchronousTarSink'.
 - '_SynchronousTarSink' is from 'package:onepub/src/pub/third_party/tar/lib/src/writer.dart' ('../../../.pub-cache/hosted/pub.dev/onepub-4.2.0/lib/src/pub/third_party/tar/lib/src/writer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'UnmodifiableUint8ListView'.
      ..add(UnmodifiableUint8ListView(zeroBlock));
            ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: 'UnmodifiableUint8ListView' isn't a type.
  final UnmodifiableUint8ListView bytes;
        ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:51:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(guid));
                ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:55:31: Error: Method not found: 'UnmodifiableUint8ListView'.
  factory Guid.zero() => Guid(UnmodifiableUint8ListView(Uint8List(16)));
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:99:17: Error: Method not found: 'UnmodifiableUint8ListView'.
    return Guid(UnmodifiableUint8ListView(Uint8List.fromList(guidAsBytes)));
                ^^^^^^^^^^^^^^^^^^^^^^^^^

FYI: @ bsutton

My CIs using onepub are crashing.

Thanks for the report, looks like the issue is in both win32 and the tar lib.

I will get the team to see if we can upgrade each of these.

Give us a couple of days.

Thanks for the report, looks like the issue is in both win32 and the tar lib.

I will get the team to see if we can upgrade each of these.

Give us a couple of days.

Thanks, and good morning in Australia ๐Ÿ‘๐Ÿป

The error in the log with win32
was on version 4.1.4.

Maybe

win32: ^5.5.3

already fixed this.

so I've spoken to the dev team an they were actually in the middle of preparing the release.

onepub 5.0.0 is now available which should resolve our issue.

give it a crack and let us know if you have any issues.

CI is working now. Thx! ๐Ÿ‘