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
f8f69575
Unverified
Commit
f8f69575
authored
Sep 13, 2022
by
Zachary Anderson
Committed by
GitHub
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Null safety migration of packages/flutter_tools/bin" (#111506)
parent
126db3b5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
24 deletions
+29
-24
flutter_tools.dart
packages/flutter_tools/bin/flutter_tools.dart
+2
-0
fuchsia_asset_builder.dart
packages/flutter_tools/bin/fuchsia_asset_builder.dart
+7
-6
fuchsia_tester.dart
packages/flutter_tools/bin/fuchsia_tester.dart
+10
-8
resident_web_runner.dart
...s/flutter_tools/lib/src/isolated/resident_web_runner.dart
+2
-2
gen_l10n_types.dart
...s/flutter_tools/lib/src/localizations/gen_l10n_types.dart
+2
-2
flutter_tester_device.dart
...ges/flutter_tools/lib/src/test/flutter_tester_device.dart
+1
-1
flutter_web_platform.dart
...ages/flutter_tools/lib/src/test/flutter_web_platform.dart
+3
-3
web_device.dart
packages/flutter_tools/lib/src/web/web_device.dart
+2
-2
No files found.
packages/flutter_tools/bin/flutter_tools.dart
View file @
f8f69575
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:flutter_tools/executable.dart'
as
executable
;
void
main
(
List
<
String
>
args
)
{
...
...
packages/flutter_tools/bin/fuchsia_asset_builder.dart
View file @
f8f69575
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:args/args.dart'
;
import
'package:flutter_tools/src/asset.dart'
hide
defaultManifestPath
;
import
'package:flutter_tools/src/base/common.dart'
;
...
...
@@ -61,10 +63,10 @@ Future<void> run(List<String> args) async {
Cache
.
flutterRoot
=
globals
.
platform
.
environment
[
'FLUTTER_ROOT'
];
final
String
assetDir
=
argResults
[
_kOptionAsset
]
as
String
;
final
AssetBundle
?
assets
=
await
buildAssets
(
manifestPath:
argResults
[
_kOptionManifest
]
as
String
?
??
defaultManifestPath
,
final
AssetBundle
assets
=
await
buildAssets
(
manifestPath:
argResults
[
_kOptionManifest
]
as
String
??
defaultManifestPath
,
assetDirPath:
assetDir
,
packagesPath:
argResults
[
_kOptionPackages
]
as
String
?
,
packagesPath:
argResults
[
_kOptionPackages
]
as
String
,
targetPlatform:
TargetPlatform
.
fuchsia_arm64
// This is not arch specific.
);
...
...
@@ -82,9 +84,8 @@ Future<void> run(List<String> args) async {
final
String
outputMan
=
argResults
[
_kOptionAssetManifestOut
]
as
String
;
await
writeFuchsiaManifest
(
assets
,
argResults
[
_kOptionAsset
]
as
String
,
outputMan
,
argResults
[
_kOptionComponentName
]
as
String
);
final
String
?
depfilePath
=
argResults
[
_kOptionDepfile
]
as
String
?;
if
(
depfilePath
!=
null
)
{
await
writeDepfile
(
assets
,
outputMan
,
depfilePath
);
if
(
argResults
.
options
.
contains
(
_kOptionDepfile
))
{
await
writeDepfile
(
assets
,
outputMan
,
argResults
[
_kOptionDepfile
]
as
String
);
}
}
...
...
packages/flutter_tools/bin/fuchsia_tester.dart
View file @
f8f69575
...
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:convert'
show
json
;
import
'dart:math'
as
math
;
...
...
@@ -55,6 +57,7 @@ Future<void> run(List<String> args) async {
..
addOption
(
_kOptionTests
,
help:
'Path to json file that maps Dart test files to precompiled dill files'
)
..
addOption
(
_kOptionCoverageDirectory
,
help:
'The path to the directory that will have coverage collected'
)
..
addFlag
(
_kOptionCoverage
,
defaultsTo:
false
,
negatable:
false
,
help:
'Whether to collect coverage information.'
,
)
...
...
@@ -81,7 +84,7 @@ Future<void> run(List<String> args) async {
if
(!
globals
.
fs
.
isDirectorySync
(
sdkRootSrc
.
path
))
{
throwToolExit
(
'Cannot find SDK files at
${sdkRootSrc.path}
'
);
}
Directory
?
coverageDirectory
;
Directory
coverageDirectory
;
final
String
coverageDirectoryPath
=
argResults
[
_kOptionCoverageDirectory
]
as
String
;
if
(
coverageDirectoryPath
!=
null
)
{
if
(!
globals
.
fs
.
isDirectorySync
(
coverageDirectoryPath
))
{
...
...
@@ -92,14 +95,13 @@ Future<void> run(List<String> args) async {
// Put the tester shell where runTests expects it.
// TODO(garymm): Switch to a Fuchsia-specific Artifacts impl.
final
Artifacts
artifacts
=
globals
.
artifacts
!;
final
Link
testerDestLink
=
globals
.
fs
.
link
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterTester
));
globals
.
fs
.
link
(
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
flutterTester
));
testerDestLink
.
parent
.
createSync
(
recursive:
true
);
testerDestLink
.
createSync
(
globals
.
fs
.
path
.
absolute
(
shellPath
));
final
Directory
sdkRootDest
=
globals
.
fs
.
directory
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
));
globals
.
fs
.
directory
(
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
));
sdkRootDest
.
createSync
(
recursive:
true
);
for
(
final
FileSystemEntity
artifact
in
sdkRootSrc
.
listSync
())
{
globals
.
fs
.
link
(
sdkRootDest
.
childFile
(
artifact
.
basename
).
path
).
createSync
(
artifact
.
path
);
...
...
@@ -107,12 +109,12 @@ Future<void> run(List<String> args) async {
// TODO(tvolkert): Remove once flutter_tester no longer looks for this.
globals
.
fs
.
link
(
sdkRootDest
.
childFile
(
'platform.dill'
).
path
).
createSync
(
'platform_strong.dill'
);
Directory
?
testDirectory
;
CoverageCollector
?
collector
;
Directory
testDirectory
;
CoverageCollector
collector
;
if
(
argResults
[
'coverage'
]
as
bool
)
{
// If we have a specified coverage directory then accept all libraries by
// setting libraryNames to null.
final
Set
<
String
>
?
libraryNames
=
coverageDirectory
!=
null
?
null
:
final
Set
<
String
>
libraryNames
=
coverageDirectory
!=
null
?
null
:
<
String
>{
FlutterProject
.
current
().
manifest
.
appName
};
final
String
packagesPath
=
globals
.
fs
.
path
.
normalize
(
globals
.
fs
.
path
.
absolute
(
argResults
[
_kOptionPackages
]
as
String
));
collector
=
CoverageCollector
(
...
...
@@ -160,7 +162,7 @@ Future<void> run(List<String> args) async {
// package (i.e. contains lib/ and test/ sub-dirs). In some cases,
// test files may appear to be in the root directory.
if
(
coverageDirectory
==
null
)
{
globals
.
fs
.
currentDirectory
=
testDirectory
!
.
parent
;
globals
.
fs
.
currentDirectory
=
testDirectory
.
parent
;
}
else
{
globals
.
fs
.
currentDirectory
=
testDirectory
;
}
...
...
packages/flutter_tools/lib/src/isolated/resident_web_runner.dart
View file @
f8f69575
...
...
@@ -521,9 +521,9 @@ class ResidentWebRunner extends ResidentRunner {
})
async
{
if
(
_chromiumLauncher
!=
null
)
{
final
Chromium
chrome
=
await
_chromiumLauncher
!.
connectedInstance
;
final
ChromeTab
?
chromeTab
=
await
chrome
.
chromeConnection
.
getTab
((
ChromeTab
chromeTab
)
{
final
ChromeTab
chromeTab
=
await
(
chrome
.
chromeConnection
.
getTab
((
ChromeTab
chromeTab
)
{
return
!
chromeTab
.
url
.
startsWith
(
'chrome-extension'
);
},
retryFor:
const
Duration
(
seconds:
5
));
},
retryFor:
const
Duration
(
seconds:
5
))
as
FutureOr
<
ChromeTab
>)
;
if
(
chromeTab
==
null
)
{
throwToolExit
(
'Failed to connect to Chrome instance.'
);
}
...
...
packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart
View file @
f8f69575
...
...
@@ -261,14 +261,14 @@ class Placeholder {
if
(
value
==
null
)
{
return
<
OptionalParameter
>[];
}
if
(
value
is
!
Map
<
String
,
Object
?
>)
{
if
(
value
is
!
Map
<
String
,
Object
>)
{
throw
L10nException
(
'The "optionalParameters" value of the "
$name
" placeholder in message '
'
$resourceId
is not a properly formatted Map. Ensure that it is a map '
'with keys that are strings.'
);
}
final
Map
<
String
,
Object
?
>
optionalParameterMap
=
value
;
final
Map
<
String
,
Object
>
optionalParameterMap
=
value
;
return
optionalParameterMap
.
keys
.
map
<
OptionalParameter
>((
String
parameterName
)
{
return
OptionalParameter
(
parameterName
,
optionalParameterMap
[
parameterName
]!);
}).
toList
();
...
...
packages/flutter_tools/lib/src/test/flutter_tester_device.dart
View file @
f8f69575
...
...
@@ -348,7 +348,7 @@ StreamChannel<String> _webSocketToStreamChannel(WebSocket webSocket) {
.
pipe
(
webSocket
);
webSocket
// We're only communicating with string encoded JSON.
.
map
<
String
>((
dynamic
message
)
=>
message
as
String
)
.
map
<
String
?>((
dynamic
message
)
=>
message
as
String
?
)
.
pipe
(
controller
.
local
.
sink
);
return
controller
.
foreign
;
...
...
packages/flutter_tools/lib/src/test/flutter_web_platform.dart
View file @
f8f69575
...
...
@@ -344,7 +344,7 @@ class FlutterWebPlatform extends PlatformPlugin {
Future
<
shelf
.
Response
>
_goldenFileHandler
(
shelf
.
Request
request
)
async
{
if
(
request
.
url
.
path
.
contains
(
'flutter_goldens'
))
{
final
Map
<
String
,
Object
?>
body
=
json
.
decode
(
await
request
.
readAsString
())
as
Map
<
String
,
Object
?
>;
final
Map
<
String
,
Object
>
body
=
json
.
decode
(
await
request
.
readAsString
())
as
Map
<
String
,
Object
>;
final
Uri
goldenKey
=
Uri
.
parse
(
body
[
'key'
]!
as
String
);
final
Uri
testUri
=
Uri
.
parse
(
body
[
'testUri'
]!
as
String
);
final
num
width
=
body
[
'width'
]!
as
num
;
...
...
@@ -352,9 +352,9 @@ class FlutterWebPlatform extends PlatformPlugin {
Uint8List
bytes
;
try
{
final
ChromeTab
chromeTab
=
(
await
_browserManager
!.
_browser
.
chromeConnection
.
getTab
((
ChromeTab
tab
)
{
final
ChromeTab
chromeTab
=
await
(
_browserManager
!.
_browser
.
chromeConnection
.
getTab
((
ChromeTab
tab
)
{
return
tab
.
url
.
contains
(
_browserManager
!.
_browser
.
url
!);
})
)!
;
})
as
FutureOr
<
ChromeTab
>)
;
final
WipConnection
connection
=
await
chromeTab
.
connect
();
final
WipResponse
response
=
await
connection
.
sendCommand
(
'Page.captureScreenshot'
,
<
String
,
Object
>{
// Clip the screenshot to include only the element.
...
...
packages/flutter_tools/lib/src/web/web_device.dart
View file @
f8f69575
...
...
@@ -158,7 +158,7 @@ abstract class ChromiumDevice extends Device {
@override
Future
<
bool
>
stopApp
(
ApplicationPackage
?
app
,
{
ApplicationPackage
app
,
{
String
?
userIdentifier
,
})
async
{
await
_chrome
?.
close
();
...
...
@@ -479,7 +479,7 @@ class WebServerDevice extends Device {
@override
Future
<
bool
>
stopApp
(
ApplicationPackage
?
app
,
{
ApplicationPackage
app
,
{
String
?
userIdentifier
,
})
async
{
return
true
;
...
...
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