@@ -24,7 +24,7 @@ class WebDevFS {
24
24
required this .projectDirectory,
25
25
required this .packageUriMapper,
26
26
required this .index,
27
- required this .soundNullSafety,
27
+ this .soundNullSafety = true ,
28
28
this .urlTunneler,
29
29
required this .sdkLayout,
30
30
required this .ddcModuleFormat,
@@ -38,7 +38,10 @@ class WebDevFS {
38
38
final PackageUriMapper packageUriMapper;
39
39
final String index;
40
40
final UrlEncoder ? urlTunneler;
41
+
42
+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
41
43
final bool soundNullSafety;
44
+
42
45
final TestSdkLayout sdkLayout;
43
46
final ModuleFormat ddcModuleFormat;
44
47
late final Directory _savedCurrentDirectory;
@@ -142,9 +145,8 @@ class WebDevFS {
142
145
143
146
assetServer.writeFile ('main_module.digests' , '{}' );
144
147
145
- final sdk = soundNullSafety ? dartSdk : dartSdkWeak;
146
- final sdkSourceMap =
147
- soundNullSafety ? dartSdkSourcemap : dartSdkSourcemapWeak;
148
+ final sdk = dartSdk;
149
+ final sdkSourceMap = dartSdkSourcemap;
148
150
assetServer.writeFile ('dart_sdk.js' , sdk.readAsStringSync ());
149
151
assetServer.writeFile ('dart_sdk.js.map' , sdkSourceMap.readAsStringSync ());
150
152
@@ -189,21 +191,11 @@ class WebDevFS {
189
191
File get ddcModuleLoaderJS =>
190
192
fileSystem.file (sdkLayout.ddcModuleLoaderJsPath);
191
193
File get requireJS => fileSystem.file (sdkLayout.requireJsPath);
192
- File get dartSdkWeak => fileSystem.file (switch (ddcModuleFormat) {
193
- ModuleFormat .amd => sdkLayout.weakAmdJsPath,
194
- ModuleFormat .ddc => sdkLayout.weakDdcJsPath,
195
- _ => throw Exception ('Unsupported DDC module format $ddcModuleFormat .' )
196
- });
197
194
File get dartSdk => fileSystem.file (switch (ddcModuleFormat) {
198
195
ModuleFormat .amd => sdkLayout.soundAmdJsPath,
199
196
ModuleFormat .ddc => sdkLayout.soundDdcJsPath,
200
197
_ => throw Exception ('Unsupported DDC module format $ddcModuleFormat .' )
201
198
});
202
- File get dartSdkSourcemapWeak => fileSystem.file (switch (ddcModuleFormat) {
203
- ModuleFormat .amd => sdkLayout.weakAmdJsMapPath,
204
- ModuleFormat .ddc => sdkLayout.weakDdcJsMapPath,
205
- _ => throw Exception ('Unsupported DDC module format $ddcModuleFormat .' )
206
- });
207
199
File get dartSdkSourcemap => fileSystem.file (switch (ddcModuleFormat) {
208
200
ModuleFormat .amd => sdkLayout.soundAmdJsMapPath,
209
201
ModuleFormat .ddc => sdkLayout.soundDdcJsMapPath,
0 commit comments