Version 2.12.0-40.0.dev
Merge commit 'ef07751c43a7bdf9c0f43430d041c1840b8f925c' into 'dev'
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index ee25f1b..5be83bf 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -7,7 +7,6 @@
* Dart core libraries ("dart:async", "dart:io", etc.)
* Dart VM
* dart2js
-* dartfix
* dev_compiler
Some other pieces of the Dart ecosystem are maintained elsewhere. Please
diff --git a/BUILD.gn b/BUILD.gn
index d59ce8e..f1332bf 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -107,10 +107,6 @@
deps = [ "utils/dartfmt" ]
}
-group("dartfix") {
- deps = [ "utils/dartfix" ]
-}
-
group("analysis_server") {
deps = [ "utils/analysis_server" ]
}
diff --git a/pkg/_js_interop_checks/lib/js_interop_checks.dart b/pkg/_js_interop_checks/lib/js_interop_checks.dart
index 260937a..8bb8c6d 100644
--- a/pkg/_js_interop_checks/lib/js_interop_checks.dart
+++ b/pkg/_js_interop_checks/lib/js_interop_checks.dart
@@ -170,12 +170,17 @@
/// Returns whether [member] is considered to be a JS interop member.
bool _isJSInteropMember(Member member) {
- if (!member.isExternal) return false;
- if (_classHasJSAnnotation) return true;
- if (!_classHasJSAnnotation && member.enclosingClass != null) return false;
- // In the case where the member does not belong to any class, a JS
- // annotation is not needed on the library to be considered JS interop as
- // long as the member has an annotation.
- return hasJSInteropAnnotation(member) || _libraryHasJSAnnotation;
+ if (member.isExternal) {
+ if (_classHasJSAnnotation) return true;
+ if (member.enclosingClass == null) {
+ // In the case where the member does not belong to any class, a JS
+ // annotation is not needed on the library to be considered JS interop
+ // as long as the member has an annotation.
+ return hasJSInteropAnnotation(member) || _libraryHasJSAnnotation;
+ }
+ }
+
+ // Otherwise, not JS interop.
+ return false;
}
}
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 9a4bcad..8c3811e 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -5423,6 +5423,11 @@
@override
TypeAnnotation get type => _type;
+ /// Set the type being defined by the alias to the given [TypeAnnotation].
+ set type(TypeAnnotation typeAnnotation) {
+ _type = _becomeParentOf(typeAnnotation as TypeAnnotationImpl);
+ }
+
@override
TypeParameterList get typeParameters => _typeParameters;
diff --git a/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart b/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
index 5f5e191..38736b4 100644
--- a/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
@@ -668,7 +668,7 @@
safelyVisitNode(node.name);
safelyVisitNode(node.typeParameters);
sink.write(" = ");
- safelyVisitNode(node.functionType);
+ safelyVisitNode(node.type);
}
@override
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index 3648e1e..c2c60cd 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -603,7 +603,7 @@
cloneNode(node.name),
cloneNode(node.typeParameters),
cloneToken(node.equals),
- cloneNode(node.functionType),
+ cloneNode(node.type),
cloneToken(node.semicolon));
@override
@@ -1745,7 +1745,7 @@
isEqualNodes(node.name, other.name) &&
isEqualNodes(node.typeParameters, other.typeParameters) &&
isEqualTokens(node.equals, other.equals) &&
- isEqualNodes(node.functionType, other.functionType);
+ isEqualNodes(node.type, other.type);
}
@override
@@ -3304,8 +3304,8 @@
} else if (identical(node.typeParameters, _oldNode)) {
node.typeParameters = _newNode as TypeParameterList;
return true;
- } else if (identical(node.functionType, _oldNode)) {
- node.functionType = _newNode as GenericFunctionType;
+ } else if (identical(node.type, _oldNode)) {
+ (node as GenericTypeAliasImpl).type = _newNode as TypeAnnotation;
return true;
} else if (_replaceInList(node.metadata)) {
return true;
@@ -4664,7 +4664,7 @@
_isEqualNodes(node.name, toNode.name),
_isEqualNodes(node.typeParameters, toNode.typeParameters),
_isEqualTokens(node.equals, toNode.equals),
- _isEqualNodes(node.functionType, toNode.functionType),
+ _isEqualNodes(node.type, toNode.type),
_isEqualTokens(node.semicolon, toNode.semicolon))) {
return true;
}
diff --git a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
index 858f235..8ad526f 100644
--- a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
@@ -726,7 +726,7 @@
_withNameScope(() {
_buildTypeParameterElements(node.typeParameters);
node.typeParameters?.accept(this);
- node.functionType?.accept(this);
+ node.type?.accept(this);
});
});
}
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 5204bac..58ec08b 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -1540,15 +1540,8 @@
if (type is! GenericFunctionType && !enableNonFunctionTypeAliases) {
handleRecoverableError(messageTypedefNotFunction, equals, equals);
}
- declarations.add(ast.genericTypeAlias(
- comment,
- metadata,
- typedefKeyword,
- name,
- templateParameters,
- equals,
- type,
- semicolon));
+ declarations.add(ast.genericTypeAlias(comment, metadata, typedefKeyword,
+ name, templateParameters, equals, type, semicolon));
}
}
diff --git a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
index 9e1b27e..4c87ce8 100644
--- a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
@@ -520,7 +520,7 @@
node.name.accept(this);
node.typeParameters?.accept(this);
_token(node.equals);
- node.functionType.accept(this);
+ node.type.accept(this);
_token(node.semicolon);
}
diff --git a/pkg/analyzer/lib/src/summary2/informative_data.dart b/pkg/analyzer/lib/src/summary2/informative_data.dart
index c26e114..acb0fa8 100644
--- a/pkg/analyzer/lib/src/summary2/informative_data.dart
+++ b/pkg/analyzer/lib/src/summary2/informative_data.dart
@@ -263,7 +263,7 @@
);
node.typeParameters?.accept(this);
- node.functionType?.accept(this);
+ node.type?.accept(this);
}
@override
diff --git a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
index a4182c5..61fd6d1 100644
--- a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
@@ -145,7 +145,10 @@
void visitGenericTypeAlias(GenericTypeAlias node) {
node.metadata.accept(this);
node.typeParameters?.accept(this);
- node.functionType?.accept(this);
+ // TODO(eernst): Extend this visitor to visit types.
+ // E.g., `List<Function<@m X>()> Function()` is not included now.
+ var type = node.type;
+ if (type is GenericFunctionType) type.accept(this);
}
@override
diff --git a/pkg/analyzer/lib/src/summary2/reference_resolver.dart b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
index 451dcb1..4083b28 100644
--- a/pkg/analyzer/lib/src/summary2/reference_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
@@ -347,7 +347,7 @@
scope = TypeParameterScope(outerScope, element.typeParameters);
node.typeParameters?.accept(this);
- node.functionType?.accept(this);
+ node.type?.accept(this);
nodesToBuildType.addDeclaration(node);
scope = outerScope;
diff --git a/pkg/analyzer/lib/src/summary2/simply_bounded.dart b/pkg/analyzer/lib/src/summary2/simply_bounded.dart
index bb5b05d..aa7d95f 100644
--- a/pkg/analyzer/lib/src/summary2/simply_bounded.dart
+++ b/pkg/analyzer/lib/src/summary2/simply_bounded.dart
@@ -158,11 +158,15 @@
collector.visitParameters(node.parameters);
return collector.types;
} else if (node is GenericTypeAlias) {
- var functionType = node.functionType;
- if (functionType != null) {
+ var type = node.type;
+ if (type != null) {
var collector = _TypeCollector();
- collector.addType(functionType.returnType);
- collector.visitParameters(functionType.parameters);
+ if (type is GenericFunctionType) {
+ collector.addType(type.returnType);
+ collector.visitParameters(type.parameters);
+ } else {
+ collector.addType(type);
+ }
return collector.types;
} else {
return const <TypeAnnotation>[];
diff --git a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
index 8c2193c..71c3ecb 100644
--- a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
@@ -122,6 +122,7 @@
''', [
error(ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE, 13, 1),
error(ParserErrorCode.EXPECTED_TYPE_NAME, 15, 1),
+ error(CompileTimeErrorCode.UNDEFINED_CLASS, 15, 0),
error(CompileTimeErrorCode.UNDEFINED_GETTER, 33, 1),
]);
}
diff --git a/pkg/dartdev/lib/dartdev.dart b/pkg/dartdev/lib/dartdev.dart
index e2229b4..703abc6 100644
--- a/pkg/dartdev/lib/dartdev.dart
+++ b/pkg/dartdev/lib/dartdev.dart
@@ -33,128 +33,34 @@
Future<void> runDartdev(List<String> args, SendPort port) async {
VmInteropHandler.initialize(port);
- int result;
-
- // The exit code for the dartdev process; null indicates that it has not been
- // set yet. The value is set in the catch and finally blocks below.
- int exitCode;
-
- // Any caught non-UsageExceptions when running the sub command.
- Object exception;
- StackTrace stackTrace;
-
- // The Analytics instance used to report information back to Google Analytics;
- // see lib/src/analytics.dart.
- final analytics = createAnalyticsInstance(
- args.contains('--disable-dartdev-analytics'),
- );
-
- // If we have not printed the analyticsNoticeOnFirstRunMessage to stdout,
- // the user is on a terminal, and the machine is not a bot, then print the
- // disclosure and set analytics.disclosureShownOnTerminal to true.
- if (analytics is DartdevAnalytics &&
- !analytics.disclosureShownOnTerminal &&
- io.stdout.hasTerminal &&
- !isBot()) {
- print(analyticsNoticeOnFirstRunMessage);
- analytics.disclosureShownOnTerminal = true;
+ if (args.contains('run')) {
+ // These flags have a format that can't be handled by package:args, so while
+ // they are valid flags we'll assume the VM has verified them by this point.
+ args = args
+ .where(
+ (element) => !(element.contains('--observe') ||
+ element.contains('--enable-vm-service')),
+ )
+ .toList();
}
- // When `--disable-analytics` or `--enable-analytics` are called we perform
- // the respective intention and print any notices to standard out and exit.
- if (args.contains('--disable-analytics')) {
- // This block also potentially catches the case of (disableAnalytics &&
- // enableAnalytics), in which we favor the disabling of analytics.
- analytics.enabled = false;
+ // Finally, call the runner to execute the command; see DartdevRunner.
- // Alert the user that analytics has been disabled.
- print(analyticsDisabledNoticeMessage);
- VmInteropHandler.exit(0);
- return;
- } else if (args.contains('--enable-analytics')) {
- analytics.enabled = true;
-
- // Alert the user again that anonymous data will be collected.
- print(analyticsNoticeOnFirstRunMessage);
- VmInteropHandler.exit(0);
- return;
- }
-
+ final runner = DartdevRunner(args);
+ var exitCode = 1;
try {
- final runner = DartdevRunner(args, analytics);
-
- // Run can't be called with the '--disable-dartdev-analytics' flag; remove
- // it if it is contained in args.
- if (args.contains('--disable-dartdev-analytics')) {
- args = List.from(args)..remove('--disable-dartdev-analytics');
- }
-
- if (args.contains('run')) {
- // These flags have a format that can't be handled by package:args, so while
- // they are valid flags we'll assume the VM has verified them by this point.
- args = args
- .where(
- (element) => !(element.contains('--observe') ||
- element.contains('--enable-vm-service')),
- )
- .toList();
- }
-
- // If ... help pub ... is in the args list, remove 'help', and add '--help'
- // to the end of the list. This will make it possible to use the help
- // command to access subcommands of pub such as `dart help pub publish`; see
- // https://github.com/dart-lang/sdk/issues/42965.
- if (PubUtils.shouldModifyArgs(args, runner.commands.keys.toList())) {
- args = PubUtils.modifyArgs(args);
- }
-
- // Finally, call the runner to execute the command; see DartdevRunner.
- result = await runner.run(args);
- } catch (e, st) {
- if (e is UsageException) {
- io.stderr.writeln('$e');
- exitCode = 64;
- } else {
- // Set the exception and stack trace only for non-UsageException cases:
- exception = e;
- stackTrace = st;
- io.stderr.writeln('$e');
- io.stderr.writeln('$st');
- exitCode = 1;
- }
+ exitCode = await runner.run(args);
+ } on UsageException catch (e) {
+ // TODO(sigurdm): It is unclear when a UsageException gets to here, and
+ // when it is in DartdevRunner.runCommand.
+ io.stderr.writeln('$e');
+ exitCode = 64;
} finally {
- // Set the exitCode, if it wasn't set in the catch block above.
- exitCode ??= result ?? 0;
-
- // Send analytics before exiting
- if (analytics.enabled) {
- // And now send the exceptions and events to Google Analytics:
- if (exception != null) {
- unawaited(
- analytics.sendException(
- '${exception.runtimeType}\n${sanitizeStacktrace(stackTrace)}',
- fatal: true),
- );
- }
-
- await analytics.waitForLastPing(
- timeout: const Duration(milliseconds: 200));
- }
-
- // Set the enabled flag in the analytics object to true. Note: this will not
- // enable the analytics unless the disclosure was shown (terminal detected),
- // and the machine is not detected to be a bot.
- if (analytics.firstRun) {
- analytics.enabled = true;
- }
- analytics.close();
VmInteropHandler.exit(exitCode);
}
}
class DartdevRunner extends CommandRunner<int> {
- final Analytics analytics;
-
@override
final ArgParser argParser =
ArgParser(usageLineLength: dartdevUsageLineLength);
@@ -162,8 +68,7 @@
static const String dartdevDescription =
'A command-line utility for Dart development';
- DartdevRunner(List<String> args, this.analytics)
- : super('dart', '$dartdevDescription.') {
+ DartdevRunner(List<String> args) : super('dart', '$dartdevDescription.') {
final bool verbose = args.contains('-v') || args.contains('--verbose');
argParser.addFlag('verbose',
@@ -178,12 +83,9 @@
argParser.addFlag('diagnostics',
negatable: false, help: 'Show tool diagnostic output.', hide: !verbose);
- // A hidden flag to disable analytics on this run, this constructor can be
- // called with this flag, but should be removed before run() is called as
- // the flag has not been added to all sub-commands.
argParser.addFlag(
- 'disable-dartdev-analytics',
- negatable: false,
+ 'analytics',
+ negatable: true,
help: 'Disable anonymous analytics for this `dart *` run',
hide: true,
);
@@ -210,7 +112,38 @@
@override
Future<int> runCommand(ArgResults topLevelResults) async {
final stopwatch = Stopwatch()..start();
- assert(!topLevelResults.arguments.contains('--disable-dartdev-analytics'));
+ // The Analytics instance used to report information back to Google Analytics;
+ // see lib/src/analytics.dart.
+ final analytics = createAnalyticsInstance(!topLevelResults['analytics']);
+
+ // If we have not printed the analyticsNoticeOnFirstRunMessage to stdout,
+ // the user is on a terminal, and the machine is not a bot, then print the
+ // disclosure and set analytics.disclosureShownOnTerminal to true.
+ if (analytics is DartdevAnalytics &&
+ !analytics.disclosureShownOnTerminal &&
+ io.stdout.hasTerminal &&
+ !isBot()) {
+ print(analyticsNoticeOnFirstRunMessage);
+ analytics.disclosureShownOnTerminal = true;
+ }
+
+ // When `--disable-analytics` or `--enable-analytics` are called we perform
+ // the respective intention and print any notices to standard out and exit.
+ if (topLevelResults['disable-analytics']) {
+ // This block also potentially catches the case of (disableAnalytics &&
+ // enableAnalytics), in which we favor the disabling of analytics.
+ analytics.enabled = false;
+
+ // Alert the user that analytics has been disabled.
+ print(analyticsDisabledNoticeMessage);
+ return 0;
+ } else if (topLevelResults['enable-analytics']) {
+ analytics.enabled = true;
+
+ // Alert the user again that anonymous data will be collected.
+ print(analyticsNoticeOnFirstRunMessage);
+ return 0;
+ }
if (topLevelResults.command == null &&
topLevelResults.arguments.isNotEmpty) {
@@ -220,14 +153,12 @@
io.stderr.writeln(
"Error when reading '$firstArg': No such file or directory.");
// This is the exit code used by the frontend.
- VmInteropHandler.exit(254);
+ return 254;
}
}
- isDiagnostics = topLevelResults['diagnostics'];
-
final Ansi ansi = Ansi(Ansi.terminalSupportsAnsi);
- log = isDiagnostics
+ log = topLevelResults['diagnostics']
? Logger.verbose(ansi: ansi)
: Logger.standard(ansi: ansi);
@@ -245,8 +176,15 @@
analytics.sendScreenView(path),
);
+ // The exit code for the dartdev process; null indicates that it has not been
+ // set yet. The value is set in the catch and finally blocks below.
+ int exitCode;
+
+ // Any caught non-UsageExceptions when running the sub command.
+ Object exception;
+ StackTrace stackTrace;
try {
- final exitCode = await super.runCommand(topLevelResults);
+ exitCode = await super.runCommand(topLevelResults);
if (path != null && analytics.enabled) {
// Send the event to analytics
@@ -266,8 +204,16 @@
),
);
}
-
- return exitCode;
+ } on UsageException catch (e) {
+ io.stderr.writeln('$e');
+ exitCode = 64;
+ } catch (e, st) {
+ // Set the exception and stack trace only for non-UsageException cases:
+ exception = e;
+ stackTrace = st;
+ io.stderr.writeln('$e');
+ io.stderr.writeln('$st');
+ exitCode = 1;
} finally {
stopwatch.stop();
if (analytics.enabled) {
@@ -279,6 +225,32 @@
),
);
}
+ // Set the exitCode, if it wasn't set in the catch block above.
+ exitCode ??= 0;
+
+ // Send analytics before exiting
+ if (analytics.enabled) {
+ // And now send the exceptions and events to Google Analytics:
+ if (exception != null) {
+ unawaited(
+ analytics.sendException(
+ '${exception.runtimeType}\n${sanitizeStacktrace(stackTrace)}',
+ fatal: true),
+ );
+ }
+
+ await analytics.waitForLastPing(
+ timeout: const Duration(milliseconds: 200));
+ }
+
+ // Set the enabled flag in the analytics object to true. Note: this will not
+ // enable the analytics unless the disclosure was shown (terminal detected),
+ // and the machine is not detected to be a bot.
+ if (analytics.firstRun) {
+ analytics.enabled = true;
+ }
+ analytics.close();
+ return exitCode;
}
}
}
diff --git a/pkg/dartdev/lib/src/analytics.dart b/pkg/dartdev/lib/src/analytics.dart
index f8e8ffc..0462363 100644
--- a/pkg/dartdev/lib/src/analytics.dart
+++ b/pkg/dartdev/lib/src/analytics.dart
@@ -53,7 +53,7 @@
}
if (disableAnalytics) {
- // Dartdev tests pass a hidden 'disable-dartdev-analytics' flag which is
+ // Dartdev tests pass a hidden 'no-analytics' flag which is
// handled here.
// Also, stdout.hasTerminal is checked, if there is no terminal we infer that
// a machine is running dartdev so we return analytics shouldn't be set.
diff --git a/pkg/dartdev/lib/src/utils.dart b/pkg/dartdev/lib/src/utils.dart
index 88b80ed..32a9c8e 100644
--- a/pkg/dartdev/lib/src/utils.dart
+++ b/pkg/dartdev/lib/src/utils.dart
@@ -38,31 +38,6 @@
return s;
}
-/// Static util methods used in dartdev to potentially modify the order of the
-/// arguments passed into dartdev.
-class PubUtils {
- /// If [doModifyArgs] returns true, then this method returns a modified copy
- /// of the argument list, 'help' is removed from the interior of the list, and
- /// '--help' is added to the end of the list of arguments. This method returns
- /// a modified copy of the list, the list itself is not modified.
- static List<String> modifyArgs(List<String> args) => List.from(args)
- ..remove('help')
- ..add('--help');
-
- /// If ... help pub ..., and no other verb (such as 'analyze') appears before
- /// the ... help pub ... in the argument list, then return true.
- static bool shouldModifyArgs(List<String> args, List<String> allCmds) =>
- args != null &&
- allCmds != null &&
- args.isNotEmpty &&
- allCmds.isNotEmpty &&
- args.firstWhere((arg) => allCmds.contains(arg), orElse: () => '') ==
- 'help' &&
- args.contains('help') &&
- args.contains('pub') &&
- args.indexOf('help') + 1 == args.indexOf('pub');
-}
-
extension FileSystemEntityExtension on FileSystemEntity {
String get name => p.basename(path);
diff --git a/pkg/dartdev/test/analytics_test.dart b/pkg/dartdev/test/analytics_test.dart
index 26d9822..8c74972 100644
--- a/pkg/dartdev/test/analytics_test.dart
+++ b/pkg/dartdev/test/analytics_test.dart
@@ -23,7 +23,7 @@
group('Sending analytics', () {
test('help', () {
final p = project(logAnalytics: true);
- final result = p.runSync('help', []);
+ final result = p.runSync(['help']);
expect(extractAnalytics(result), [
{
'hitType': 'screenView',
@@ -51,7 +51,7 @@
});
test('create', () {
final p = project(logAnalytics: true);
- final result = p.runSync('create', ['-tpackage-simple', 'name']);
+ final result = p.runSync(['create', '-tpackage-simple', 'name']);
expect(extractAnalytics(result), [
{
'hitType': 'screenView',
@@ -82,7 +82,7 @@
test('pub get', () {
final p = project(logAnalytics: true);
- final result = p.runSync('pub', ['get', '--dry-run']);
+ final result = p.runSync(['pub', 'get', '--dry-run']);
expect(extractAnalytics(result), [
{
'hitType': 'screenView',
@@ -113,7 +113,7 @@
test('format', () {
final p = project(logAnalytics: true);
- final result = p.runSync('format', ['-l80']);
+ final result = p.runSync(['format', '-l80']);
expect(extractAnalytics(result), [
{
'hitType': 'screenView',
@@ -146,7 +146,8 @@
final p = project(
mainSrc: 'void main(List<String> args) => print(args)',
logAnalytics: true);
- final result = p.runSync('run', [
+ final result = p.runSync([
+ 'run',
'--no-pause-isolates-on-exit',
'--enable-asserts',
'lib/main.dart',
@@ -184,7 +185,8 @@
final p = project(
mainSrc: 'void main(List<String> args) => print(args);',
logAnalytics: true);
- final result = p.runSync('run', [
+ final result = p.runSync([
+ 'run',
'--enable-experiment=non-nullable',
'lib/main.dart',
]);
@@ -221,7 +223,7 @@
mainSrc: 'void main(List<String> args) => print(args);',
logAnalytics: true);
final result = p
- .runSync('compile', ['kernel', 'lib/main.dart', '-o', 'main.kernel']);
+ .runSync(['compile', 'kernel', 'lib/main.dart', '-o', 'main.kernel']);
expect(extractAnalytics(result), [
{
'hitType': 'screenView',
diff --git a/pkg/dartdev/test/commands/analyze_test.dart b/pkg/dartdev/test/commands/analyze_test.dart
index 2d88b65..0c07435 100644
--- a/pkg/dartdev/test/commands/analyze_test.dart
+++ b/pkg/dartdev/test/commands/analyze_test.dart
@@ -62,7 +62,7 @@
test('--help', () {
p = project();
- var result = p.runSync('analyze', ['--help']);
+ var result = p.runSync(['analyze', '--help']);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -72,7 +72,7 @@
test('multiple directories', () {
p = project();
- var result = p.runSync('analyze', ['/no/such/dir1/', '/no/such/dir2/']);
+ var result = p.runSync(['analyze', '/no/such/dir1/', '/no/such/dir2/']);
expect(result.exitCode, 64);
expect(result.stdout, isEmpty);
@@ -82,7 +82,7 @@
test('no such directory', () {
p = project();
- var result = p.runSync('analyze', ['/no/such/dir1/']);
+ var result = p.runSync(['analyze', '/no/such/dir1/']);
expect(result.exitCode, 64);
expect(result.stdout, isEmpty);
@@ -93,7 +93,7 @@
test('current working directory', () {
p = project(mainSrc: 'int get foo => 1;\n');
- var result = p.runSync('analyze', [], workingDir: p.dirPath);
+ var result = p.runSync(['analyze'], workingDir: p.dirPath);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -102,7 +102,7 @@
test('no errors', () {
p = project(mainSrc: 'int get foo => 1;\n');
- var result = p.runSync('analyze', [p.dirPath]);
+ var result = p.runSync(['analyze', p.dirPath]);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -111,7 +111,7 @@
test('one error', () {
p = project(mainSrc: "int get foo => 'str';\n");
- var result = p.runSync('analyze', [p.dirPath]);
+ var result = p.runSync(['analyze', p.dirPath]);
expect(result.exitCode, 3);
expect(result.stderr, isEmpty);
@@ -123,7 +123,7 @@
test('two errors', () {
p = project(mainSrc: "int get foo => 'str';\nint get bar => 'str';\n");
- var result = p.runSync('analyze', [p.dirPath]);
+ var result = p.runSync(['analyze', p.dirPath]);
expect(result.exitCode, 3);
expect(result.stderr, isEmpty);
@@ -134,7 +134,7 @@
p = project(
mainSrc: _unusedImportCodeSnippet,
analysisOptions: _unusedImportAnalysisOptions);
- var result = p.runSync('analyze', ['--fatal-warnings', p.dirPath]);
+ var result = p.runSync(['analyze', '--fatal-warnings', p.dirPath]);
expect(result.exitCode, equals(2));
expect(result.stderr, isEmpty);
@@ -145,7 +145,7 @@
p = project(
mainSrc: _unusedImportCodeSnippet,
analysisOptions: _unusedImportAnalysisOptions);
- var result = p.runSync('analyze', [p.dirPath]);
+ var result = p.runSync(['analyze', p.dirPath]);
expect(result.exitCode, equals(2));
expect(result.stderr, isEmpty);
@@ -156,7 +156,7 @@
p = project(
mainSrc: _unusedImportCodeSnippet,
analysisOptions: _unusedImportAnalysisOptions);
- var result = p.runSync('analyze', ['--no-fatal-warnings', p.dirPath]);
+ var result = p.runSync(['analyze', '--no-fatal-warnings', p.dirPath]);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -165,7 +165,7 @@
test('info implicit no --fatal-infos', () {
p = project(mainSrc: dartVersionFilePrefix2_9 + 'String foo() {}');
- var result = p.runSync('analyze', [p.dirPath]);
+ var result = p.runSync(['analyze', p.dirPath]);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -174,7 +174,7 @@
test('info --fatal-infos', () {
p = project(mainSrc: dartVersionFilePrefix2_9 + 'String foo() {}');
- var result = p.runSync('analyze', ['--fatal-infos', p.dirPath]);
+ var result = p.runSync(['analyze', '--fatal-infos', p.dirPath]);
expect(result.exitCode, 1);
expect(result.stderr, isEmpty);
@@ -188,7 +188,7 @@
var one = 1;
return result;
}''');
- var result = p.runSync('analyze', ['--verbose', p.dirPath]);
+ var result = p.runSync(['analyze', '--verbose', p.dirPath]);
expect(result.exitCode, 3);
expect(result.stderr, isEmpty);
diff --git a/pkg/dartdev/test/commands/compile_test.dart b/pkg/dartdev/test/commands/compile_test.dart
index 57e669a..f2f5f31 100644
--- a/pkg/dartdev/test/commands/compile_test.dart
+++ b/pkg/dartdev/test/commands/compile_test.dart
@@ -27,8 +27,9 @@
test('Implicit --help', () {
final p = project();
var result = p.runSync(
- 'compile',
- [],
+ [
+ 'compile',
+ ],
);
expect(result.stderr, contains('Compile Dart'));
expect(result.exitCode, compileErrorExitCode);
@@ -37,8 +38,7 @@
test('--help', () {
final p = project();
final result = p.runSync(
- 'compile',
- ['--help'],
+ ['compile', '--help'],
);
expect(result.stdout, contains('Compile Dart'));
expect(result.exitCode, 0);
@@ -48,8 +48,8 @@
final p = project(mainSrc: 'void main() { print("I love jit"); }');
final outFile = path.join(p.dirPath, 'main.jit');
var result = p.runSync(
- 'compile',
[
+ 'compile',
'jit-snapshot',
'-o',
outFile,
@@ -61,7 +61,7 @@
expect(File(outFile).existsSync(), true,
reason: 'File not found: $outFile');
- result = p.runSync('run', ['main.jit']);
+ result = p.runSync(['run', 'main.jit']);
expect(result.stdout, contains('I love jit'));
expect(result.stderr, isEmpty);
expect(result.exitCode, 0);
@@ -73,8 +73,8 @@
final outFile = path.canonicalize(path.join(p.dirPath, 'lib', 'main.exe'));
var result = p.runSync(
- 'compile',
[
+ 'compile',
'exe',
inFile,
],
@@ -102,8 +102,8 @@
final outFile = path.canonicalize(path.join(p.dirPath, 'myexe'));
var result = p.runSync(
- 'compile',
[
+ 'compile',
'exe',
'--define',
'life=42',
@@ -134,8 +134,8 @@
final outFile = path.canonicalize(path.join(p.dirPath, 'main.aot'));
var result = p.runSync(
- 'compile',
[
+ 'compile',
'aot-snapshot',
'-o',
'main.aot',
@@ -163,8 +163,8 @@
final p = project(mainSrc: 'void main() { print("I love kernel"); }');
final outFile = path.join(p.dirPath, 'main.dill');
var result = p.runSync(
- 'compile',
[
+ 'compile',
'kernel',
'-o',
outFile,
@@ -176,7 +176,7 @@
expect(result.stderr, isEmpty);
expect(result.exitCode, 0);
- result = p.runSync('run', ['main.dill']);
+ result = p.runSync(['run', 'main.dill']);
expect(result.stdout, contains('I love kernel'));
expect(result.stderr, isEmpty);
expect(result.exitCode, 0);
@@ -187,7 +187,8 @@
final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath));
final outFile = path.canonicalize(path.join(p.dirPath, 'main.js'));
- final result = p.runSync('compile', [
+ final result = p.runSync([
+ 'compile',
'js',
'-m',
'-o',
diff --git a/pkg/dartdev/test/commands/create_test.dart b/pkg/dartdev/test/commands/create_test.dart
index 38a8ebd..7f5c846 100644
--- a/pkg/dartdev/test/commands/create_test.dart
+++ b/pkg/dartdev/test/commands/create_test.dart
@@ -36,7 +36,7 @@
test('list templates', () {
p = project();
- ProcessResult result = p.runSync('create', ['--list-templates']);
+ ProcessResult result = p.runSync(['create', '--list-templates']);
expect(result.exitCode, 0);
String output = result.stdout.toString();
@@ -50,7 +50,9 @@
test('no directory given', () {
p = project();
- ProcessResult result = p.runSync('create', []);
+ ProcessResult result = p.runSync([
+ 'create',
+ ]);
expect(result.exitCode, 1);
});
@@ -58,7 +60,7 @@
p = project();
ProcessResult result = p.runSync(
- 'create', ['--template', CreateCommand.defaultTemplateId, p.dir.path]);
+ ['create', '--template', CreateCommand.defaultTemplateId, p.dir.path]);
expect(result.exitCode, 73);
});
@@ -66,7 +68,7 @@
p = project();
ProcessResult result =
- p.runSync('create', ['--no-pub', '--template', 'foo-bar', p.dir.path]);
+ p.runSync(['create', '--no-pub', '--template', 'foo-bar', p.dir.path]);
expect(result.exitCode, isNot(0));
});
@@ -76,7 +78,7 @@
p = project();
ProcessResult result = p
- .runSync('create', ['--force', '--template', templateId, p.dir.path]);
+ .runSync(['create', '--force', '--template', templateId, p.dir.path]);
expect(result.exitCode, 0);
String projectName = path.basename(p.dir.path);
diff --git a/pkg/dartdev/test/commands/fix_test.dart b/pkg/dartdev/test/commands/fix_test.dart
index 5450742..ad4999a 100644
--- a/pkg/dartdev/test/commands/fix_test.dart
+++ b/pkg/dartdev/test/commands/fix_test.dart
@@ -21,7 +21,7 @@
test('none', () {
p = project(mainSrc: 'int get foo => 1;\n');
- var result = p.runSync('fix', [p.dirPath]);
+ var result = p.runSync(['fix', p.dirPath]);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Nothing to fix!'));
@@ -38,7 +38,7 @@
- prefer_single_quotes
''',
);
- var result = p.runSync('fix', [], workingDir: p.dirPath);
+ var result = p.runSync(['fix'], workingDir: p.dirPath);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Fixed 1 file.'));
@@ -55,7 +55,7 @@
- prefer_single_quotes
''',
);
- var result = p.runSync('fix', ['--dry-run', '.'], workingDir: p.dirPath);
+ var result = p.runSync(['fix', '--dry-run', '.'], workingDir: p.dirPath);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(
@@ -76,7 +76,7 @@
- prefer_single_quotes
''',
);
- var result = p.runSync('fix', ['.'], workingDir: p.dirPath);
+ var result = p.runSync(['fix', '.'], workingDir: p.dirPath);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Fixed 1 file.'));
@@ -96,7 +96,7 @@
- prefer_single_quotes
''',
);
- var result = p.runSync('fix', ['.'], workingDir: p.dirPath);
+ var result = p.runSync(['fix', '.'], workingDir: p.dirPath);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Nothing to fix!'));
@@ -114,7 +114,7 @@
- prefer_single_quotes
''',
);
- var result = p.runSync('fix', ['.'], workingDir: p.dirPath);
+ var result = p.runSync(['fix', '.'], workingDir: p.dirPath);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Nothing to fix!'));
diff --git a/pkg/dartdev/test/commands/flag_test.dart b/pkg/dartdev/test/commands/flag_test.dart
index 6416ffc..0475ee3 100644
--- a/pkg/dartdev/test/commands/flag_test.dart
+++ b/pkg/dartdev/test/commands/flag_test.dart
@@ -6,7 +6,6 @@
import 'package:args/command_runner.dart';
import 'package:dartdev/dartdev.dart';
-import 'package:dartdev/src/analytics.dart' show disabledAnalytics;
import 'package:test/test.dart';
import '../utils.dart';
@@ -20,7 +19,7 @@
// For each command description, assert that the values are not empty, don't
// have trailing white space and end with a period.
test('description formatting', () {
- DartdevRunner(['--disable-dartdev-analytics'], disabledAnalytics)
+ DartdevRunner(['--no-analytics'])
.commands
.forEach((String commandKey, Command command) {
expect(commandKey, isNotEmpty);
@@ -32,7 +31,7 @@
// Assert that all found usageLineLengths are the same and null
test('argParser usageLineLength', () {
- DartdevRunner(['--disable-dartdev-analytics'], disabledAnalytics)
+ DartdevRunner(['--no-analytics'])
.commands
.forEach((String commandKey, Command command) {
if (command.argParser != null) {
@@ -62,7 +61,7 @@
test('--help', () {
p = project();
- var result = p.runSync('--help', []);
+ var result = p.runSync(['--help']);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -80,7 +79,7 @@
test('--help --verbose', () {
p = project();
- var result = p.runSync('--help', ['--verbose']);
+ var result = p.runSync(['--help', '--verbose']);
expect(result.exitCode, 0);
expect(result.stdout, isEmpty);
@@ -90,7 +89,7 @@
test('--help -v', () {
p = project();
- var result = p.runSync('--help', ['-v']);
+ var result = p.runSync(['--help', '-v']);
expect(result.exitCode, 0);
expect(result.stdout, isEmpty);
@@ -100,7 +99,7 @@
test('help', () {
p = project();
- var result = p.runSync('help', []);
+ var result = p.runSync(['help']);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -118,7 +117,7 @@
test('help --verbose', () {
p = project();
- var result = p.runSync('help', ['--verbose']);
+ var result = p.runSync(['help', '--verbose']);
expect(result.exitCode, 0);
expect(result.stdout, contains('migrate '));
@@ -126,7 +125,7 @@
test('help -v', () {
p = project();
- var result = p.runSync('help', ['-v']);
+ var result = p.runSync(['help', '-v']);
expect(result.exitCode, 0);
expect(result.stdout, contains('migrate '));
diff --git a/pkg/dartdev/test/commands/format_test.dart b/pkg/dartdev/test/commands/format_test.dart
index cded95b..6f36795 100644
--- a/pkg/dartdev/test/commands/format_test.dart
+++ b/pkg/dartdev/test/commands/format_test.dart
@@ -19,7 +19,7 @@
test('--help', () {
p = project();
- var result = p.runSync('format', ['--help']);
+ var result = p.runSync(['format', '--help']);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Idiomatically format Dart source code.'));
@@ -32,7 +32,7 @@
test('--help --verbose', () {
p = project();
- var result = p.runSync('format', ['--help', '--verbose']);
+ var result = p.runSync(['format', '--help', '--verbose']);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Idiomatically format Dart source code.'));
@@ -45,7 +45,7 @@
test('unchanged', () {
p = project(mainSrc: 'int get foo => 1;\n');
- ProcessResult result = p.runSync('format', [p.relativeFilePath]);
+ ProcessResult result = p.runSync(['format', p.relativeFilePath]);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, startsWith('Formatted 1 file (0 changed) in '));
@@ -53,7 +53,7 @@
test('formatted', () {
p = project(mainSrc: 'int get foo => 1;\n');
- ProcessResult result = p.runSync('format', [p.relativeFilePath]);
+ ProcessResult result = p.runSync(['format', p.relativeFilePath]);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(
@@ -65,7 +65,7 @@
test('unknown file', () {
p = project(mainSrc: 'int get foo => 1;\n');
var unknownFilePath = '${p.relativeFilePath}-unknown-file.dart';
- ProcessResult result = p.runSync('format', [unknownFilePath]);
+ ProcessResult result = p.runSync(['format', unknownFilePath]);
expect(result.exitCode, 0);
expect(result.stderr,
startsWith('No file or directory found at "$unknownFilePath".'));
diff --git a/pkg/dartdev/test/commands/help_test.dart b/pkg/dartdev/test/commands/help_test.dart
index c272e43..afbaf09 100644
--- a/pkg/dartdev/test/commands/help_test.dart
+++ b/pkg/dartdev/test/commands/help_test.dart
@@ -4,7 +4,6 @@
import 'package:args/command_runner.dart';
import 'package:dartdev/dartdev.dart';
-import 'package:dartdev/src/analytics.dart' show disabledAnalytics;
import 'package:test/test.dart';
import '../utils.dart';
@@ -22,14 +21,14 @@
List<String> _commandsNotTested = <String>[
'help', // `dart help help` is redundant
];
- DartdevRunner(['--disable-dartdev-analytics'], disabledAnalytics)
+ DartdevRunner(['--no-analytics'])
.commands
.forEach((String commandKey, Command command) {
if (!_commandsNotTested.contains(commandKey)) {
test('(help $commandKey == $commandKey --help)', () {
p = project();
- var result = p.runSync('help', [commandKey]);
- var verbHelpResult = p.runSync(commandKey, ['--help']);
+ var result = p.runSync(['help', commandKey]);
+ var verbHelpResult = p.runSync([commandKey, '--help']);
expect(result.stdout, contains(verbHelpResult.stdout));
expect(result.stderr, contains(verbHelpResult.stderr));
@@ -39,15 +38,15 @@
test('(help pub == pub --help)', () {
p = project();
- var result = p.runSync('help', ['pub']);
- var pubHelpResult = p.runSync('pub', ['--help']);
+ var result = p.runSync(['help', 'pub']);
+ var pubHelpResult = p.runSync(['pub', '--help']);
expect(result.stdout, contains(pubHelpResult.stdout));
expect(result.stderr, contains(pubHelpResult.stderr));
});
test('(--help flags also have -h abbr)', () {
- DartdevRunner(['--disable-dartdev-analytics'], disabledAnalytics)
+ DartdevRunner(['--no-analytics'])
.commands
.forEach((String commandKey, Command command) {
var helpOption = command.argParser.options['help'];
diff --git a/pkg/dartdev/test/commands/migrate_test.dart b/pkg/dartdev/test/commands/migrate_test.dart
index 8101640..681d550 100644
--- a/pkg/dartdev/test/commands/migrate_test.dart
+++ b/pkg/dartdev/test/commands/migrate_test.dart
@@ -21,7 +21,7 @@
test('--help', () {
p = project();
- var result = p.runSync('migrate', ['--help']);
+ var result = p.runSync(['migrate', '--help']);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
@@ -34,7 +34,7 @@
test('directory implicit', () {
p = project(mainSrc: dartVersionFilePrefix2_9 + 'int get foo => 1;\n');
var result =
- p.runSync('migrate', ['--no-web-preview'], workingDir: p.dirPath);
+ p.runSync(['migrate', '--no-web-preview'], workingDir: p.dirPath);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Generating migration suggestions'));
@@ -42,7 +42,7 @@
test('directory explicit', () {
p = project(mainSrc: dartVersionFilePrefix2_9 + 'int get foo => 1;\n');
- var result = p.runSync('migrate', ['--no-web-preview', p.dirPath]);
+ var result = p.runSync(['migrate', '--no-web-preview', p.dirPath]);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('Generating migration suggestions'));
@@ -50,7 +50,7 @@
test('bad directory', () {
p = project(mainSrc: 'int get foo => 1;\n');
- var result = p.runSync('migrate', ['foo_bar_dir']);
+ var result = p.runSync(['migrate', 'foo_bar_dir']);
expect(result.exitCode, 1);
expect(result.stderr, contains('foo_bar_dir does not exist'));
expect(result.stdout, isEmpty);
@@ -58,7 +58,7 @@
test('pub get needs running', () {
p = project(mainSrc: 'import "package:foo/foo.dart";\n');
- var result = p.runSync('migrate', [p.dirPath]);
+ var result = p.runSync(['migrate', p.dirPath]);
expect(result.exitCode, 1);
expect(result.stderr, isEmpty);
expect(result.stdout, runPubGet);
@@ -67,7 +67,7 @@
test('non-pub-related error', () {
p = project(mainSrc: 'var missing = "semicolon"\n');
- var result = p.runSync('migrate', [p.dirPath]);
+ var result = p.runSync(['migrate', p.dirPath]);
expect(result.exitCode, 1);
expect(result.stderr, isEmpty);
expect(result.stdout, runPubGet);
diff --git a/pkg/dartdev/test/commands/pub_test.dart b/pkg/dartdev/test/commands/pub_test.dart
index 82f00d0..e164858 100644
--- a/pkg/dartdev/test/commands/pub_test.dart
+++ b/pkg/dartdev/test/commands/pub_test.dart
@@ -26,7 +26,7 @@
}
test('implicit --help', () {
- final result = project().runSync('pub', []);
+ final result = project().runSync(['pub']);
expect(result, isNotNull);
expect(result.exitCode, 64);
expect(result.stderr, contains('Missing subcommand for "dart pub".'));
@@ -35,17 +35,17 @@
});
test('--help', () {
- _assertPubHelpInvoked(project().runSync('pub', ['--help']));
+ _assertPubHelpInvoked(project().runSync(['pub', '--help']));
});
test('-h', () {
- _assertPubHelpInvoked(project().runSync('pub', ['-h']));
+ _assertPubHelpInvoked(project().runSync(['pub', '-h']));
});
test('help cache', () {
p = project();
- var result = p.runSync('help', ['pub', 'cache']);
- var result2 = p.runSync('pub', ['cache', '--help']);
+ var result = p.runSync(['help', 'pub', 'cache']);
+ var result2 = p.runSync(['pub', 'cache', '--help']);
expect(result.exitCode, 0);
@@ -58,8 +58,8 @@
test('help publish', () {
p = project();
- var result = p.runSync('help', ['pub', 'publish']);
- var result2 = p.runSync('pub', ['publish', '--help']);
+ var result = p.runSync(['help', 'pub', 'publish']);
+ var result2 = p.runSync(['pub', 'publish', '--help']);
expect(result.exitCode, 0);
@@ -77,10 +77,10 @@
"void main() { int? a; a = null; print('a is \$a.'); }");
// run 'pub get'
- p.runSync('pub', ['get']);
+ p.runSync(['pub', 'get']);
var result = p.runSync(
- 'pub', ['run', '--enable-experiment=no-non-nullable', 'main.dart']);
+ ['pub', 'run', '--enable-experiment=no-non-nullable', 'main.dart']);
expect(result.exitCode, 254);
expect(result.stdout, isEmpty);
@@ -93,7 +93,7 @@
test('failure', () {
p = project(mainSrc: 'int get foo => 1;\n');
- var result = p.runSync('pub', ['deps']);
+ var result = p.runSync(['pub', 'deps']);
expect(result.exitCode, 65);
expect(result.stdout, isEmpty);
expect(result.stderr, contains('No pubspec.lock file found'));
@@ -101,7 +101,7 @@
test('failure unknown option', () {
p = project(mainSrc: 'int get foo => 1;\n');
- var result = p.runSync('pub', ['deps', '--foo']);
+ var result = p.runSync(['pub', 'deps', '--foo']);
expect(result.exitCode, 64);
expect(result.stdout, isEmpty);
expect(result.stderr, startsWith('Could not find an option named "foo".'));
diff --git a/pkg/dartdev/test/commands/run_test.dart b/pkg/dartdev/test/commands/run_test.dart
index e1b441e..9fd83e5 100644
--- a/pkg/dartdev/test/commands/run_test.dart
+++ b/pkg/dartdev/test/commands/run_test.dart
@@ -20,7 +20,7 @@
test('--help', () {
p = project();
- var result = p.runSync('run', ['--help']);
+ var result = p.runSync(['run', '--help']);
expect(result.stdout, contains('Run a Dart program.'));
expect(result.stdout, contains('Debugging options:'));
@@ -30,7 +30,7 @@
test("'Hello World'", () {
p = project(mainSrc: "void main() { print('Hello World'); }");
- ProcessResult result = p.runSync('run', [p.relativeFilePath]);
+ ProcessResult result = p.runSync(['run', p.relativeFilePath]);
expect(result.stdout, contains('Hello World'));
expect(result.stderr, isEmpty);
@@ -40,7 +40,7 @@
test('no such file', () {
p = project(mainSrc: "void main() { print('Hello World'); }");
ProcessResult result =
- p.runSync('run', ['no/such/file/${p.relativeFilePath}']);
+ p.runSync(['run', 'no/such/file/${p.relativeFilePath}']);
expect(result.stderr, isNotEmpty);
expect(result.exitCode, isNot(0));
@@ -51,7 +51,7 @@
// name (package name) will be the name of the temporary directory on disk
p = project(mainSrc: "void main() { print('Hello World'); }");
p.file('bin/main.dart', "void main() { print('Hello main.dart'); }");
- ProcessResult result = p.runSync('run', []);
+ ProcessResult result = p.runSync(['run']);
expect(result.stdout, contains('Hello main.dart'));
expect(result.stderr, isEmpty);
@@ -62,20 +62,21 @@
test('missing implicit packageName.dart', () {
p = project(mainSrc: "void main() { print('Hello World'); }");
p.file('bin/foo.dart', "void main() { print('Hello main.dart'); }");
- ProcessResult result = p.runSync('run', []);
+ ProcessResult result = p.runSync(['run']);
expect(result.stdout, isEmpty);
expect(
result.stderr,
- contains(
- 'Could not find `bin/dartdev_temp.dart` in package `dartdev_temp`.'));
+ contains('Could not find `bin${path.separator}dartdev_temp.dart` in '
+ 'package `dartdev_temp`.'));
expect(result.exitCode, 255);
});
test('arguments are properly passed', () {
p = project();
p.file('main.dart', 'void main(args) { print(args); }');
- ProcessResult result = p.runSync('run', [
+ ProcessResult result = p.runSync([
+ 'run',
'--enable-experiment=triple-shift',
'main.dart',
'argument1',
@@ -93,7 +94,8 @@
p.file('main.dart', 'void main(args) { print(args); }');
// Test with absolute path
final name = path.join(p.dirPath, 'main.dart');
- final result = p.runSync('run', [
+ final result = p.runSync([
+ 'run',
'--enable-experiment=triple-shift',
name,
'--argument1',
@@ -111,7 +113,8 @@
p.file('main.dart', 'void main(args) { print(args); }');
// Test with File uri
final name = path.join(p.dirPath, 'main.dart');
- final result = p.runSync('run', [
+ final result = p.runSync([
+ 'run',
Uri.file(name).toString(),
'--argument1',
'argument2',
@@ -134,7 +137,8 @@
//
// This test ensures that allowed arguments for dart run which are valid VM
// arguments are properly handled by the VM.
- ProcessResult result = p.runSync('run', [
+ ProcessResult result = p.runSync([
+ 'run',
'--observe',
'--pause-isolates-on-start',
// This should negate the above flag.
@@ -153,7 +157,8 @@
expect(result.exitCode, 0);
// Again, with --disable-service-auth-codes.
- result = p.runSync('run', [
+ result = p.runSync([
+ 'run',
'--observe',
'--pause-isolates-on-start',
// This should negate the above flag.
@@ -178,7 +183,8 @@
// Any VM flags not listed under 'dart run help --verbose' should be passed
// before a dartdev command.
- ProcessResult result = p.runSync('run', [
+ ProcessResult result = p.runSync([
+ 'run',
'--vm-name=foo',
p.relativeFilePath,
]);
@@ -196,7 +202,8 @@
// Any VM flags not listed under 'dart run help --verbose' should be passed
// before a dartdev command.
- ProcessResult result = p.runSync('run', [
+ ProcessResult result = p.runSync([
+ 'run',
'--verbose_gc',
p.relativeFilePath,
]);
@@ -214,7 +221,8 @@
// Ensure --enable-asserts doesn't cause the dartdev isolate to fail to
// load. Regression test for: https://github.com/dart-lang/sdk/issues/42831
- ProcessResult result = p.runSync('run', [
+ ProcessResult result = p.runSync([
+ 'run',
'--enable-asserts',
p.relativeFilePath,
]);
@@ -228,7 +236,8 @@
p = project(mainSrc: 'void main() { assert(false); }');
// Any VM flags passed after the script shouldn't be interpreted by the VM.
- ProcessResult result = p.runSync('run', [
+ ProcessResult result = p.runSync([
+ 'run',
p.relativeFilePath,
'--enable-asserts',
]);
diff --git a/pkg/dartdev/test/commands/test_test.dart b/pkg/dartdev/test/commands/test_test.dart
index ff85982..00be2bc 100644
--- a/pkg/dartdev/test/commands/test_test.dart
+++ b/pkg/dartdev/test/commands/test_test.dart
@@ -21,7 +21,7 @@
test('--help', () {
p = project();
- final result = p.runSync('test', ['--help']);
+ final result = p.runSync(['test', '--help']);
expect(result.exitCode, 0);
expect(result.stdout, contains(' tests in this package'));
@@ -31,7 +31,7 @@
test('dart help test', () {
p = project();
- final result = p.runSync('help', ['test']);
+ final result = p.runSync(['help', 'test']);
expect(result.exitCode, 0);
expect(result.stdout, contains(' tests in this package'));
@@ -43,7 +43,7 @@
var pubspec = File(path.join(p.dirPath, 'pubspec.yaml'));
pubspec.deleteSync();
- var result = p.runSync('test', []);
+ var result = p.runSync(['test']);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('No pubspec.yaml file found'));
@@ -63,7 +63,7 @@
''');
// An implicit `pub get` will happen.
- final result = p.runSync('test', ['--no-color', '--reporter', 'expanded']);
+ final result = p.runSync(['test', '--no-color', '--reporter', 'expanded']);
expect(result.stderr, isEmpty);
expect(result.stdout, contains('All tests passed!'));
expect(result.exitCode, 0);
@@ -86,7 +86,8 @@
}
''');
- final result = p.runSync('test', []);
+ final result = p.runSync(['test']);
+ expect(result.exitCode, 65);
expect(
result.stdout,
contains('You need to add a dependency on package:test'),
@@ -94,10 +95,10 @@
expect(result.stderr, isEmpty);
expect(result.exitCode, 65);
- final resultPubAdd = p.runSync('pub', ['add', 'test']);
+ final resultPubAdd = p.runSync(['pub', 'add', 'test']);
expect(resultPubAdd.exitCode, 0);
- final result2 = p.runSync('test', ['--no-color', '--reporter', 'expanded']);
+ final result2 = p.runSync(['test', '--no-color', '--reporter', 'expanded']);
expect(result2.stderr, isEmpty);
expect(result2.stdout, contains('All tests passed!'));
expect(result2.exitCode, 0);
@@ -117,7 +118,7 @@
}
''');
- final result = p.runSync('test', ['--no-color', '--reporter', 'expanded']);
+ final result = p.runSync(['test', '--no-color', '--reporter', 'expanded']);
expect(result.exitCode, 0);
expect(result.stdout, contains('All tests passed!'));
expect(result.stderr, isEmpty);
@@ -138,8 +139,13 @@
''');
final result = p.runSync(
- '--enable-experiment=non-nullable',
- ['test', '--no-color', '--reporter', 'expanded'],
+ [
+ '--enable-experiment=non-nullable',
+ 'test',
+ '--no-color',
+ '--reporter',
+ 'expanded',
+ ],
);
expect(result.exitCode, 1);
});
diff --git a/pkg/dartdev/test/utils.dart b/pkg/dartdev/test/utils.dart
index bbc46df..08910be 100644
--- a/pkg/dartdev/test/utils.dart
+++ b/pkg/dartdev/test/utils.dart
@@ -71,16 +71,14 @@
}
ProcessResult runSync(
- String command,
List<String> args, {
String workingDir,
}) {
var arguments = [
- command,
+ '--no-analytics',
...?args,
];
- arguments.add('--disable-dartdev-analytics');
return Process.runSync(Platform.resolvedExecutable, arguments,
workingDirectory: workingDir ?? dir.path,
environment: {if (logAnalytics) '_DARTDEV_LOG_ANALYTICS': 'true'});
diff --git a/pkg/dartdev/test/utils_test.dart b/pkg/dartdev/test/utils_test.dart
index 9740dd1..199d461 100644
--- a/pkg/dartdev/test/utils_test.dart
+++ b/pkg/dartdev/test/utils_test.dart
@@ -100,39 +100,6 @@
expect(File('bar.bart').name, 'bar.bart');
});
});
-
- group('PubUtils', () {
- test('doModifyArgs', () {
- const allCmds = ['analyze', 'help', 'pub', 'migrate'];
- expect(PubUtils.shouldModifyArgs(null, null), isFalse);
- expect(PubUtils.shouldModifyArgs([], null), isFalse);
- expect(PubUtils.shouldModifyArgs(null, []), isFalse);
- expect(PubUtils.shouldModifyArgs([], []), isFalse);
- expect(PubUtils.shouldModifyArgs(['-h'], allCmds), isFalse);
- expect(PubUtils.shouldModifyArgs(['--help'], allCmds), isFalse);
- expect(PubUtils.shouldModifyArgs(['help'], allCmds), isFalse);
- expect(PubUtils.shouldModifyArgs(['pub'], allCmds), isFalse);
- expect(PubUtils.shouldModifyArgs(['analyze', 'help', 'pub'], allCmds),
- isFalse);
-
- expect(PubUtils.shouldModifyArgs(['--some-flag', 'help', 'pub'], allCmds),
- isTrue);
- expect(PubUtils.shouldModifyArgs(['help', 'pub'], allCmds), isTrue);
- expect(PubUtils.shouldModifyArgs(['help', 'pub', 'publish'], allCmds),
- isTrue);
- expect(PubUtils.shouldModifyArgs(['help', 'pub', 'analyze'], allCmds),
- isTrue);
- });
-
- test('modifyArgs', () {
- expect(PubUtils.modifyArgs(['--some-flag', 'help', 'pub']),
- orderedEquals(['--some-flag', 'pub', '--help']));
- expect(PubUtils.modifyArgs(['help', 'pub']),
- orderedEquals(['pub', '--help']));
- expect(PubUtils.modifyArgs(['help', 'pub', 'publish']),
- orderedEquals(['pub', 'publish', '--help']));
- });
- });
}
const String _packageData = '''{
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 6391890..6b93319 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -114,7 +114,6 @@
build_integration/test/*: SkipByDesign # Only meant to run on vm, most use dart:mirrors and dart:io
compiler/tool/*: SkipByDesign # Only meant to run on vm
dartdev/test/*: SkipByDesign # Only meant to run on vm
-dartfix/test/*: SkipByDesign # Only meant to run on vm
front_end/test/*: SkipByDesign # Only meant to run on vm, most use dart:mirrors and dart:io
front_end/tool/*: SkipByDesign # Only meant to run on vm
modular_test/test/memory_pipeline_test: Slow, Pass
diff --git a/runtime/bin/main_options.cc b/runtime/bin/main_options.cc
index 452346f..dedd3bc 100644
--- a/runtime/bin/main_options.cc
+++ b/runtime/bin/main_options.cc
@@ -387,6 +387,7 @@
bool enable_dartdev_analytics = false;
bool disable_dartdev_analytics = false;
+ bool no_dartdev_analytics = false;
// Parse out the vm options.
while (i < argc) {
@@ -405,12 +406,14 @@
const char* kVerboseDebug1 = "--verbose_debug";
const char* kVerboseDebug2 = "--verbose-debug";
- // The following two flags are processed as DartDev flags and are not to
+ // The following flags are processed as DartDev flags and are not to
// be treated as if they are VM flags.
const char* kEnableDartDevAnalytics1 = "--enable-analytics";
const char* kEnableDartDevAnalytics2 = "--enable_analytics";
const char* kDisableDartDevAnalytics1 = "--disable-analytics";
const char* kDisableDartDevAnalytics2 = "--disable_analytics";
+ const char* kNoDartDevAnalytics1 = "--no-analytics";
+ const char* kNoDartDevAnalytics2 = "--no_analytics";
if ((strncmp(argv[i], kPrintFlags1, strlen(kPrintFlags1)) == 0) ||
(strncmp(argv[i], kPrintFlags2, strlen(kPrintFlags2)) == 0)) {
@@ -426,6 +429,12 @@
strlen(kEnableDartDevAnalytics2)) == 0)) {
enable_dartdev_analytics = true;
skipVmOption = true;
+ } else if ((strncmp(argv[i], kNoDartDevAnalytics1,
+ strlen(kNoDartDevAnalytics1)) == 0) ||
+ (strncmp(argv[i], kNoDartDevAnalytics2,
+ strlen(kNoDartDevAnalytics2)) == 0)) {
+ no_dartdev_analytics = true;
+ skipVmOption = true;
} else if ((strncmp(argv[i], kDisableDartDevAnalytics1,
strlen(kDisableDartDevAnalytics1)) == 0) ||
(strncmp(argv[i], kDisableDartDevAnalytics2,
@@ -518,6 +527,9 @@
if (disable_dartdev_analytics) {
dart_options->AddArgument("--disable-analytics");
}
+ if (no_dartdev_analytics) {
+ dart_options->AddArgument("--no-analytics");
+ }
return 0;
}
diff --git a/sdk/bin/dartfix b/sdk/bin/dartfix
deleted file mode 100755
index bbeb80d..0000000
--- a/sdk/bin/dartfix
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-# 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.
-
-# Run dartfix.dart on the Dart VM. This script assumes the Dart SDK's
-# directory structure.
-
-function follow_links() {
- file="$1"
- while [ -h "$file" ]; do
- # On Mac OS, readlink -f doesn't work.
- file="$(readlink "$file")"
- done
- echo "$file"
-}
-
-# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
-PROG_NAME="$(follow_links "$BASH_SOURCE")"
-
-# Handle the case where dart-sdk/bin has been symlinked to.
-BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
-
-SNAPSHOT="$BIN_DIR/snapshots/dartfix.dart.snapshot"
-
-# We are running the snapshot in the built SDK.
-DART="$BIN_DIR/dart"
-exec "$DART" "$SNAPSHOT" "$@"
diff --git a/sdk/bin/dartfix.bat b/sdk/bin/dartfix.bat
deleted file mode 100644
index b58475c..0000000
--- a/sdk/bin/dartfix.bat
+++ /dev/null
@@ -1,44 +0,0 @@
-@echo off
-REM Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-REM for details. All rights reserved. Use of this source code is governed by a
-REM BSD-style license that can be found in the LICENSE file.
-
-setlocal
-rem Handle the case where dart-sdk/bin has been symlinked to.
-set DIR_NAME_WITH_SLASH=%~dp0
-set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
-call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
-rem Get rid of surrounding quotes.
-for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
-
-set DART=%BIN_DIR%\dart
-set SNAPSHOT=%BIN_DIR%\snapshots\dartfix.dart.snapshot
-
-"%DART%" "%SNAPSHOT%" %*
-
-endlocal
-
-exit /b %errorlevel%
-
-rem Follow the symbolic links (junctions points) using `dir to determine the
-rem canonical path. Output with a link looks something like this
-rem
-rem 01/03/2013 10:11 PM <JUNCTION> abc def
-rem [c:\dart_bleeding\dart-repo.9\dart\out\ReleaseIA32\dart-sdk]
-rem
-rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename
-rem surrounded by right angle bracket and left square bracket. Once we get
-rem the filename, which is name of the link, we recursively follow that.
-:follow_links
-setlocal
-for %%i in (%1) do set result=%%~fi
-set current=
-for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
- ^| %SystemRoot%\System32\find.exe "> %~n1 [" 2^>nul`) do (
- set current=%%i
-)
-if not "%current%"=="" call :follow_links "%current%", result
-endlocal & set %~2=%result%
-goto :eof
-
-:end
diff --git a/tests/standalone/io/test_extension_fail_test.dart b/tests/standalone/io/test_extension_fail_test.dart
index dae4411..e4acc61 100644
--- a/tests/standalone/io/test_extension_fail_test.dart
+++ b/tests/standalone/io/test_extension_fail_test.dart
@@ -4,6 +4,9 @@
//
// Dart test program for testing native extensions.
+// OtherResources=test_extension_fail_tester.dart
+// OtherResources=test_relative_extension_fail_tester.dart
+
import "package:path/path.dart";
import "dart:async";
import "dart:io";
diff --git a/tests/standalone_2/io/test_extension_fail_test.dart b/tests/standalone_2/io/test_extension_fail_test.dart
index dae4411..e4acc61 100644
--- a/tests/standalone_2/io/test_extension_fail_test.dart
+++ b/tests/standalone_2/io/test_extension_fail_test.dart
@@ -4,6 +4,9 @@
//
// Dart test program for testing native extensions.
+// OtherResources=test_extension_fail_tester.dart
+// OtherResources=test_relative_extension_fail_tester.dart
+
import "package:path/path.dart";
import "dart:async";
import "dart:io";
diff --git a/tools/VERSION b/tools/VERSION
index 3e78050..2193d6e 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 39
+PRERELEASE 40
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/build.py b/tools/build.py
index 6b78ddc..9062ef5 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -7,7 +7,6 @@
import argparse
import io
import json
-import multiprocessing
import os
import subprocess
import sys
@@ -193,18 +192,6 @@
return 0
-def RunOneGomaBuildCommand(options):
- (env, args) = options
- try:
- print(' '.join(args))
- process = subprocess.Popen(args, env=env, stdin=None)
- process.wait()
- print(' '.join(args) + " done.")
- return process.returncode
- except KeyboardInterrupt:
- return 1
-
-
def SanitizerEnvironmentVariables():
with io.open('tools/bots/test_matrix.json', encoding='utf-8') as fd:
config = json.loads(fd.read())
@@ -266,11 +253,22 @@
return 1
# Run goma builds in parallel.
- pool = multiprocessing.Pool(multiprocessing.cpu_count())
- results = pool.map(RunOneGomaBuildCommand, goma_builds, chunksize=1)
- for r in results:
- if r != 0:
- return 1
+ active_goma_builds = []
+ for (env, args) in goma_builds:
+ print(' '.join(args))
+ process = subprocess.Popen(args, env=env)
+ active_goma_builds.append([args, process])
+ while active_goma_builds:
+ time.sleep(0.1)
+ for goma_build in active_goma_builds:
+ (args, process) = goma_build
+ if process.poll() is not None:
+ print(' '.join(args) + " done.")
+ active_goma_builds.remove(goma_build)
+ if process.returncode != 0:
+ for (_, to_kill) in active_goma_builds:
+ to_kill.terminate()
+ return 1
endtime = time.time()
print("The build took %.3f seconds" % (endtime - starttime))
diff --git a/tools/gn.py b/tools/gn.py
index f4f5d7e..161c35a 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -4,7 +4,6 @@
# found in the LICENSE file.
import argparse
-import multiprocessing
import os
import shutil
import subprocess
@@ -471,12 +470,6 @@
def AddOtherArgs(parser):
"""Adds miscellaneous arguments to the parser."""
- parser.add_argument('--workers',
- '-w',
- type=int,
- help='Number of simultaneous GN invocations',
- dest='workers',
- default=multiprocessing.cpu_count())
parser.add_argument("-v",
"--verbose",
help='Verbose output.',
@@ -506,18 +499,6 @@
return options
-# Run the command, if it succeeds returns 0, if it fails, returns the commands
-# output as a string.
-def RunCommand(command):
- try:
- subprocess.check_output(
- command, cwd=DART_ROOT, stderr=subprocess.STDOUT)
- return 0
- except subprocess.CalledProcessError as e:
- return ("Command failed: " + ' '.join(command) + "\n" + "output: " +
- e.output)
-
-
def BuildGnCommand(args, mode, arch, target_os, sanitizer, out_dir):
gn = os.path.join(DART_ROOT, 'buildtools',
'gn.exe' if utils.IsWindows() else 'gn')
@@ -551,24 +532,43 @@
if args.verbose:
print("gn gen --check in %s" % out_dir)
- pool = multiprocessing.Pool(args.workers)
- results = pool.map(RunCommand, commands, chunksize=1)
- for r in results:
- if r != 0:
- print(r.strip())
+ active_commands = []
+
+ def cleanup(command):
+ print("Command failed: " + ' '.join(command))
+ for (_, process) in active_commands:
+ process.terminate()
+
+ for command in commands:
+ try:
+ process = subprocess.Popen(command, cwd=DART_ROOT)
+ active_commands.append([command, process])
+ except Exception as e:
+ print('Error: %s' % e)
+ cleanup(command)
return 1
+ while active_commands:
+ time.sleep(0.1)
+ for active_command in active_commands:
+ (command, process) = active_command
+ if process.poll() is not None:
+ active_commands.remove(active_command)
+ if process.returncode != 0:
+ cleanup(command)
+ return 1
+ return 0
def Main(argv):
starttime = time.time()
args = parse_args(argv)
- RunGnOnConfiguredConfigurations(args)
+ result = RunGnOnConfiguredConfigurations(args)
endtime = time.time()
if args.verbose:
print("GN Time: %.3f seconds" % (endtime - starttime))
- return 0
+ return result
if __name__ == '__main__':
diff --git a/utils/dartdev/BUILD.gn b/utils/dartdev/BUILD.gn
index 13885c3..02823ae 100644
--- a/utils/dartdev/BUILD.gn
+++ b/utils/dartdev/BUILD.gn
@@ -11,12 +11,6 @@
],
"list lines")
-dartfix_files = exec_script("../../tools/list_dart_files.py",
- [
- "absolute",
- rebase_path("../../pkg/dartfix"),
- ],
- "list lines")
group("dartdev") {
public_deps = [ ":copy_dartdev_kernel" ]
}
@@ -33,6 +27,6 @@
main_dart = "../../pkg/dartdev/bin/dartdev.dart"
training_args = []
deps = [ "../dds:dds" ]
- inputs = dartdev_files + dartfix_files
+ inputs = dartdev_files
output = "$root_gen_dir/dartdev.dill"
}
diff --git a/utils/dartfix/BUILD.gn b/utils/dartfix/BUILD.gn
deleted file mode 100644
index e804346..0000000
--- a/utils/dartfix/BUILD.gn
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-# 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.
-
-import("../application_snapshot.gni")
-
-application_snapshot("dartfix") {
- main_dart = "../../pkg/dartfix/bin/dartfix.dart"
- training_args = [ "--help" ]
-}