mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +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;
|
||||
}
|
||||
|
||||
// TODO(yjbanov): https://github.com/flutter/flutter/issues/70121
|
||||
static const Map<WebRendererMode, Map<NullSafetyMode, Artifact>> _dartSdkJsArtifactMap =
|
||||
<WebRendererMode, Map<NullSafetyMode, Artifact>> {
|
||||
WebRendererMode.autoDetect: <NullSafetyMode, Artifact> {
|
||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdk,
|
||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitAndHtmlSdk,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdk,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSdk,
|
||||
},
|
||||
WebRendererMode.canvaskit: <NullSafetyMode, Artifact> {
|
||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitSoundSdk,
|
||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitSdk,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSoundSdk,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSdk,
|
||||
},
|
||||
WebRendererMode.html: <NullSafetyMode, Artifact> {
|
||||
NullSafetyMode.sound: Artifact.webPrecompiledSoundSdk,
|
||||
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 =
|
||||
<WebRendererMode, Map<NullSafetyMode, Artifact>> {
|
||||
WebRendererMode.autoDetect: <NullSafetyMode, Artifact> {
|
||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps,
|
||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitAndHtmlSdkSourcemaps,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitAndHtmlSdkSourcemaps,
|
||||
},
|
||||
WebRendererMode.canvaskit: <NullSafetyMode, Artifact> {
|
||||
NullSafetyMode.sound: Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps,
|
||||
NullSafetyMode.unsound: Artifact.webPrecompiledCanvaskitSdkSourcemaps,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledCanvaskitSdkSourcemaps,
|
||||
},
|
||||
WebRendererMode.html: <NullSafetyMode, Artifact> {
|
||||
NullSafetyMode.sound: Artifact.webPrecompiledSoundSdkSourcemaps,
|
||||
NullSafetyMode.unsound: Artifact.webPrecompiledSdkSourcemaps,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledSoundSdkSourcemaps,
|
||||
NullSafetyMode.autodetect: Artifact.webPrecompiledSdkSourcemaps,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -756,24 +756,24 @@ void main() {
|
|||
.childFile('web_entrypoint.dart')
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('GENERATED');
|
||||
final String webPrecompiledSoundSdk = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledSoundSdk);
|
||||
final String webPrecompiledSoundSdkSourcemaps = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledSoundSdkSourcemaps);
|
||||
final String webPrecompiledCanvaskitSoundSdk = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledCanvaskitSoundSdk);
|
||||
final String webPrecompiledCanvaskitSoundSdkSourcemaps = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps);
|
||||
globals.fs.file(webPrecompiledSoundSdk)
|
||||
final String webPrecompiledSdk = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledSdk);
|
||||
final String webPrecompiledSdkSourcemaps = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledSdkSourcemaps);
|
||||
final String webPrecompiledCanvaskitSdk = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledCanvaskitSdk);
|
||||
final String webPrecompiledCanvaskitSdkSourcemaps = globals.artifacts
|
||||
.getArtifactPath(Artifact.webPrecompiledCanvaskitSdkSourcemaps);
|
||||
globals.fs.file(webPrecompiledSdk)
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('HELLO');
|
||||
globals.fs.file(webPrecompiledSoundSdkSourcemaps)
|
||||
globals.fs.file(webPrecompiledSdkSourcemaps)
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('THERE');
|
||||
globals.fs.file(webPrecompiledCanvaskitSoundSdk)
|
||||
globals.fs.file(webPrecompiledCanvaskitSdk)
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('OL');
|
||||
globals.fs.file(webPrecompiledCanvaskitSoundSdkSourcemaps)
|
||||
globals.fs.file(webPrecompiledCanvaskitSdkSourcemaps)
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('CHUM');
|
||||
|
||||
|
@ -798,7 +798,7 @@ void main() {
|
|||
expect(await webDevFS.webAssetServer.dartSourceContents('dart_sdk.js.map'), 'THERE');
|
||||
|
||||
// Update to the SDK.
|
||||
globals.fs.file(webPrecompiledSoundSdk).writeAsStringSync('BELLOW');
|
||||
globals.fs.file(webPrecompiledSdk).writeAsStringSync('BELLOW');
|
||||
|
||||
// New SDK should be visible..
|
||||
expect(await webDevFS.webAssetServer.dartSourceContents('dart_sdk.js'), 'BELLOW');
|
||||
|
|
Loading…
Reference in a new issue