[dartdevc] fix debugger extension console, take 2
This change fixes the (internal) debugger console test so it passes. A few of the fixes did not make it into the previous CL (CL https://dart-review.googlesource.com/c/sdk/+/83140). Change-Id: I58df9024b96e73a13a5c13b801be237450cfe3cb Reviewed-on: https://dart-review.googlesource.com/c/83522 Auto-Submit: Jenny Messerly <jmesserly@google.com> Reviewed-by: Alan Knight <alanknight@google.com> Commit-Queue: Keerti Parthasarathy <keertip@google.com>
This commit is contained in:
@@ -149,9 +149,12 @@ class SharedCompilerOptions {
|
||||
: (outPaths as List<String>)
|
||||
.firstWhere((_) => true, orElse: () => null);
|
||||
|
||||
// TODO(jmesserly): fix the debugger console so it's not passing invalid
|
||||
// options.
|
||||
if (outPath == null) return null;
|
||||
if (moduleRoot != null) {
|
||||
// TODO(jmesserly): remove this legacy support after a deprecation period.
|
||||
// (Mainly this is to give time for migrating build rules.)
|
||||
// TODO(jmesserly): remove this legacy support after a deprecation
|
||||
// period. (Mainly this is to give time for migrating build rules.)
|
||||
moduleName =
|
||||
path.withoutExtension(path.relative(outPath, from: moduleRoot));
|
||||
} else {
|
||||
|
||||
@@ -285,13 +285,13 @@ class WebCompileCommand extends Command {
|
||||
}
|
||||
resources.newFile(fileName, sourceCode);
|
||||
|
||||
compilerOptions.moduleName = path.toUri(libraryName).toString();
|
||||
var name = path.toUri(libraryName).toString();
|
||||
compilerOptions.moduleName = name;
|
||||
JSModuleFile module =
|
||||
compileWithAnalyzer(driver, [fileName], options, compilerOptions);
|
||||
|
||||
var moduleCode = '';
|
||||
if (module.isValid) {
|
||||
var name = compilerOptions.moduleName;
|
||||
moduleCode =
|
||||
module.getCode(ModuleFormat.legacyConcat, name, name + '.map').code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user