From 28a4e852bc90479015e6bc96a15d11fe4aa34f3a Mon Sep 17 00:00:00 2001 From: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:00:08 -0700 Subject: [PATCH] Use dwds 24.4.0 (#171669) Requires a modification to how we compute the hotReloadSourcesUri contents. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --- .../lib/src/isolated/web_asset_server.dart | 10 ++++++++-- packages/flutter_tools/pubspec.yaml | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/isolated/web_asset_server.dart b/packages/flutter_tools/lib/src/isolated/web_asset_server.dart index 6f494fd001e..33724c6e224 100644 --- a/packages/flutter_tools/lib/src/isolated/web_asset_server.dart +++ b/packages/flutter_tools/lib/src/isolated/web_asset_server.dart @@ -131,11 +131,12 @@ class WebAssetServer implements AssetReader { static const String _reloadScriptsFileName = 'reload_scripts.json'; /// Given a list of [modules] that need to be reloaded, writes a file that - /// contains a list of objects each with two fields: + /// contains a list of objects each with three fields: /// /// `src`: A string that corresponds to the file path containing a DDC library /// bundle. To support embedded libraries, the path should include the /// `baseUri` of the web server. + /// `module`: The name of the library bundle in `src`. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. /// @@ -144,6 +145,7 @@ class WebAssetServer implements AssetReader { /// [ /// { /// "src": "/", + /// "module": "", /// "libraries": ["", ""], /// }, /// ] @@ -160,7 +162,11 @@ class WebAssetServer implements AssetReader { ); final List libraries = metadata.libraries.keys.toList(); final String moduleUri = baseUri != null ? '$baseUri/$module' : module; - moduleToLibrary.add({'src': moduleUri, 'libraries': libraries}); + moduleToLibrary.add({ + 'src': moduleUri, + 'module': metadata.name, + 'libraries': libraries, + }); } writeFile(_reloadScriptsFileName, json.encode(moduleToLibrary)); } diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml index 8a6e71fd284..2bb5ff447f0 100644 --- a/packages/flutter_tools/pubspec.yaml +++ b/packages/flutter_tools/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: archive: 3.6.1 args: 2.7.0 dds: 5.0.4 - dwds: 24.3.11 + dwds: 24.4.0 code_builder: 4.10.1 collection: 1.19.1 completion: 1.0.1 @@ -126,4 +126,4 @@ dev_dependencies: dartdoc: # Exclude this package from the hosted API docs. nodoc: true -# PUBSPEC CHECKSUM: e37mug +# PUBSPEC CHECKSUM: 36e76b