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

Unified Diff: pkg/dev_compiler/lib/src/compiler/command.dart

Issue 2955513002: Dynamically load packages for dartdevc tests in test.dart. (Closed)
Patch Set: Remove TODO that's TODONE. Created 3 years, 6 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/dev_compiler/lib/src/analyzer/context.dart ('k') | pkg/dev_compiler/lib/src/compiler/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/command.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/command.dart b/pkg/dev_compiler/lib/src/compiler/command.dart
index af34e95f711c3490304d9cd70cff1f4cfdcaa5f6..dfce39705c426951ebaa9a5bf0e1d53685a5c4fa 100644
--- a/pkg/dev_compiler/lib/src/compiler/command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/command.dart
@@ -180,8 +180,12 @@ void _compile(ArgResults argResults, AnalyzerOptions analyzerOptions,
modulePath = path.basenameWithoutExtension(firstOutPath);
}
- var unit = new BuildUnit(modulePath, libraryRoot, argResults.rest,
- (source) => _moduleForLibrary(moduleRoot, source, compilerOpts));
+ var unit = new BuildUnit(
+ modulePath,
+ libraryRoot,
+ argResults.rest,
+ (source) =>
+ _moduleForLibrary(moduleRoot, source, analyzerOptions, compilerOpts));
var module = compiler.compile(unit, compilerOpts);
module.errors.forEach(printFn);
@@ -217,10 +221,15 @@ void _compile(ArgResults argResults, AnalyzerOptions analyzerOptions,
}
}
-String _moduleForLibrary(
- String moduleRoot, Source source, CompilerOptions compilerOpts) {
+String _moduleForLibrary(String moduleRoot, Source source,
+ AnalyzerOptions analyzerOptions, CompilerOptions compilerOpts) {
if (source is InSummarySource) {
var summaryPath = source.summaryPath;
+
+ if (analyzerOptions.customSummaryModules.containsKey(summaryPath)) {
+ return analyzerOptions.customSummaryModules[summaryPath];
+ }
+
var ext = '.${compilerOpts.summaryExtension}';
if (path.isWithin(moduleRoot, summaryPath) && summaryPath.endsWith(ext)) {
var buildUnitPath =
« no previous file with comments | « pkg/dev_compiler/lib/src/analyzer/context.dart ('k') | pkg/dev_compiler/lib/src/compiler/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698