Skip to content

Commit

Permalink
updated getter for dartRuntimeDebugger
Browse files Browse the repository at this point in the history
  • Loading branch information
jyameo committed Dec 3, 2024
1 parent 7b27424 commit f0888be
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 23 deletions.
10 changes: 4 additions & 6 deletions dwds/lib/src/loaders/ddc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ class DdcStrategy extends LoadStrategy {
@override
final ReloadConfiguration reloadConfiguration;

late final DartRuntimeDebugger _dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: false,
);

/// Returns a map of module name to corresponding server path (excluding .js)
/// for the provided Dart application entrypoint.
///
Expand Down Expand Up @@ -170,7 +165,10 @@ class DdcStrategy extends LoadStrategy {
String get loadModuleSnippet => 'dart_library.import';

@override
DartRuntimeDebugger get dartRuntimeDebugger => _dartRuntimeDebugger;
late final DartRuntimeDebugger dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: false,
);

@override
BuildSettings get buildSettings => _buildSettings;
Expand Down
10 changes: 4 additions & 6 deletions dwds/lib/src/loaders/ddc_library_bundle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ class DdcLibraryBundleStrategy extends LoadStrategy {
@override
final ReloadConfiguration reloadConfiguration;

late final DartRuntimeDebugger _dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: true,
);

/// Returns a map of module name to corresponding server path (excluding .js)
/// for the provided Dart application entrypoint.
///
Expand Down Expand Up @@ -147,7 +142,10 @@ class DdcLibraryBundleStrategy extends LoadStrategy {
"This is currently unsupported in the DDC library bundle format.'); }";

@override
DartRuntimeDebugger get dartRuntimeDebugger => _dartRuntimeDebugger;
late final DartRuntimeDebugger dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: true,
);

@override
BuildSettings get buildSettings => _buildSettings;
Expand Down
10 changes: 4 additions & 6 deletions dwds/lib/src/loaders/require.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ class RequireStrategy extends LoadStrategy {
@override
final ReloadConfiguration reloadConfiguration;

late final DartRuntimeDebugger _dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: false,
);

final String _requireDigestsPath = r'$requireDigestsPath';

/// Returns a map of module name to corresponding server path (excluding .js)
Expand Down Expand Up @@ -171,7 +166,10 @@ class RequireStrategy extends LoadStrategy {
String get loadModuleSnippet => 'require';

@override
DartRuntimeDebugger get dartRuntimeDebugger => _dartRuntimeDebugger;
late final DartRuntimeDebugger dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: false,
);

/// Require JS config for ddc.
///
Expand Down
9 changes: 4 additions & 5 deletions dwds/test/fixtures/fakes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,6 @@ class FakeExecutionContext extends ExecutionContext {

class FakeStrategy extends LoadStrategy {
final BuildSettings _buildSettings;
late final DartRuntimeDebugger _dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: true,
);

FakeStrategy(
super.assetReader, {
Expand Down Expand Up @@ -368,7 +364,10 @@ class FakeStrategy extends LoadStrategy {
String get loadModuleSnippet => '';

@override
DartRuntimeDebugger get dartRuntimeDebugger => _dartRuntimeDebugger;
late final DartRuntimeDebugger dartRuntimeDebugger = DartRuntimeDebugger(
loadStrategy: this,
useLibraryBundleExpression: false,
);

@override
ReloadConfiguration get reloadConfiguration => ReloadConfiguration.none;
Expand Down

0 comments on commit f0888be

Please sign in to comment.