Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dart-lang/webdev
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f485686
Choose a base ref
..
head repository: dart-lang/webdev
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 302b6db
Choose a head ref
3 changes: 3 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -15,3 +15,6 @@ jobs:
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
with:
sdk: dev
permissions:
id-token: write
pull-requests: write
15 changes: 14 additions & 1 deletion dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
## 24.3.6-dev
## 24.3.7

- The registered extension `reassemble` is now no longer called when calling
`reloadSources`. Users should call `reassemble` using `callServiceExtension`.

- `callServiceExtension` now checks the runtime for the list of registered
service extensions. It also now throws a `RPCError` with
`RPCErrorKind.kMethodNotFound` when a service extension is not found instead
of throwing a JS evaluation error.

## 24.3.6

- Bump minimum sdk version to 3.7.0
- use 'compile js-dev' instead of directly invoking the ddc snapshot.
- `FrontendServerDdcLibraryBundleStrategy` now takes a `hotReloadSourcesUri`
parameter in order to fetch the file that contains the changed sources and
libraries instead of assuming it exists in the global `window`.

## 24.3.5
- Allow clients to specify the `packageConfigPath` in `LoadStrategy` class and associated providers.
13 changes: 9 additions & 4 deletions dwds/lib/src/debugging/inspector.dart
Original file line number Diff line number Diff line change
@@ -115,8 +115,7 @@ class AppInspector implements AppInspectorInterface {
await DartUri.initialize();
DartUri.recordAbsoluteUris(libraries.map((lib) => lib.uri).nonNulls);
DartUri.recordAbsoluteUris(scripts.map((script) => script.uri).nonNulls);

isolate.extensionRPCs?.addAll(await _getExtensionRpcs());
await getExtensionRpcs();
}

static IsolateRef _toIsolateRef(Isolate isolate) => IsolateRef(
@@ -760,11 +759,16 @@ class AppInspector implements AppInspectorInterface {
scriptId == null ? null : _scriptRefsById[scriptId];

/// Runs an eval on the page to compute all existing registered extensions.
Future<List<String>> _getExtensionRpcs() async {
///
/// Combines this with the RPCs registered in the [isolate]. Use this over
/// [Isolate.extensionRPCs] as this computes a live set.
///
/// Updates [Isolate.extensionRPCs] to this set.
Future<Set<String>> getExtensionRpcs() async {
final expression =
globalToolConfiguration.loadStrategy.dartRuntimeDebugger
.getDartDeveloperExtensionNamesJsExpression();
final extensionRpcs = <String>[];
final extensionRpcs = <String>{};
final params = {
'expression': expression,
'returnByValue': true,
@@ -784,6 +788,7 @@ class AppInspector implements AppInspectorInterface {
s,
);
}
isolate.extensionRPCs = List<String>.of(extensionRpcs);
return extensionRpcs;
}

2 changes: 2 additions & 0 deletions dwds/lib/src/handlers/injector.dart
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import 'dart:isolate';

import 'package:crypto/crypto.dart';
import 'package:dwds/src/config/tool_configuration.dart';
import 'package:dwds/src/loaders/ddc_library_bundle.dart';
import 'package:dwds/src/version.dart';
import 'package:logging/logging.dart';
import 'package:shelf/shelf.dart';
@@ -203,6 +204,7 @@ Future<String> _injectedClientSnippet(
'window.\$dartEmitDebugEvents = ${debugSettings.emitDebugEvents};\n'
'window.\$isInternalBuild = ${appMetadata.isInternalBuild};\n'
'window.\$isFlutterApp = ${buildSettings.isFlutterApp};\n'
'${loadStrategy is DdcLibraryBundleStrategy ? 'window.\$hotReloadSourcesPath = "${loadStrategy.hotReloadSourcesUri.toString()}";\n' : ''}'
'${loadStrategy.loadClientSnippet(_clientScript)}';

if (extensionUri != null) {
Loading