update for null-safety publication (#163)
update for null-safety publication
diff --git a/appveyor.yml b/appveyor.yml
index 27abf4b..319ec41 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -11,4 +11,4 @@
build: off
test_script:
- - pub run --enable-experiment=non-nullable test -j1
+ - pub run test -j1
diff --git a/dev/bots/travis_script.sh b/dev/bots/travis_script.sh
index d601d39..fe55e57 100755
--- a/dev/bots/travis_script.sh
+++ b/dev/bots/travis_script.sh
@@ -11,10 +11,10 @@
for package in "${PACKAGES[@]}"; do
echo "Analyzing packages/$package"
cd $ROOT/packages/$package
- dartanalyzer --enable-experiment=non-nullable --options=$ROOT/analysis_options.yaml . || exit $?
+ dartanalyzer --options=$ROOT/analysis_options.yaml . || exit $?
done
else
# tests shard
cd $ROOT/packages/file
- pub run --enable-experiment=non-nullable test -j1 -rexpanded || exit $?
+ pub run test -j1 -rexpanded || exit $?
fi
diff --git a/packages/file/CHANGELOG.md b/packages/file/CHANGELOG.md
index 46fffae..ee25fbc 100644
--- a/packages/file/CHANGELOG.md
+++ b/packages/file/CHANGELOG.md
@@ -1,4 +1,4 @@
-#### 6.0.0-nullsafety
+#### 6.0.0-nullsafety.1
* Update to null safety.
* Remove record/replay functionality.
diff --git a/packages/file/lib/chroot.dart b/packages/file/lib/chroot.dart
index 3967fff..56d2bd5 100644
--- a/packages/file/lib/chroot.dart
+++ b/packages/file/lib/chroot.dart
@@ -2,7 +2,5 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
/// A file system that provides a view into _another_ `FileSystem` via a path.
export 'src/backends/chroot.dart';
diff --git a/packages/file/lib/file.dart b/packages/file/lib/file.dart
index 07ee858..cdde9fe 100644
--- a/packages/file/lib/file.dart
+++ b/packages/file/lib/file.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
/// Core interfaces containing the abstract `FileSystem` interface definition
/// and all associated types used by `FileSystem`.
export 'src/forwarding.dart';
diff --git a/packages/file/lib/local.dart b/packages/file/lib/local.dart
index 773b000..74f506e 100644
--- a/packages/file/lib/local.dart
+++ b/packages/file/lib/local.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
/// A local file system implementation. This relies on the use of `dart:io`
/// and is thus not suitable for use in the browser.
export 'src/backends/local.dart';
diff --git a/packages/file/lib/memory.dart b/packages/file/lib/memory.dart
index b0d6c3e..31e90e7 100644
--- a/packages/file/lib/memory.dart
+++ b/packages/file/lib/memory.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
/// An implementation of `FileSystem` that exists entirely in memory with an
/// internal representation loosely based on the Filesystem Hierarchy Standard.
export 'src/backends/memory.dart';
diff --git a/packages/file/lib/src/backends/chroot.dart b/packages/file/lib/src/backends/chroot.dart
index 7a9a1f0..72ce3ca 100644
--- a/packages/file/lib/src/backends/chroot.dart
+++ b/packages/file/lib/src/backends/chroot.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
library file.src.backends.chroot;
import 'dart:async';
diff --git a/packages/file/lib/src/backends/chroot/chroot_directory.dart b/packages/file/lib/src/backends/chroot/chroot_directory.dart
index 74e3cd2..8fec7b1 100644
--- a/packages/file/lib/src/backends/chroot/chroot_directory.dart
+++ b/packages/file/lib/src/backends/chroot/chroot_directory.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
part of file.src.backends.chroot;
class _ChrootDirectory extends _ChrootFileSystemEntity<Directory, io.Directory>
diff --git a/packages/file/lib/src/backends/chroot/chroot_file.dart b/packages/file/lib/src/backends/chroot/chroot_file.dart
index 3668ea7..515720a 100644
--- a/packages/file/lib/src/backends/chroot/chroot_file.dart
+++ b/packages/file/lib/src/backends/chroot/chroot_file.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
part of file.src.backends.chroot;
typedef _SetupCallback = dynamic Function();
@@ -65,7 +64,6 @@
.link(fileSystem._real(path))
.rename(fileSystem._real(newPath));
return _ChrootFile(fileSystem, newPath);
- break;
default:
throw AssertionError();
}
@@ -114,7 +112,6 @@
.link(fileSystem._real(path))
.renameSync(fileSystem._real(newPath));
return _ChrootFile(fileSystem, newPath);
- break;
default:
throw AssertionError();
}
diff --git a/packages/file/lib/src/backends/chroot/chroot_file_system.dart b/packages/file/lib/src/backends/chroot/chroot_file_system.dart
index 02423b7..ddf752e 100644
--- a/packages/file/lib/src/backends/chroot/chroot_file_system.dart
+++ b/packages/file/lib/src/backends/chroot/chroot_file_system.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
part of file.src.backends.chroot;
const String _thisDir = '.';
diff --git a/packages/file/lib/src/backends/chroot/chroot_file_system_entity.dart b/packages/file/lib/src/backends/chroot/chroot_file_system_entity.dart
index d9e726d..8e859ac 100644
--- a/packages/file/lib/src/backends/chroot/chroot_file_system_entity.dart
+++ b/packages/file/lib/src/backends/chroot/chroot_file_system_entity.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
part of file.src.backends.chroot;
abstract class _ChrootFileSystemEntity<T extends FileSystemEntity,
diff --git a/packages/file/lib/src/backends/chroot/chroot_link.dart b/packages/file/lib/src/backends/chroot/chroot_link.dart
index 1eb7497..acbeda6 100644
--- a/packages/file/lib/src/backends/chroot/chroot_link.dart
+++ b/packages/file/lib/src/backends/chroot/chroot_link.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
part of file.src.backends.chroot;
class _ChrootLink extends _ChrootFileSystemEntity<Link, io.Link>
diff --git a/packages/file/lib/src/backends/local.dart b/packages/file/lib/src/backends/local.dart
index eef8548..1e92241 100644
--- a/packages/file/lib/src/backends/local.dart
+++ b/packages/file/lib/src/backends/local.dart
@@ -2,5 +2,4 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
export 'local/local_file_system.dart' show LocalFileSystem;
diff --git a/packages/file/lib/src/backends/local/local_directory.dart b/packages/file/lib/src/backends/local/local_directory.dart
index 15030c6..ecb55cf 100644
--- a/packages/file/lib/src/backends/local/local_directory.dart
+++ b/packages/file/lib/src/backends/local/local_directory.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/src/common.dart' as common;
import 'package:file/src/forwarding.dart';
import 'package:file/src/io.dart' as io;
diff --git a/packages/file/lib/src/backends/local/local_file.dart b/packages/file/lib/src/backends/local/local_file.dart
index 239f46e..e7ed49d 100644
--- a/packages/file/lib/src/backends/local/local_file.dart
+++ b/packages/file/lib/src/backends/local/local_file.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/src/forwarding.dart';
import 'package:file/src/io.dart' as io;
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/local/local_file_system.dart b/packages/file/lib/src/backends/local/local_file_system.dart
index 4dc4451..069c436 100644
--- a/packages/file/lib/src/backends/local/local_file_system.dart
+++ b/packages/file/lib/src/backends/local/local_file_system.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/src/io.dart' as io;
diff --git a/packages/file/lib/src/backends/local/local_file_system_entity.dart b/packages/file/lib/src/backends/local/local_file_system_entity.dart
index fc4adfc..acfe761 100644
--- a/packages/file/lib/src/backends/local/local_file_system_entity.dart
+++ b/packages/file/lib/src/backends/local/local_file_system_entity.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/src/forwarding.dart';
import 'package:file/src/io.dart' as io;
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/local/local_link.dart b/packages/file/lib/src/backends/local/local_link.dart
index 2f8956b..46c3190 100644
--- a/packages/file/lib/src/backends/local/local_link.dart
+++ b/packages/file/lib/src/backends/local/local_link.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/src/forwarding.dart';
import 'package:file/src/io.dart' as io;
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/memory.dart b/packages/file/lib/src/backends/memory.dart
index 8ec1612..428bc54 100644
--- a/packages/file/lib/src/backends/memory.dart
+++ b/packages/file/lib/src/backends/memory.dart
@@ -2,6 +2,5 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
export 'memory/memory_file_system.dart' show MemoryFileSystem;
export 'memory/style.dart' show FileSystemStyle, StyleableFileSystem;
diff --git a/packages/file/lib/src/backends/memory/clock.dart b/packages/file/lib/src/backends/memory/clock.dart
index d078057..98d5434 100644
--- a/packages/file/lib/src/backends/memory/clock.dart
+++ b/packages/file/lib/src/backends/memory/clock.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
/// Interface describing clocks used by the [MemoryFileSystem].
///
/// The [MemoryFileSystem] uses a clock to determine the modification times of
diff --git a/packages/file/lib/src/backends/memory/common.dart b/packages/file/lib/src/backends/memory/common.dart
index f8f43de..80e3c38 100644
--- a/packages/file/lib/src/backends/memory/common.dart
+++ b/packages/file/lib/src/backends/memory/common.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/src/common.dart' as common;
/// Generates a path to use in error messages.
diff --git a/packages/file/lib/src/backends/memory/memory_directory.dart b/packages/file/lib/src/backends/memory/memory_directory.dart
index 8285a2a..729453d 100644
--- a/packages/file/lib/src/backends/memory/memory_directory.dart
+++ b/packages/file/lib/src/backends/memory/memory_directory.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/memory/memory_file.dart b/packages/file/lib/src/backends/memory/memory_file.dart
index a1315cd..e285f49 100644
--- a/packages/file/lib/src/backends/memory/memory_file.dart
+++ b/packages/file/lib/src/backends/memory/memory_file.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'dart:convert';
import 'dart:math' as math show min;
diff --git a/packages/file/lib/src/backends/memory/memory_file_stat.dart b/packages/file/lib/src/backends/memory/memory_file_stat.dart
index 0e158cc..94f86d1 100644
--- a/packages/file/lib/src/backends/memory/memory_file_stat.dart
+++ b/packages/file/lib/src/backends/memory/memory_file_stat.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/src/io.dart' as io;
/// Internal implementation of [io.FileStat].
diff --git a/packages/file/lib/src/backends/memory/memory_file_system.dart b/packages/file/lib/src/backends/memory/memory_file_system.dart
index 679f1fc..9bb82db 100644
--- a/packages/file/lib/src/backends/memory/memory_file_system.dart
+++ b/packages/file/lib/src/backends/memory/memory_file_system.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/memory/memory_file_system_entity.dart b/packages/file/lib/src/backends/memory/memory_file_system_entity.dart
index fa0b0a6..d473dab 100644
--- a/packages/file/lib/src/backends/memory/memory_file_system_entity.dart
+++ b/packages/file/lib/src/backends/memory/memory_file_system_entity.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/memory/memory_link.dart b/packages/file/lib/src/backends/memory/memory_link.dart
index 895cfe4..b22e2fd 100644
--- a/packages/file/lib/src/backends/memory/memory_link.dart
+++ b/packages/file/lib/src/backends/memory/memory_link.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/memory/memory_random_access_file.dart b/packages/file/lib/src/backends/memory/memory_random_access_file.dart
index 3998cb8..d4fe73d 100644
--- a/packages/file/lib/src/backends/memory/memory_random_access_file.dart
+++ b/packages/file/lib/src/backends/memory/memory_random_access_file.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:convert';
import 'dart:math' as math show min;
import 'dart:typed_data';
diff --git a/packages/file/lib/src/backends/memory/node.dart b/packages/file/lib/src/backends/memory/node.dart
index 476af38..71c86d2 100644
--- a/packages/file/lib/src/backends/memory/node.dart
+++ b/packages/file/lib/src/backends/memory/node.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
import 'dart:typed_data';
import 'package:file/file.dart';
diff --git a/packages/file/lib/src/backends/memory/style.dart b/packages/file/lib/src/backends/memory/style.dart
index 945afe8..701c9d0 100644
--- a/packages/file/lib/src/backends/memory/style.dart
+++ b/packages/file/lib/src/backends/memory/style.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/file.dart';
import 'package:path/path.dart' as p;
diff --git a/packages/file/lib/src/backends/memory/utils.dart b/packages/file/lib/src/backends/memory/utils.dart
index e27a82a..109baed 100644
--- a/packages/file/lib/src/backends/memory/utils.dart
+++ b/packages/file/lib/src/backends/memory/utils.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/file.dart';
import 'package:file/src/common.dart' as common;
import 'package:file/src/io.dart' as io;
diff --git a/packages/file/lib/src/common.dart b/packages/file/lib/src/common.dart
index ea415a2..95eb1e1 100644
--- a/packages/file/lib/src/common.dart
+++ b/packages/file/lib/src/common.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'interface.dart';
/// Returns a 'No such file or directory' [FileSystemException].
diff --git a/packages/file/lib/src/forwarding.dart b/packages/file/lib/src/forwarding.dart
index 82651aa..e413acf 100644
--- a/packages/file/lib/src/forwarding.dart
+++ b/packages/file/lib/src/forwarding.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
export 'forwarding/forwarding_directory.dart';
export 'forwarding/forwarding_file.dart';
export 'forwarding/forwarding_file_system.dart';
diff --git a/packages/file/lib/src/forwarding/forwarding_directory.dart b/packages/file/lib/src/forwarding/forwarding_directory.dart
index 099152f..c14d957 100644
--- a/packages/file/lib/src/forwarding/forwarding_directory.dart
+++ b/packages/file/lib/src/forwarding/forwarding_directory.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/src/io.dart' as io;
diff --git a/packages/file/lib/src/forwarding/forwarding_file.dart b/packages/file/lib/src/forwarding/forwarding_file.dart
index 0cbfd3c..d615352 100644
--- a/packages/file/lib/src/forwarding/forwarding_file.dart
+++ b/packages/file/lib/src/forwarding/forwarding_file.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'dart:convert';
import 'dart:typed_data';
diff --git a/packages/file/lib/src/forwarding/forwarding_file_system.dart b/packages/file/lib/src/forwarding/forwarding_file_system.dart
index 98fda92..6d027cf 100644
--- a/packages/file/lib/src/forwarding/forwarding_file_system.dart
+++ b/packages/file/lib/src/forwarding/forwarding_file_system.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/src/io.dart' as io;
diff --git a/packages/file/lib/src/forwarding/forwarding_file_system_entity.dart b/packages/file/lib/src/forwarding/forwarding_file_system_entity.dart
index 7b334b2..75804a9 100644
--- a/packages/file/lib/src/forwarding/forwarding_file_system_entity.dart
+++ b/packages/file/lib/src/forwarding/forwarding_file_system_entity.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/src/io.dart' as io;
diff --git a/packages/file/lib/src/forwarding/forwarding_link.dart b/packages/file/lib/src/forwarding/forwarding_link.dart
index 6082a65..6dd0403 100644
--- a/packages/file/lib/src/forwarding/forwarding_link.dart
+++ b/packages/file/lib/src/forwarding/forwarding_link.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:file/src/io.dart' as io;
diff --git a/packages/file/lib/src/interface.dart b/packages/file/lib/src/interface.dart
index e276fd0..4662e35 100644
--- a/packages/file/lib/src/interface.dart
+++ b/packages/file/lib/src/interface.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
library file.src.interface;
export 'interface/directory.dart';
diff --git a/packages/file/lib/src/interface/directory.dart b/packages/file/lib/src/interface/directory.dart
index f499371..4162d15 100644
--- a/packages/file/lib/src/interface/directory.dart
+++ b/packages/file/lib/src/interface/directory.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import '../io.dart' as io;
diff --git a/packages/file/lib/src/interface/error_codes.dart b/packages/file/lib/src/interface/error_codes.dart
index e3e0327..2629a5d 100644
--- a/packages/file/lib/src/interface/error_codes.dart
+++ b/packages/file/lib/src/interface/error_codes.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'error_codes_internal.dart'
if (dart.library.io) 'error_codes_dart_io.dart';
diff --git a/packages/file/lib/src/interface/error_codes_dart_io.dart b/packages/file/lib/src/interface/error_codes_dart_io.dart
index da3e4b5..3f0a97f 100644
--- a/packages/file/lib/src/interface/error_codes_dart_io.dart
+++ b/packages/file/lib/src/interface/error_codes_dart_io.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:io' show Platform;
/// If we have `dart:io` available, we pull the current operating system from
diff --git a/packages/file/lib/src/interface/error_codes_internal.dart b/packages/file/lib/src/interface/error_codes_internal.dart
index 6082bb0..0a9d7dc 100644
--- a/packages/file/lib/src/interface/error_codes_internal.dart
+++ b/packages/file/lib/src/interface/error_codes_internal.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
/// In environments that don't have `dart:io`, we can't access the Platform
/// class to determine what platform we're on, so we just pretend we're on
/// Linux, meaning we'll get errno values that match Linux's errno.h.
diff --git a/packages/file/lib/src/interface/file.dart b/packages/file/lib/src/interface/file.dart
index 3025d56..ad50475 100644
--- a/packages/file/lib/src/interface/file.dart
+++ b/packages/file/lib/src/interface/file.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'dart:convert';
diff --git a/packages/file/lib/src/interface/file_system.dart b/packages/file/lib/src/interface/file_system.dart
index 2198cef..b0cc9fd 100644
--- a/packages/file/lib/src/interface/file_system.dart
+++ b/packages/file/lib/src/interface/file_system.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'package:meta/meta.dart';
diff --git a/packages/file/lib/src/interface/file_system_entity.dart b/packages/file/lib/src/interface/file_system_entity.dart
index b8d1f99..71cb667 100644
--- a/packages/file/lib/src/interface/file_system_entity.dart
+++ b/packages/file/lib/src/interface/file_system_entity.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import '../io.dart' as io;
diff --git a/packages/file/lib/src/interface/link.dart b/packages/file/lib/src/interface/link.dart
index ad1515f..433b560 100644
--- a/packages/file/lib/src/interface/link.dart
+++ b/packages/file/lib/src/interface/link.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import '../io.dart' as io;
diff --git a/packages/file/lib/src/io.dart b/packages/file/lib/src/io.dart
index 7bc7d09..9d57e78 100644
--- a/packages/file/lib/src/io.dart
+++ b/packages/file/lib/src/io.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
-
/// For internal use only!
///
/// This exposes the subset of the `dart:io` interfaces that are required by
diff --git a/packages/file/pubspec.yaml b/packages/file/pubspec.yaml
index 31d7757..8d54941 100644
--- a/packages/file/pubspec.yaml
+++ b/packages/file/pubspec.yaml
@@ -1,5 +1,5 @@
name: file
-version: 6.0.0-nullsafety
+version: 6.0.0-nullsafety.1
description:
A pluggable, mockable file system abstraction for Dart. Supports local file
system access, as well as in-memory file systems, record-replay file systems,
@@ -7,12 +7,12 @@
homepage: https://github.com/google/file.dart
environment:
- sdk: '>=2.9.0 <3.0.0'
+ sdk: '>=2.10.0-4.0.dev <2.10.0'
dependencies:
meta: ^1.3.0-nullsafety.2
path: ^1.8.0-nullsafety
dev_dependencies:
- test: '>=1.0.0 <2.0.0'
+ test: '^1.16.0-nullsafety.1'
file_testing: '>=2.0.0 <3.0.0'
diff --git a/packages/file/test/chroot_test.dart b/packages/file/test/chroot_test.dart
index 4d811a0..6efd7bb 100644
--- a/packages/file/test/chroot_test.dart
+++ b/packages/file/test/chroot_test.dart
@@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// @dart = 2.8
@TestOn('vm')
import 'dart:io' as io;
diff --git a/packages/file/test/common_tests.dart b/packages/file/test/common_tests.dart
index bf10efc..b60f1f2 100644
--- a/packages/file/test/common_tests.dart
+++ b/packages/file/test/common_tests.dart
@@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// @dart = 2.8
@TestOn('vm')
import 'dart:async';
import 'dart:convert';
diff --git a/packages/file/test/local_test.dart b/packages/file/test/local_test.dart
index ef2ffdd..e1618d2 100644
--- a/packages/file/test/local_test.dart
+++ b/packages/file/test/local_test.dart
@@ -13,9 +13,9 @@
void main() {
group('LocalFileSystem', () {
- LocalFileSystem fs;
- io.Directory tmp;
- String cwd;
+ late LocalFileSystem fs;
+ late io.Directory tmp;
+ late String cwd;
setUp(() {
fs = const LocalFileSystem();
diff --git a/packages/file/test/memory_test.dart b/packages/file/test/memory_test.dart
index 42be7b1..cb241d2 100644
--- a/packages/file/test/memory_test.dart
+++ b/packages/file/test/memory_test.dart
@@ -12,7 +12,7 @@
void main() {
group('MemoryFileSystem unix style', () {
- MemoryFileSystem fs;
+ late MemoryFileSystem fs;
setUp(() {
fs = MemoryFileSystem();
@@ -36,7 +36,7 @@
});
group('MemoryFileSystem windows style', () {
- MemoryFileSystem fs;
+ late MemoryFileSystem fs;
setUp(() {
fs = MemoryFileSystem(style: FileSystemStyle.windows);
diff --git a/packages/file/test/utils.dart b/packages/file/test/utils.dart
index aebad3e..231312f 100644
--- a/packages/file/test/utils.dart
+++ b/packages/file/test/utils.dart
@@ -11,7 +11,7 @@
/// milliseconds and microseconds from the specified [time].
///
/// If [time] is not specified, it will default to the current time.
-DateTime floor([DateTime time]) {
+DateTime floor([DateTime? time]) {
time ??= DateTime.now();
return time.subtract(Duration(
milliseconds: time.millisecond,
@@ -23,7 +23,7 @@
/// nearest second if necessary.
///
/// If [time] is not specified, it will default to the current time.
-DateTime ceil([DateTime time]) {
+DateTime ceil([DateTime? time]) {
time ??= DateTime.now();
int microseconds = (1000 * time.millisecond) + time.microsecond;
return (microseconds == 0)
@@ -34,7 +34,7 @@
/// Returns 1 second before the [floor] of the specified [DateTime].
// TODO(jamesderlin): Remove this and use [floor], https://github.com/dart-lang/sdk/issues/42444
-DateTime downstairs([DateTime time]) => floor(time).subtract(_oneSecond);
+DateTime downstairs([DateTime? time]) => floor(time).subtract(_oneSecond);
/// Successfully matches against a [DateTime] that is the same moment or before
/// the specified [time].