mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
default to unsound nullability for web (#70120)
This commit is contained in:
parent
f1cdf2e6f3
commit
879466eac2
@ -630,41 +630,43 @@ class WebAssetServer implements AssetReader {
|
|||||||
return webSdkFile;
|
return webSdkFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(yjbanov): https://github.com/flutter/flutter/issues/70121
|
||||||
static const Map<WebRendererMode, Map<NullSafetyMode, Artifact>> _dartSdkJsArtifactMap =
|
static const Map<WebRendererMode, Map<NullSafetyMode, Artifact>> _dartSdkJsArtifactMap =
|
||||||
<WebRendererMode, Map<NullSafetyMode, Artifact>> {
|
<WebRendererMode, Map<NullSafetyMode, Artifact>> {
|
||||||
WebRendererMode.autoDetect: <NullSafetyMode, Artifact> {
|
WebRendererMode.autoDetect: <NullSafetyMode, Artifact> {
|
||||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdk,
|
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdk,
|
||||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitAndHtmlSdk,
|
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitAndHtmlSdk,
|
||||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdk,
|
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSdk,
|
||||||
},
|
},
|
||||||
WebRendererMode.canvaskit: <NullSafetyMode, Artifact> {
|
WebRendererMode.canvaskit: <NullSafetyMode, Artifact> {
|
||||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitSoundSdk,
|
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitSoundSdk,
|
||||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitSdk,
|
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitSdk,
|
||||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSoundSdk,
|
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSdk,
|
||||||
},
|
},
|
||||||
WebRendererMode.html: <NullSafetyMode, Artifact> {
|
WebRendererMode.html: <NullSafetyMode, Artifact> {
|
||||||
NullSafetyMode.sound: Artifact.webPrecompiledSoundSdk,
|
NullSafetyMode.sound: Artifact.webPrecompiledSoundSdk,
|
||||||
NullSafetyMode.unsound: Artifact.webPrecompiledSdk,
|
NullSafetyMode.unsound: Artifact.webPrecompiledSdk,
|
||||||
NullSafetyMode.autodetect: Artifact.webPrecompiledSoundSdk,
|
NullSafetyMode.autodetect: Artifact.webPrecompiledSdk,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO(yjbanov): https://github.com/flutter/flutter/issues/70121
|
||||||
static const Map<WebRendererMode, Map<NullSafetyMode, Artifact>> _dartSdkJsMapArtifactMap =
|
static const Map<WebRendererMode, Map<NullSafetyMode, Artifact>> _dartSdkJsMapArtifactMap =
|
||||||
<WebRendererMode, Map<NullSafetyMode, Artifact>> {
|
<WebRendererMode, Map<NullSafetyMode, Artifact>> {
|
||||||
WebRendererMode.autoDetect: <NullSafetyMode, Artifact> {
|
WebRendererMode.autoDetect: <NullSafetyMode, Artifact> {
|
||||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps,
|
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps,
|
||||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitAndHtmlSdkSourcemaps,
|
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitAndHtmlSdkSourcemaps,
|
||||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps,
|
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSdkSourcemaps,
|
||||||
},
|
},
|
||||||
WebRendererMode.canvaskit: <NullSafetyMode, Artifact> {
|
WebRendererMode.canvaskit: <NullSafetyMode, Artifact> {
|
||||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps,
|
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps,
|
||||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitSdkSourcemaps,
|
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitSdkSourcemaps,
|
||||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps,
|
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSdkSourcemaps,
|
||||||
},
|
},
|
||||||
WebRendererMode.html: <NullSafetyMode, Artifact> {
|
WebRendererMode.html: <NullSafetyMode, Artifact> {
|
||||||
NullSafetyMode.sound: Artifact.webPrecompiledSoundSdkSourcemaps,
|
NullSafetyMode.sound: Artifact.webPrecompiledSoundSdkSourcemaps,
|
||||||
NullSafetyMode.unsound: Artifact.webPrecompiledSdkSourcemaps,
|
NullSafetyMode.unsound: Artifact.webPrecompiledSdkSourcemaps,
|
||||||
NullSafetyMode.autodetect: Artifact.webPrecompiledSoundSdkSourcemaps,
|
NullSafetyMode.autodetect: Artifact.webPrecompiledSdkSourcemaps,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -756,24 +756,24 @@ void main() {
|
|||||||
.childFile('web_entrypoint.dart')
|
.childFile('web_entrypoint.dart')
|
||||||
..createSync(recursive: true)
|
..createSync(recursive: true)
|
||||||
..writeAsStringSync('GENERATED');
|
..writeAsStringSync('GENERATED');
|
||||||
final String webPrecompiledSoundSdk = globals.artifacts
|
final String webPrecompiledSdk = globals.artifacts
|
||||||
.getArtifactPath(Artifact.webPrecompiledSoundSdk);
|
.getArtifactPath(Artifact.webPrecompiledSdk);
|
||||||
final String webPrecompiledSoundSdkSourcemaps = globals.artifacts
|
final String webPrecompiledSdkSourcemaps = globals.artifacts
|
||||||
.getArtifactPath(Artifact.webPrecompiledSoundSdkSourcemaps);
|
.getArtifactPath(Artifact.webPrecompiledSdkSourcemaps);
|
||||||
final String webPrecompiledCanvaskitSoundSdk = globals.artifacts
|
final String webPrecompiledCanvaskitSdk = globals.artifacts
|
||||||
.getArtifactPath(Artifact.webPrecompiledCanvaskitSoundSdk);
|
.getArtifactPath(Artifact.webPrecompiledCanvaskitSdk);
|
||||||
final String webPrecompiledCanvaskitSoundSdkSourcemaps = globals.artifacts
|
final String webPrecompiledCanvaskitSdkSourcemaps = globals.artifacts
|
||||||
.getArtifactPath(Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps);
|
.getArtifactPath(Artifact.webPrecompiledCanvaskitSdkSourcemaps);
|
||||||
globals.fs.file(webPrecompiledSoundSdk)
|
globals.fs.file(webPrecompiledSdk)
|
||||||
..createSync(recursive: true)
|
..createSync(recursive: true)
|
||||||
..writeAsStringSync('HELLO');
|
..writeAsStringSync('HELLO');
|
||||||
globals.fs.file(webPrecompiledSoundSdkSourcemaps)
|
globals.fs.file(webPrecompiledSdkSourcemaps)
|
||||||
..createSync(recursive: true)
|
..createSync(recursive: true)
|
||||||
..writeAsStringSync('THERE');
|
..writeAsStringSync('THERE');
|
||||||
globals.fs.file(webPrecompiledCanvaskitSoundSdk)
|
globals.fs.file(webPrecompiledCanvaskitSdk)
|
||||||
..createSync(recursive: true)
|
..createSync(recursive: true)
|
||||||
..writeAsStringSync('OL');
|
..writeAsStringSync('OL');
|
||||||
globals.fs.file(webPrecompiledCanvaskitSoundSdkSourcemaps)
|
globals.fs.file(webPrecompiledCanvaskitSdkSourcemaps)
|
||||||
..createSync(recursive: true)
|
..createSync(recursive: true)
|
||||||
..writeAsStringSync('CHUM');
|
..writeAsStringSync('CHUM');
|
||||||
|
|
||||||
@ -798,7 +798,7 @@ void main() {
|
|||||||
expect(await webDevFS.webAssetServer.dartSourceContents('dart_sdk.js.map'), 'THERE');
|
expect(await webDevFS.webAssetServer.dartSourceContents('dart_sdk.js.map'), 'THERE');
|
||||||
|
|
||||||
// Update to the SDK.
|
// Update to the SDK.
|
||||||
globals.fs.file(webPrecompiledSoundSdk).writeAsStringSync('BELLOW');
|
globals.fs.file(webPrecompiledSdk).writeAsStringSync('BELLOW');
|
||||||
|
|
||||||
// New SDK should be visible..
|
// New SDK should be visible..
|
||||||
expect(await webDevFS.webAssetServer.dartSourceContents('dart_sdk.js'), 'BELLOW');
|
expect(await webDevFS.webAssetServer.dartSourceContents('dart_sdk.js'), 'BELLOW');
|
||||||
|
Loading…
Reference in New Issue
Block a user