shamblett / cbor

A CBOR implementation for Dart
MIT License
36 stars 15 forks source link

Error: The class 'Sink' can't be extended outside of its library because it's an interface class. #56

Closed Kurogoma4D closed 11 months ago

Kurogoma4D commented 1 year ago

I just created a new dart project, and run the example script.

Then I've got these errors:

../../.pub-cache/hosted/pub.dev/cbor-6.1.0/lib/src/decoder/pretty_print.dart:37:28: Error: The class 'Sink' can't be extended outside of its library because it's an interface class.
class _PrettyPrint extends Sink<RawValue> {
                           ^
../../.pub-cache/hosted/pub.dev/cbor-6.1.0/lib/src/encoder/encoder.dart:40:34: Error: The class 'Sink' can't be extended outside of its library because it's an interface class.
class _ChunkedConversion extends Sink<CborValue> {
                                 ^
../../.pub-cache/hosted/pub.dev/cbor-6.1.0/lib/src/decoder/stage2.dart:26:29: Error: The class 'Sink' can't be extended outside of its library because it's an interface class.
class RawSinkTagged extends Sink<RawValue> {
                            ^
../../.pub-cache/hosted/pub.dev/cbor-6.1.0/lib/src/decoder/stage3.dart:16:24: Error: The class 'Sink' can't be extended outside of its library because it's an interface class.
class CborSink extends Sink<RawValueTagged> {
                       ^
../../.pub-cache/hosted/pub.dev/cbor-6.1.0/lib/src/encoder/sink.dart:15:35: Error: The class 'Sink' can't be extended outside of its library because it's an interface class.
abstract class EncodeSink extends Sink<List<int>> {
                                  ^
../../.pub-cache/hosted/pub.dev/cbor-6.1.0/lib/src/utils/utils.dart:33:30: Error: The class 'Sink' can't be extended outside of its library because it's an interface class.
class _MapSink<T, U> extends Sink<U> {

Dart version:

> dart --version 
Dart SDK version: 3.1.0-333.0.dev (dev) (Thu Jul 20 13:04:10 2023 -0700) on "macos_arm64"
shamblett commented 1 year ago

The examples(and unit tests) are working fine for me on Dart 3.0.6. You seem to be using a dev version of Dart, I can't really do anything to the package until Dart 3.1.0 is released. I'll check it again when this happens. I'll leave this open for now.

Kurogoma4D commented 1 year ago

Makes sense, then I'll use stable version. Thanks!

shamblett commented 11 months ago

Package re-published at version 6.1.1