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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/validator/compiled_dartdoc.dart

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
Index: sdk/lib/_internal/pub_generated/lib/src/validator/compiled_dartdoc.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/validator/compiled_dartdoc.dart b/sdk/lib/_internal/pub_generated/lib/src/validator/compiled_dartdoc.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3dc88b4a0e3702c89c274a05b0704439601e878b
--- /dev/null
+++ b/sdk/lib/_internal/pub_generated/lib/src/validator/compiled_dartdoc.dart
@@ -0,0 +1,29 @@
+library pub.validator.compiled_dartdoc;
+import 'dart:async';
+import 'package:path/path.dart' as path;
+import '../entrypoint.dart';
+import '../io.dart';
+import '../utils.dart';
+import '../validator.dart';
+class CompiledDartdocValidator extends Validator {
+ CompiledDartdocValidator(Entrypoint entrypoint) : super(entrypoint);
+ Future validate() {
+ return syncFuture(() {
+ for (var entry in entrypoint.root.listFiles()) {
+ if (path.basename(entry) != "nav.json") continue;
+ var dir = path.dirname(entry);
+ var files = [
+ entry,
+ path.join(dir, "index.html"),
+ path.join(dir, "styles.css"),
+ path.join(dir, "dart-logo-small.png"),
+ path.join(dir, "client-live-nav.js")];
+ if (files.every((val) => fileExists(val))) {
+ warnings.add(
+ "Avoid putting generated documentation in " "${path.relative(dir)}.\n"
+ "Generated documentation bloats the package with redundant " "data.");
+ }
+ }
+ });
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698