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
39bc68b6
Unverified
Commit
39bc68b6
authored
Nov 10, 2020
by
Jonah Williams
Committed by
GitHub
Nov 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] dont use autodetect enum for web (#70189)
parent
f877d9fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
6 deletions
+23
-6
devfs_web.dart
packages/flutter_tools/lib/src/isolated/devfs_web.dart
+10
-6
resident_web_runner.dart
...s/flutter_tools/lib/src/isolated/resident_web_runner.dart
+1
-0
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+6
-0
devfs_web_test.dart
.../flutter_tools/test/general.shard/web/devfs_web_test.dart
+6
-0
No files found.
packages/flutter_tools/lib/src/isolated/devfs_web.dart
View file @
39bc68b6
...
...
@@ -124,7 +124,7 @@ class WebAssetServer implements AssetReader {
this
.
internetAddress
,
this
.
_modules
,
this
.
_digests
,
this
.
_
buildInfo
,
this
.
_
nullSafetyMode
,
)
:
basePath
=
_parseBasePathFromIndexHtml
(
globals
.
fs
.
currentDirectory
.
childDirectory
(
'web'
)
.
childFile
(
'index.html'
));
...
...
@@ -169,7 +169,8 @@ class WebAssetServer implements AssetReader {
BuildInfo
buildInfo
,
bool
enableDwds
,
Uri
entrypoint
,
ExpressionCompiler
expressionCompiler
,
{
ExpressionCompiler
expressionCompiler
,
NullSafetyMode
nullSafetyMode
,
{
bool
testMode
=
false
,
DwdsLauncher
dwdsLauncher
=
Dwds
.
start
,
})
async
{
...
...
@@ -209,7 +210,7 @@ class WebAssetServer implements AssetReader {
address
,
modules
,
digests
,
buildInfo
,
nullSafetyMode
,
);
if
(
testMode
)
{
return
server
;
...
...
@@ -293,7 +294,7 @@ class WebAssetServer implements AssetReader {
return
server
;
}
final
BuildInfo
_buildInfo
;
final
NullSafetyMode
_nullSafetyMode
;
final
HttpServer
_httpServer
;
// If holding these in memory is too much overhead, this can be switched to a
// RandomAccessFile and read on demand.
...
...
@@ -672,12 +673,12 @@ class WebAssetServer implements AssetReader {
File
get
_resolveDartSdkJsFile
=>
globals
.
fs
.
file
(
globals
.
artifacts
.
getArtifactPath
(
_dartSdkJsArtifactMap
[
webRenderer
][
_
buildInfo
.
nullSafetyMode
]
_dartSdkJsArtifactMap
[
webRenderer
][
_nullSafetyMode
]
));
File
get
_resolveDartSdkJsMapFile
=>
globals
.
fs
.
file
(
globals
.
artifacts
.
getArtifactPath
(
_dartSdkJsMapArtifactMap
[
webRenderer
][
_
buildInfo
.
nullSafetyMode
]
_dartSdkJsMapArtifactMap
[
webRenderer
][
_nullSafetyMode
]
));
@override
...
...
@@ -735,6 +736,7 @@ class WebDevFS implements DevFS {
@required
this
.
expressionCompiler
,
@required
this
.
chromiumLauncher
,
@required
this
.
nullAssertions
,
@required
this
.
nullSafetyMode
,
this
.
testMode
=
false
,
})
:
_port
=
port
;
...
...
@@ -751,6 +753,7 @@ class WebDevFS implements DevFS {
final
ChromiumLauncher
chromiumLauncher
;
final
bool
nullAssertions
;
final
int
_port
;
final
NullSafetyMode
nullSafetyMode
;
WebAssetServer
webAssetServer
;
...
...
@@ -823,6 +826,7 @@ class WebDevFS implements DevFS {
enableDwds
,
entrypoint
,
expressionCompiler
,
nullSafetyMode
,
testMode:
testMode
,
);
final
int
selectedPort
=
webAssetServer
.
selectedPort
;
...
...
packages/flutter_tools/lib/src/isolated/resident_web_runner.dart
View file @
39bc68b6
...
...
@@ -508,6 +508,7 @@ class _ResidentWebRunner extends ResidentWebRunner {
expressionCompiler:
expressionCompiler
,
chromiumLauncher:
_chromiumLauncher
,
nullAssertions:
debuggingOptions
.
nullAssertions
,
nullSafetyMode:
device
.
nullSafetyMode
,
);
final
Uri
url
=
await
device
.
devFS
.
create
();
if
(
debuggingOptions
.
buildInfo
.
isDebug
)
{
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
39bc68b6
...
...
@@ -48,6 +48,7 @@ class FlutterDevice {
TargetPlatform
targetPlatform
,
ResidentCompiler
generator
,
this
.
userIdentifier
,
this
.
nullSafetyMode
=
NullSafetyMode
.
autodetect
,
})
:
assert
(
buildInfo
.
trackWidgetCreation
!=
null
),
generator
=
generator
??
ResidentCompiler
(
globals
.
artifacts
.
getArtifactPath
(
...
...
@@ -83,6 +84,7 @@ class FlutterDevice {
String
userIdentifier
,
})
async
{
ResidentCompiler
generator
;
NullSafetyMode
nullSafetyMode
=
buildInfo
.
nullSafetyMode
;
final
TargetPlatform
targetPlatform
=
await
device
.
targetPlatform
;
if
(
device
.
platformType
==
PlatformType
.
fuchsia
)
{
targetModel
=
TargetModel
.
flutterRunner
;
...
...
@@ -118,12 +120,14 @@ class FlutterDevice {
...?
buildInfo
.
extraFrontEndOptions
,
'--sound-null-safety'
,
];
nullSafetyMode
=
NullSafetyMode
.
sound
;
}
else
{
platformDillArtifact
=
Artifact
.
webPlatformKernelDill
;
extraFrontEndOptions
=
<
String
>[
...?
buildInfo
.
extraFrontEndOptions
,
'--no-sound-null-safety'
,
];
nullSafetyMode
=
NullSafetyMode
.
unsound
;
}
}
...
...
@@ -198,6 +202,7 @@ class FlutterDevice {
generator:
generator
,
buildInfo:
buildInfo
,
userIdentifier:
userIdentifier
,
nullSafetyMode:
nullSafetyMode
,
);
}
...
...
@@ -205,6 +210,7 @@ class FlutterDevice {
final
ResidentCompiler
generator
;
final
BuildInfo
buildInfo
;
final
String
userIdentifier
;
final
NullSafetyMode
nullSafetyMode
;
DevFSWriter
devFSWriter
;
Stream
<
Uri
>
observatoryUris
;
...
...
packages/flutter_tools/test/general.shard/web/devfs_web_test.dart
View file @
39bc68b6
...
...
@@ -629,6 +629,7 @@ void main() {
testMode:
true
,
expressionCompiler:
null
,
chromiumLauncher:
null
,
nullSafetyMode:
NullSafetyMode
.
unsound
,
);
webDevFS
.
requireJS
.
createSync
(
recursive:
true
);
webDevFS
.
stackTraceMapper
.
createSync
(
recursive:
true
);
...
...
@@ -745,6 +746,7 @@ void main() {
testMode:
true
,
expressionCompiler:
null
,
chromiumLauncher:
null
,
nullSafetyMode:
NullSafetyMode
.
autodetect
,
);
webDevFS
.
requireJS
.
createSync
(
recursive:
true
);
webDevFS
.
stackTraceMapper
.
createSync
(
recursive:
true
);
...
...
@@ -853,6 +855,7 @@ void main() {
expressionCompiler:
null
,
chromiumLauncher:
null
,
nullAssertions:
true
,
nullSafetyMode:
NullSafetyMode
.
sound
,
);
webDevFS
.
requireJS
.
createSync
(
recursive:
true
);
webDevFS
.
stackTraceMapper
.
createSync
(
recursive:
true
);
...
...
@@ -903,6 +906,7 @@ void main() {
testMode:
true
,
expressionCompiler:
null
,
chromiumLauncher:
null
,
nullSafetyMode:
NullSafetyMode
.
sound
,
);
webDevFS
.
requireJS
.
createSync
(
recursive:
true
);
webDevFS
.
stackTraceMapper
.
createSync
(
recursive:
true
);
...
...
@@ -954,6 +958,7 @@ void main() {
testMode:
true
,
expressionCompiler:
null
,
chromiumLauncher:
null
,
nullSafetyMode:
NullSafetyMode
.
sound
,
);
webDevFS
.
requireJS
.
createSync
(
recursive:
true
);
webDevFS
.
stackTraceMapper
.
createSync
(
recursive:
true
);
...
...
@@ -981,6 +986,7 @@ void main() {
false
,
Uri
.
base
,
null
,
null
,
testMode:
true
);
expect
(
webAssetServer
.
defaultResponseHeaders
[
'x-frame-options'
],
null
);
...
...
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