Skip to content

Renamed boolean flag in DWDS Injector #2602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## 24.3.9-wip
## 24.3.9

- Renamed DWDS Injector parameter `enableDebuggingSupport` to `injectDebuggingSupportCode` for clearer intent.

## 24.3.8

Expand Down
4 changes: 2 additions & 2 deletions dwds/lib/dart_web_debug_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Dwds {
required Stream<BuildResult> buildResults,
required ConnectionProvider chromeConnection,
required ToolConfiguration toolConfiguration,
bool enableDebuggingSupport = true,
bool injectDebuggingSupportCode = true,
}) async {
globalToolConfiguration = toolConfiguration;
final debugSettings = toolConfiguration.debugSettings;
Expand Down Expand Up @@ -120,7 +120,7 @@ class Dwds {

final injected = DwdsInjector(
extensionUri: extensionUri,
enableDebuggingSupport: enableDebuggingSupport,
injectDebuggingSupportCode: injectDebuggingSupportCode,
);

final devHandler = DevHandler(
Expand Down
10 changes: 5 additions & 5 deletions dwds/lib/src/handlers/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const _clientScript = 'dwds/src/injected/client';
/// to include the injected DWDS client, enabling debugging capabilities
/// and source mapping when running in a browser environment.
///
/// The `_enableDebuggingSupport` flag determines whether debugging-related
/// The `_injectDebuggingSupportCode` flag determines whether debugging-related
/// functionality should be included:
/// - When `true`, the DWDS client is injected, enabling debugging features.
/// - When `false`, debugging support is disabled, meaning the application will
Expand All @@ -42,13 +42,13 @@ class DwdsInjector {
final Future<String>? _extensionUri;
final _devHandlerPaths = StreamController<String>();
final _logger = Logger('DwdsInjector');
final bool _enableDebuggingSupport;
final bool _injectDebuggingSupportCode;

DwdsInjector({
Future<String>? extensionUri,
bool enableDebuggingSupport = true,
bool injectDebuggingSupportCode = true,
}) : _extensionUri = extensionUri,
_enableDebuggingSupport = enableDebuggingSupport;
_injectDebuggingSupportCode = injectDebuggingSupportCode;

/// Returns the embedded dev handler paths.
///
Expand Down Expand Up @@ -112,7 +112,7 @@ class DwdsInjector {
);
// If true, inject the debugging client and hoist the main function
// to enable debugging support.
if (_enableDebuggingSupport) {
if (_injectDebuggingSupportCode) {
body = await _injectClientAndHoistMain(
body,
appId,
Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dwds/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dwds
# Every time this changes you need to run `dart run build_runner build`.
version: 24.3.9-wip
version: 24.3.9
description: >-
A service that proxies between the Chrome debug protocol and the Dart VM
service protocol.
Expand Down
Loading