Support Dart 3.1
diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml
index c76e653..1f23713 100644
--- a/.github/workflows/dart.yml
+++ b/.github/workflows/dart.yml
@@ -10,17 +10,22 @@
jobs:
analyze:
+ strategy:
+ matrix:
+ dart-sdk: [stable, beta, dev]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
+ with:
+ sdk: ${{ matrix.dart-sdk }}
- uses: actions/cache@v2
with:
path: |
${{ env.PUB_CACHE }}
pubspec.lock
- key: dart-tool-${{ hashFiles('pubspec.yaml') }}
+ key: dart-tool-${{ matrix.dart-sdk }}-${{ hashFiles('pubspec.yaml') }}
- name: "Install dependencies"
run: dart pub upgrade
@@ -35,6 +40,7 @@
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
+ dart-sdk: [stable, beta, dev]
runs-on: ${{ matrix.os }}
# analyze creates the cache, avoid downloading dependencies again here
needs: analyze
@@ -42,10 +48,12 @@
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
+ with:
+ sdk: ${{ matrix.dart-sdk }}
- uses: actions/cache@v2
with:
path: ${{ env.PUB_CACHE }}
- key: dart-tool-${{ hashFiles('pubspec.yaml') }}
+ key: dart-tool-${{ matrix.dart-sdk }}-${{ hashFiles('pubspec.yaml') }}
- name: "Get dependencies"
run: dart pub get
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 50b4c7e..590a70d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.0.1
+
+- Fix an incompatibility with Dart 3.1.
+
## 1.0.0
- __Breaking__ Add class modifiers where applicable.
diff --git a/lib/src/writer.dart b/lib/src/writer.dart
index 17cab90..24f9190 100644
--- a/lib/src/writer.dart
+++ b/lib/src/writer.dart
@@ -156,7 +156,7 @@
gnuLongName,
}
-final class _WritingSink extends StreamSink<TarEntry> {
+final class _WritingSink implements StreamSink<TarEntry> {
final StreamSink<List<int>> _output;
final _SynchronousTarSink _synchronousWriter;
bool _closed = false;
@@ -273,7 +273,7 @@
}
}
-final class _SynchronousTarSink extends Sink<SynchronousTarEntry> {
+final class _SynchronousTarSink implements Sink<SynchronousTarEntry> {
final OutputFormat _format;
final Sink<List<int>> _output;
diff --git a/pubspec.yaml b/pubspec.yaml
index 3164d39..5d641aa 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: tar
description: Memory-efficient, streaming implementation of the tar file format
-version: 1.0.0
+version: 1.0.1
repository: https://github.com/simolus3/tar/
environment:
diff --git a/test/writer_test.dart b/test/writer_test.dart
index 040d2fc..d104dca 100644
--- a/test/writer_test.dart
+++ b/test/writer_test.dart
@@ -176,7 +176,7 @@
});
}
-class _NullStreamSink<T> extends StreamSink<T> {
+class _NullStreamSink<T> implements StreamSink<T> {
@override
void add(T event) {}