Skip to content

Commit ee10f9b

Browse files
committed
Removed unsound null safety options from classes ModuleMetadata, MetadataProvider & Metadata_test.
1 parent aae09ef commit ee10f9b

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

dwds/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- Replace deprecated JS code `this.__proto__` with `Object.getPrototypeOf(this)`. - [#2500](https://github.com/dart-lang/webdev/pull/2500)
44
- Migrate injected client code to `package:web`. - [#2491](https://github.com/dart-lang/webdev/pull/2491)
5-
- Removed unsound null safety options from classes ModuleMetadata and MetadataProvider - [#2427](https://github.com/dart-lang/webdev/issues/2427)
5+
- Removed unsound null safety options from classes ModuleMetadata, MetadataProvider & Metadata_test. - [#2427](https://github.com/dart-lang/webdev/issues/2427)
66

77
## 24.1.0
88

dwds/lib/src/debugging/metadata/module_metadata.dart

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,13 @@ class ModuleMetadata {
114114
/// Module uri
115115
final String moduleUri;
116116

117-
// Keep the soundNullSafety flag for backward compatibility
118-
@Deprecated('This field is deprecated as sound null safety is enforced.')
119-
final bool soundNullSafety;
120-
121117
final Map<String, LibraryMetadata> libraries = {};
122118

123119
ModuleMetadata(
124120
this.name,
125121
this.closureName,
126122
this.sourceMapUri,
127123
this.moduleUri, {
128-
this.soundNullSafety = true, // Default to true
129124
String? ver,
130125
}) {
131126
version = ver ?? ModuleMetadataVersion.current.version;
@@ -151,10 +146,7 @@ class ModuleMetadata {
151146
name = _readRequiredField(json, 'name'),
152147
closureName = _readRequiredField(json, 'closureName'),
153148
sourceMapUri = _readRequiredField(json, 'sourceMapUri'),
154-
moduleUri = _readRequiredField(json, 'moduleUri'),
155-
// Deprecated field still present for backward compatibility
156-
// Defaults to true if missing
157-
soundNullSafety = _readOptionalField(json, 'soundNullSafety') ?? true {
149+
moduleUri = _readRequiredField(json, 'moduleUri') {
158150
if (!ModuleMetadataVersion.current.isCompatibleWith(version) &&
159151
!ModuleMetadataVersion.previous.isCompatibleWith(version)) {
160152
throw Exception('Unsupported metadata version $version. '

dwds/lib/src/debugging/metadata/provider.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class MetadataProvider {
1515
final AssetReader _assetReader;
1616
final _logger = Logger('MetadataProvider');
1717
final String entrypoint;
18-
@Deprecated('This field is deprecated as sound null safety is enforced.')
19-
final bool _soundNullSafety = true;
2018
final List<String> _libraries = [];
2119
final Map<String, String> _scriptToModule = {};
2220
final Map<String, String> _moduleToSourceMap = {};
@@ -73,7 +71,7 @@ class MetadataProvider {
7371
/// All libraries have to agree on null safety mode.
7472
Future<bool> get soundNullSafety async {
7573
await _initialize();
76-
return _soundNullSafety;
74+
return true;
7775
}
7876

7977
/// A list of all libraries in the Dart application.

dwds/test/metadata_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,5 @@ void main() {
114114
expect(parts.length, 1);
115115
expect(parts[0], 'org-dartlang-app:///web/main.dart');
116116
}
117-
expect(metadata.soundNullSafety, true);
118117
});
119118
}

0 commit comments

Comments
 (0)