Skip to content

Commit c9d881e

Browse files
nshahanCommit Queue
authored andcommitted
[frontend_server] Avoid passing package config
to DDC when the front end server was started with the `--debugger-module-names` flag. Followup to https://dart-review.googlesource.com/c/sdk/+/456500 It appears the flag is entirely unused in our supported environments. There are tests for it so this change preserves the previous behavior in the tests until I can confirm there are no real usages. See: https://github.com/dart-lang/webdev/blob/382ff428a8bc2e32830aa9d763b1887759435ed6/dwds/test/frontend_server_circular_evaluate_test.dart#L34 Change-Id: I25688e8b0d7d69779f2d58466a0c9d076a670b61 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459661 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
1 parent f355c03 commit c9d881e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

pkg/front_end/test/spell_checking_list_common.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,6 +2827,7 @@ serialized
28272827
serializes
28282828
serializing
28292829
serious
2830+
served
28302831
set
28312832
sets
28322833
setter

pkg/frontend_server/lib/frontend_server.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ ArgParser argParser = new ArgParser(allowTrailingOptions: true)
214214
..addOption('libraries-spec',
215215
help: 'A path or uri to the libraries specification JSON file')
216216
..addFlag('debugger-module-names',
217-
help: 'Use debugger-friendly modules names', defaultsTo: false)
217+
help: "Use debugger-friendly modules names that assume the 'lib/' "
218+
"directories of packages are present in the served directory "
219+
"structure at runtime.",
220+
defaultsTo: false)
218221
..addFlag('experimental-emit-debug-metadata',
219222
help: 'Emit module and library metadata for the debugger',
220223
defaultsTo: false)

pkg/frontend_server/lib/src/javascript_bundle.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ class IncrementalJavaScriptBundler {
351351
customScheme: _fileSystemScheme,
352352
compiler: compiler,
353353
component: summaryComponent,
354-
packageConfig: packageConfig,
354+
// Only pass a package configuration if the serve time package paths are
355+
// not being enforced by the `useDebuggerModuleNames` option.
356+
packageConfig: useDebuggerModuleNames ? null : packageConfig,
355357
);
356358
final Uint8List codeBytes = utf8.encode(code.code);
357359
final Uint8List sourceMapBytes = utf8.encode(json.encode(code.sourceMap));

0 commit comments

Comments
 (0)