@@ -10,9 +10,6 @@ import 'package:async/async.dart';
1010import 'package:build/experiments.dart' ;
1111import 'package:build_runner_core/build_runner_core.dart' ;
1212import 'package:io/io.dart' ;
13- import 'package:path/path.dart' as p;
14- import 'package:pub_semver/pub_semver.dart' ;
15- import 'package:pubspec_parse/pubspec_parse.dart' ;
1613
1714import '../build_script_generate/build_process_state.dart' ;
1815import '../generate/build.dart' ;
@@ -22,12 +19,7 @@ import 'options.dart';
2219/// A command that does a single build and then runs tests using the compiled
2320/// assets.
2421class TestCommand extends BuildRunnerCommand {
25- TestCommand (PackageGraph packageGraph)
26- : super (
27- // Use symlinks by default, if package:test supports it.
28- symlinksDefault:
29- _packageTestSupportsSymlinks (packageGraph) && ! Platform .isWindows,
30- );
22+ TestCommand () : super (symlinksDefault: ! Platform .isWindows);
3123
3224 @override
3325 String get invocation =>
@@ -169,15 +161,6 @@ class TestCommand extends BuildRunnerCommand {
169161 }
170162}
171163
172- bool _packageTestSupportsSymlinks (PackageGraph packageGraph) {
173- var testPackage = packageGraph['test' ];
174- if (testPackage == null ) return false ;
175- var pubspecPath = p.join (testPackage.path, 'pubspec.yaml' );
176- var pubspec = Pubspec .parse (File (pubspecPath).readAsStringSync ());
177- if (pubspec.version == null ) return false ;
178- return pubspec.version! >= Version (1 , 3 , 0 );
179- }
180-
181164void _ensureBuildTestDependency (PackageGraph packageGraph) {
182165 if (! packageGraph.allPackages.containsKey ('build_test' )) {
183166 throw _BuildTestDependencyError ();
0 commit comments