Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/lib/src/entrypoint.dart

Issue 74013007: Hook up dependency overrides to the rest of pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/package.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/entrypoint.dart
diff --git a/sdk/lib/_internal/pub/lib/src/entrypoint.dart b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
index e9e513fa5cee72e9da235ee93ec3444ed369335f..b4ef32b8fe15cec78ce0a290410b824c83bcf1f9 100644
--- a/sdk/lib/_internal/pub/lib/src/entrypoint.dart
+++ b/sdk/lib/_internal/pub/lib/src/entrypoint.dart
@@ -143,6 +143,16 @@ class Entrypoint {
return new Future.sync(() {
if (!result.succeeded) throw result.error;
+ // Warn the user if any overrides were in effect.
+ if (result.overrides.isNotEmpty) {
+ var buffer = new StringBuffer();
+ buffer.write("Warning: You are overriding these dependencies:");
+ for (var override in result.overrides) {
+ buffer.write("\n- $override");
+ }
+ log.warning(buffer);
+ }
+
cleanDir(packagesDir);
return Future.wait(result.packages.map((id) {
if (id.isRoot) return new Future.value(id);
@@ -196,7 +206,7 @@ class Entrypoint {
/// pubspec.
Future ensureLockFileIsUpToDate() {
return new Future.sync(() {
- if (isLockFileUpToDate()) return;
+ if (isLockFileUpToDate()) return null;
if (lockFileExists) {
log.message(
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/package.dart » ('j') | no next file with comments »

Powered by Google App Engine