Skip to content

Commit d9e89ad

Browse files
committed
Remove copyWith
1 parent 061219d commit d9e89ad

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

dwds/lib/dart_web_debug_service.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,16 @@ class Dwds {
145145
debugSettings.useSseForInjectedClient,
146146
debugSettings.expressionCompiler,
147147
injected,
148-
debugSettings.ddsConfiguration.copyWith(
148+
DartDevelopmentServiceConfiguration(
149+
// This technically isn't correct, but DartDevelopmentServiceConfiguration.enable
150+
// is true by default, so this won't break unmigrated tools.
149151
// ignore: deprecated_member_use_from_same_package
150-
enable: debugSettings.spawnDds,
152+
enable: debugSettings.spawnDds && debugSettings.ddsConfiguration.enable,
151153
// ignore: deprecated_member_use_from_same_package
152-
port: debugSettings.ddsPort,
153-
// TODO(bkonyi): only allow for DDS to serve DevTools.
154-
devToolsServerAddress: launchedDevToolsUri,
154+
port: debugSettings.ddsPort ?? debugSettings.ddsConfiguration.port,
155+
devToolsServerAddress:
156+
launchedDevToolsUri ??
157+
debugSettings.ddsConfiguration.devToolsServerAddress,
155158
),
156159
debugSettings.launchDevToolsInNewWindow,
157160
useWebSocketConnection: useDwdsWebSocketConnection,

dwds/lib/src/config/tool_configuration.dart

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,6 @@ class DartDevelopmentServiceConfiguration {
5959
this.devToolsServerAddress,
6060
});
6161

62-
DartDevelopmentServiceConfiguration copyWith({
63-
bool? enable,
64-
int? port,
65-
bool? serveDevTools,
66-
Uri? devToolsServerAddress,
67-
}) {
68-
return DartDevelopmentServiceConfiguration(
69-
enable: enable ?? this.enable,
70-
port: port ?? this.port,
71-
serveDevTools: serveDevTools ?? this.serveDevTools,
72-
devToolsServerAddress:
73-
devToolsServerAddress ?? this.devToolsServerAddress,
74-
);
75-
}
76-
7762
final bool enable;
7863
final int? port;
7964
final bool serveDevTools;

0 commit comments

Comments
 (0)