Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: pkg/compiler/lib/src/dart2js.dart

Issue 1401513002: Revert "Introduce the "Embedded" category." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/samples/darttags/darttags.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index fa7aeb734416f54622013c9333148631401373e8..bc511e44b00d580dbc1c9953cf09a0022737466c 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -19,6 +19,7 @@ import 'filenames.dart';
import 'util/uri_extras.dart';
import 'util/util.dart' show stackTraceFilePrefix;
import 'util/command_line.dart';
+import 'package:sdk_library_metadata/libraries.dart';
import 'package:package_config/discovery.dart' show findPackages;
const String LIBRARY_ROOT = '../../../../../sdk';
@@ -245,13 +246,21 @@ Future<api.CompilationResult> compile(List<String> argv) {
setCategories(String argument) {
List<String> categories = extractParameter(argument).split(',');
+ Set<String> allowedCategories =
+ LIBRARIES.values.map((x) => x.category).toSet();
+ allowedCategories.remove('Shared');
+ allowedCategories.remove('Internal');
+ List<String> allowedCategoriesList =
+ new List<String>.from(allowedCategories);
+ allowedCategoriesList.sort();
if (categories.contains('all')) {
- categories = ["Client", "Server"];
+ categories = allowedCategoriesList;
} else {
+ String allowedCategoriesString = allowedCategoriesList.join(', ');
for (String category in categories) {
- if (!["Client", "Server"].contains(category)) {
+ if (!allowedCategories.contains(category)) {
fail('Unsupported library category "$category", '
- 'supported categories are: Client, Server, all');
+ 'supported categories are: $allowedCategoriesString');
}
}
}
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/samples/darttags/darttags.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698