Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
879466ea
Unverified
Commit
879466ea
authored
Nov 09, 2020
by
Yegor
Committed by
GitHub
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default to unsound nullability for web (#70120)
parent
f1cdf2e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
+21
-19
devfs_web.dart
packages/flutter_tools/lib/src/isolated/devfs_web.dart
+8
-6
devfs_web_test.dart
.../flutter_tools/test/general.shard/web/devfs_web_test.dart
+13
-13
No files found.
packages/flutter_tools/lib/src/isolated/devfs_web.dart
View file @
879466ea
...
...
@@ -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
.
webPrecompiledCanvaskitAndHtmlS
oundS
dk
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledCanvaskitAndHtmlSdk
,
},
WebRendererMode
.
canvaskit
:
<
NullSafetyMode
,
Artifact
>
{
NullSafetyMode
.
sound
:
Artifact
.
webPrecompiledCanvaskitSoundSdk
,
NullSafetyMode
.
unsound
:
Artifact
.
webPrecompiledCanvaskitSdk
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledCanvaskitS
oundS
dk
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledCanvaskitSdk
,
},
WebRendererMode
.
html
:
<
NullSafetyMode
,
Artifact
>
{
NullSafetyMode
.
sound
:
Artifact
.
webPrecompiledSoundSdk
,
NullSafetyMode
.
unsound
:
Artifact
.
webPrecompiledSdk
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledS
oundS
dk
,
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
.
webPrecompiledCanvaskitAndHtmlS
oundS
dkSourcemaps
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledCanvaskitAndHtmlSdkSourcemaps
,
},
WebRendererMode
.
canvaskit
:
<
NullSafetyMode
,
Artifact
>
{
NullSafetyMode
.
sound
:
Artifact
.
webPrecompiledCanvaskitSoundSdkSourcemaps
,
NullSafetyMode
.
unsound
:
Artifact
.
webPrecompiledCanvaskitSdkSourcemaps
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledCanvaskitS
oundS
dkSourcemaps
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledCanvaskitSdkSourcemaps
,
},
WebRendererMode
.
html
:
<
NullSafetyMode
,
Artifact
>
{
NullSafetyMode
.
sound
:
Artifact
.
webPrecompiledSoundSdkSourcemaps
,
NullSafetyMode
.
unsound
:
Artifact
.
webPrecompiledSdkSourcemaps
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledS
oundS
dkSourcemaps
,
NullSafetyMode
.
autodetect
:
Artifact
.
webPrecompiledSdkSourcemaps
,
},
};
...
...
packages/flutter_tools/test/general.shard/web/devfs_web_test.dart
View file @
879466ea
...
...
@@ -756,24 +756,24 @@ void main() {
.
childFile
(
'web_entrypoint.dart'
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'GENERATED'
);
final
String
webPrecompiledS
oundS
dk
=
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
webPrecompiledS
oundS
dk
);
final
String
webPrecompiledS
oundS
dkSourcemaps
=
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
webPrecompiledS
oundS
dkSourcemaps
);
final
String
webPrecompiledCanvaskitS
oundS
dk
=
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
webPrecompiledCanvaskitS
oundS
dk
);
final
String
webPrecompiledCanvaskitS
oundS
dkSourcemaps
=
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
webPrecompiledCanvaskitS
oundS
dkSourcemaps
);
globals
.
fs
.
file
(
webPrecompiledS
oundS
dk
)
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
(
webPrecompiledS
oundS
dkSourcemaps
)
globals
.
fs
.
file
(
webPrecompiledSdkSourcemaps
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'THERE'
);
globals
.
fs
.
file
(
webPrecompiledCanvaskitS
oundS
dk
)
globals
.
fs
.
file
(
webPrecompiledCanvaskitSdk
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'OL'
);
globals
.
fs
.
file
(
webPrecompiledCanvaskitS
oundS
dkSourcemaps
)
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
(
webPrecompiledS
oundS
dk
).
writeAsStringSync
(
'BELLOW'
);
globals
.
fs
.
file
(
webPrecompiledSdk
).
writeAsStringSync
(
'BELLOW'
);
// New SDK should be visible..
expect
(
await
webDevFS
.
webAssetServer
.
dartSourceContents
(
'dart_sdk.js'
),
'BELLOW'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment