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
08576cb6
Unverified
Commit
08576cb6
authored
4 years ago
by
Jonah Williams
Committed by
GitHub
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] HACKTOBERFEST (#67882)
HACKTOBERFEST
parent
8211aaa2
Changes
68
Hide whitespace changes
Inline
Side-by-side
Showing
68 changed files
with
146 additions
and
148 deletions
+146
-148
runner.dart
packages/flutter_tools/lib/runner.dart
+1
-1
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+1
-1
gradle.dart
packages/flutter_tools/lib/src/android/gradle.dart
+2
-2
aot.dart
packages/flutter_tools/lib/src/aot.dart
+2
-2
analyze_size.dart
packages/flutter_tools/lib/src/base/analyze_size.dart
+3
-3
bot_detector.dart
packages/flutter_tools/lib/src/base/bot_detector.dart
+1
-1
command_help.dart
packages/flutter_tools/lib/src/base/command_help.dart
+1
-1
config.dart
packages/flutter_tools/lib/src/base/config.dart
+1
-1
error_handling_io.dart
packages/flutter_tools/lib/src/base/error_handling_io.dart
+3
-3
file_system.dart
packages/flutter_tools/lib/src/base/file_system.dart
+1
-1
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+7
-7
build_system.dart
...ages/flutter_tools/lib/src/build_system/build_system.dart
+4
-4
depfile.dart
packages/flutter_tools/lib/src/build_system/depfile.dart
+1
-1
android.dart
...s/flutter_tools/lib/src/build_system/targets/android.dart
+1
-1
assets.dart
...es/flutter_tools/lib/src/build_system/targets/assets.dart
+1
-1
common.dart
...es/flutter_tools/lib/src/build_system/targets/common.dart
+1
-1
icon_tree_shaker.dart
..._tools/lib/src/build_system/targets/icon_tree_shaker.dart
+5
-5
ios.dart
packages/flutter_tools/lib/src/build_system/targets/ios.dart
+3
-3
localizations.dart
...ter_tools/lib/src/build_system/targets/localizations.dart
+1
-1
web.dart
packages/flutter_tools/lib/src/build_system/targets/web.dart
+3
-3
cache.dart
packages/flutter_tools/lib/src/cache.dart
+2
-2
assemble.dart
packages/flutter_tools/lib/src/commands/assemble.dart
+4
-4
build_bundle.dart
packages/flutter_tools/lib/src/commands/build_bundle.dart
+3
-3
build_ios_framework.dart
...s/flutter_tools/lib/src/commands/build_ios_framework.dart
+1
-1
build_web.dart
packages/flutter_tools/lib/src/commands/build_web.dart
+1
-1
doctor.dart
packages/flutter_tools/lib/src/commands/doctor.dart
+1
-1
downgrade.dart
packages/flutter_tools/lib/src/commands/downgrade.dart
+5
-5
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+2
-2
symbolize.dart
packages/flutter_tools/lib/src/commands/symbolize.dart
+4
-4
update_packages.dart
packages/flutter_tools/lib/src/commands/update_packages.dart
+2
-2
upgrade.dart
packages/flutter_tools/lib/src/commands/upgrade.dart
+3
-3
compile.dart
packages/flutter_tools/lib/src/compile.dart
+1
-1
devfs.dart
packages/flutter_tools/lib/src/devfs.dart
+1
-1
device.dart
packages/flutter_tools/lib/src/device.dart
+7
-7
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+2
-2
emulator.dart
packages/flutter_tools/lib/src/emulator.dart
+1
-1
fuchsia_device.dart
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
+2
-2
fuchsia_kernel_compiler.dart
...lutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart
+2
-2
fuchsia_pm.dart
packages/flutter_tools/lib/src/fuchsia/fuchsia_pm.dart
+1
-1
intellij_validator.dart
...es/flutter_tools/lib/src/intellij/intellij_validator.dart
+3
-3
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+2
-2
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+2
-2
devfs_web.dart
packages/flutter_tools/lib/src/isolated/devfs_web.dart
+4
-4
gen_l10n_types.dart
...s/flutter_tools/lib/src/localizations/gen_l10n_types.dart
+2
-2
localizations_utils.dart
...tter_tools/lib/src/localizations/localizations_utils.dart
+1
-1
cocoapods.dart
packages/flutter_tools/lib/src/macos/cocoapods.dart
+1
-1
macos_device.dart
packages/flutter_tools/lib/src/macos/macos_device.dart
+1
-1
macos_workflow.dart
packages/flutter_tools/lib/src/macos/macos_workflow.dart
+0
-3
platform_plugins.dart
packages/flutter_tools/lib/src/platform_plugins.dart
+1
-1
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+1
-1
project.dart
packages/flutter_tools/lib/src/project.dart
+1
-1
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+2
-2
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+2
-2
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+3
-3
coverage_collector.dart
packages/flutter_tools/lib/src/test/coverage_collector.dart
+1
-1
version.dart
packages/flutter_tools/lib/src/version.dart
+2
-2
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+4
-4
bootstrap.dart
packages/flutter_tools/lib/src/web/bootstrap.dart
+1
-0
chrome.dart
packages/flutter_tools/lib/src/web/chrome.dart
+4
-4
web_validator.dart
packages/flutter_tools/lib/src/web/web_validator.dart
+7
-7
build_windows.dart
packages/flutter_tools/lib/src/windows/build_windows.dart
+1
-1
visual_studio.dart
packages/flutter_tools/lib/src/windows/visual_studio.dart
+4
-4
assemble_test.dart
...ter_tools/test/commands.shard/hermetic/assemble_test.dart
+2
-2
symbolize_test.dart
...er_tools/test/commands.shard/hermetic/symbolize_test.dart
+1
-1
upgrade_test.dart
...ter_tools/test/commands.shard/permeable/upgrade_test.dart
+1
-1
ios_test.dart
...ols/test/general.shard/build_system/targets/ios_test.dart
+1
-1
build_aot_test.dart
...ter_tools/test/general.shard/commands/build_aot_test.dart
+2
-2
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+1
-1
No files found.
packages/flutter_tools/lib/runner.dart
View file @
08576cb6
...
@@ -258,7 +258,7 @@ Future<int> _exit(int code) async {
...
@@ -258,7 +258,7 @@ Future<int> _exit(int code) async {
globals
.
printTrace
(
'exiting with code
$code
'
);
globals
.
printTrace
(
'exiting with code
$code
'
);
exit
(
code
);
exit
(
code
);
completer
.
complete
();
completer
.
complete
();
// This catches all exceptions becau
c
e the error is propagated on the
// This catches all exceptions becau
s
e the error is propagated on the
// completer.
// completer.
}
catch
(
error
,
stackTrace
)
{
// ignore: avoid_catches_without_on_clauses
}
catch
(
error
,
stackTrace
)
{
// ignore: avoid_catches_without_on_clauses
completer
.
completeError
(
error
,
stackTrace
);
completer
.
completeError
(
error
,
stackTrace
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
08576cb6
...
@@ -49,7 +49,7 @@ const Map<String, HardwareType> kKnownHardware = <String, HardwareType>{
...
@@ -49,7 +49,7 @@ const Map<String, HardwareType> kKnownHardware = <String, HardwareType>{
/// A physical Android device or emulator.
/// A physical Android device or emulator.
///
///
/// While [isEmulator] attempts to distinguish between the device categories,
/// While [isEmulator] attempts to distinguish between the device categories,
/// this is a best effort process and not a guarantee; certain phy
is
cal devices
/// this is a best effort process and not a guarantee; certain phy
si
cal devices
/// identify as emulators. These device identifiers may be added to the [kKnownHardware]
/// identify as emulators. These device identifiers may be added to the [kKnownHardware]
/// map to specify that they are actually physical devices.
/// map to specify that they are actually physical devices.
class
AndroidDevice
extends
Device
{
class
AndroidDevice
extends
Device
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/android/gradle.dart
View file @
08576cb6
...
@@ -410,7 +410,7 @@ Future<void> buildGradleApp({
...
@@ -410,7 +410,7 @@ Future<void> buildGradleApp({
if
(
exitCode
!=
0
)
{
if
(
exitCode
!=
0
)
{
if
(
detectedGradleError
==
null
)
{
if
(
detectedGradleError
==
null
)
{
BuildEvent
(
'gradle-unkown-failure'
,
flutterUsage:
globals
.
flutterUsage
).
send
();
BuildEvent
(
'gradle-unk
n
own-failure'
,
flutterUsage:
globals
.
flutterUsage
).
send
();
throwToolExit
(
throwToolExit
(
'Gradle task
$assembleTask
failed with exit code
$exitCode
'
,
'Gradle task
$assembleTask
failed with exit code
$exitCode
'
,
exitCode:
exitCode
,
exitCode:
exitCode
,
...
@@ -608,7 +608,7 @@ Future<void> buildGradleAar({
...
@@ -608,7 +608,7 @@ Future<void> buildGradleAar({
}
}
if
(
buildInfo
.
dartObfuscation
)
{
if
(
buildInfo
.
dartObfuscation
)
{
if
(
buildInfo
.
mode
==
BuildMode
.
debug
||
buildInfo
.
mode
==
BuildMode
.
profile
)
{
if
(
buildInfo
.
mode
==
BuildMode
.
debug
||
buildInfo
.
mode
==
BuildMode
.
profile
)
{
globals
.
printStatus
(
'Dart obfuscation is not supported in
${toTitleCase(buildInfo.friendlyModeName)}
mode, building as unobfuscated.'
);
globals
.
printStatus
(
'Dart obfuscation is not supported in
${toTitleCase(buildInfo.friendlyModeName)}
mode, building as un
-
obfuscated.'
);
}
else
{
}
else
{
command
.
add
(
'-Pdart-obfuscation=true'
);
command
.
add
(
'-Pdart-obfuscation=true'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/aot.dart
View file @
08576cb6
...
@@ -117,10 +117,10 @@ class AotBuilder {
...
@@ -117,10 +117,10 @@ class AotBuilder {
PerformanceMeasurement
aot
;
PerformanceMeasurement
aot
;
if
(
expectSo
)
{
if
(
expectSo
)
{
aot
=
result
.
performance
.
values
.
firstWhere
(
aot
=
result
.
performance
.
values
.
firstWhere
(
(
PerformanceMeasurement
measurement
)
=>
measurement
.
analyicsName
==
'android_aot'
);
(
PerformanceMeasurement
measurement
)
=>
measurement
.
analy
t
icsName
==
'android_aot'
);
}
else
{
}
else
{
aot
=
result
.
performance
.
values
.
firstWhere
(
aot
=
result
.
performance
.
values
.
firstWhere
(
(
PerformanceMeasurement
measurement
)
=>
measurement
.
analyicsName
==
'ios_aot'
);
(
PerformanceMeasurement
measurement
)
=>
measurement
.
analy
t
icsName
==
'ios_aot'
);
}
}
globals
.
printStatus
(
'frontend(CompileTime):
${kernel.elapsedMilliseconds}
ms.'
);
globals
.
printStatus
(
'frontend(CompileTime):
${kernel.elapsedMilliseconds}
ms.'
);
globals
.
printStatus
(
'snapshot(CompileTime):
${aot.elapsedMilliseconds}
ms.'
);
globals
.
printStatus
(
'snapshot(CompileTime):
${aot.elapsedMilliseconds}
ms.'
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/analyze_size.dart
View file @
08576cb6
...
@@ -310,9 +310,9 @@ class SizeAnalyzer {
...
@@ -310,9 +310,9 @@ class SizeAnalyzer {
color
=
TerminalColor
.
yellow
;
color
=
TerminalColor
.
yellow
;
}
}
// Compute any prece
e
ding directories, and compare this to the stored
// Compute any preceding directories, and compare this to the stored
// directorie
d
(in _leadingPaths) for the last entity that was printed. The
// directorie
s
(in _leadingPaths) for the last entity that was printed. The
// similary determines whether or not leading directory information needs to
// similar
l
y determines whether or not leading directory information needs to
// be printed.
// be printed.
final
List
<
String
>
localSegments
=
entityName
.
split
(
'/'
)
final
List
<
String
>
localSegments
=
entityName
.
split
(
'/'
)
..
removeLast
();
..
removeLast
();
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/bot_detector.dart
View file @
08576cb6
...
@@ -108,7 +108,7 @@ class AzureDetector {
...
@@ -108,7 +108,7 @@ class AzureDetector {
request
.
headers
.
add
(
'Metadata'
,
true
);
request
.
headers
.
add
(
'Metadata'
,
true
);
await
request
.
close
();
await
request
.
close
();
}
on
SocketException
{
}
on
SocketException
{
// If there is an error on the socket, it proba
lb
y means that we are not
// If there is an error on the socket, it proba
bl
y means that we are not
// running on Azure.
// running on Azure.
return
_isRunningOnAzure
=
false
;
return
_isRunningOnAzure
=
false
;
}
on
HttpException
{
}
on
HttpException
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/command_help.dart
View file @
08576cb6
...
@@ -270,7 +270,7 @@ class CommandHelpOption {
...
@@ -270,7 +270,7 @@ class CommandHelpOption {
message
.
write
(
''
.
padLeft
(
width
-
parentheticalText
.
length
));
message
.
write
(
''
.
padLeft
(
width
-
parentheticalText
.
length
));
message
.
write
(
_terminal
.
color
(
parentheticalText
,
TerminalColor
.
grey
));
message
.
write
(
_terminal
.
color
(
parentheticalText
,
TerminalColor
.
grey
));
// Terminals seem to require this because we have both bolde
ne
d and colored
// Terminals seem to require this because we have both bolded and colored
// a line. Otherwise the next line comes out bold until a reset bold.
// a line. Otherwise the next line comes out bold until a reset bold.
if
(
_terminal
.
supportsColor
)
{
if
(
_terminal
.
supportsColor
)
{
message
.
write
(
AnsiTerminal
.
resetBold
);
message
.
write
(
AnsiTerminal
.
resetBold
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/config.dart
View file @
08576cb6
...
@@ -84,7 +84,7 @@ class Config {
...
@@ -84,7 +84,7 @@ class Config {
/// Fallback directory in the user's home directory if `XDG_CONFIG_HOME` is
/// Fallback directory in the user's home directory if `XDG_CONFIG_HOME` is
/// not defined.
/// not defined.
static
const
String
kXdgConfigFalback
=
'.config'
;
static
const
String
kXdgConfigFal
l
back
=
'.config'
;
/// The default name for the Flutter config file.
/// The default name for the Flutter config file.
static
const
String
kFlutterSettings
=
'settings'
;
static
const
String
kFlutterSettings
=
'settings'
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/error_handling_io.dart
View file @
08576cb6
...
@@ -28,7 +28,7 @@ import 'platform.dart';
...
@@ -28,7 +28,7 @@ import 'platform.dart';
///
///
/// Cf. If there is some hope that the tool can continue when an operation fails
/// Cf. If there is some hope that the tool can continue when an operation fails
/// with an error, then that error/operation should not be handled here. For
/// with an error, then that error/operation should not be handled here. For
/// example, the tool should ge
r
nerally be able to continue executing even if it
/// example, the tool should generally be able to continue executing even if it
/// fails to delete a file.
/// fails to delete a file.
class
ErrorHandlingFileSystem
extends
ForwardingFileSystem
{
class
ErrorHandlingFileSystem
extends
ForwardingFileSystem
{
ErrorHandlingFileSystem
({
ErrorHandlingFileSystem
({
...
@@ -66,7 +66,7 @@ class ErrorHandlingFileSystem extends ForwardingFileSystem {
...
@@ -66,7 +66,7 @@ class ErrorHandlingFileSystem extends ForwardingFileSystem {
/// Delete the file or directory and return true if it exists, take no
/// Delete the file or directory and return true if it exists, take no
/// action and return false if it does not.
/// action and return false if it does not.
///
///
/// This method should be prefered to checking if it exists and
/// This method should be prefer
r
ed to checking if it exists and
/// then deleting, because it handles the edge case where the file or directory
/// then deleting, because it handles the edge case where the file or directory
/// is deleted by a different program between the two calls.
/// is deleted by a different program between the two calls.
static
bool
deleteIfExists
(
FileSystemEntity
file
,
{
bool
recursive
=
false
})
{
static
bool
deleteIfExists
(
FileSystemEntity
file
,
{
bool
recursive
=
false
})
{
...
@@ -508,7 +508,7 @@ T _runSync<T>(T Function() op, {
...
@@ -508,7 +508,7 @@ T _runSync<T>(T Function() op, {
/// as a [ToolExit] using [throwToolExit].
/// as a [ToolExit] using [throwToolExit].
///
///
/// See also:
/// See also:
/// * [ErrorHandlngFileSystem], for a similar file system strategy.
/// * [ErrorHandl
i
ngFileSystem], for a similar file system strategy.
class
ErrorHandlingProcessManager
extends
ProcessManager
{
class
ErrorHandlingProcessManager
extends
ProcessManager
{
ErrorHandlingProcessManager
({
ErrorHandlingProcessManager
({
@required
ProcessManager
delegate
,
@required
ProcessManager
delegate
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/base/file_system.dart
View file @
08576cb6
...
@@ -180,7 +180,7 @@ class LocalFileSystem extends local_fs.LocalFileSystem {
...
@@ -180,7 +180,7 @@ class LocalFileSystem extends local_fs.LocalFileSystem {
List
<
ProcessSignal
>
fatalSignals
=
Signals
.
defaultExitSignals
,
List
<
ProcessSignal
>
fatalSignals
=
Signals
.
defaultExitSignals
,
})
:
this
.
_
(
signals
,
fatalSignals
);
})
:
this
.
_
(
signals
,
fatalSignals
);
// Unless we're in a test of this class's signal han
ld
ing features, we must
// Unless we're in a test of this class's signal han
dl
ing features, we must
// have only one instance created with the singleton LocalSignals instance
// have only one instance created with the singleton LocalSignals instance
// and the catchable signals it considers to be fatal.
// and the catchable signals it considers to be fatal.
static
LocalFileSystem
_instance
;
static
LocalFileSystem
_instance
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_info.dart
View file @
08576cb6
...
@@ -43,7 +43,7 @@ class BuildInfo {
...
@@ -43,7 +43,7 @@ class BuildInfo {
/// If not provided, defaults to [NullSafetyMode.autodetect].
/// If not provided, defaults to [NullSafetyMode.autodetect].
final
NullSafetyMode
nullSafetyMode
;
final
NullSafetyMode
nullSafetyMode
;
/// Whether the build should sub
d
set icon fonts.
/// Whether the build should subset icon fonts.
final
bool
treeShakeIcons
;
final
bool
treeShakeIcons
;
/// Represents a custom Android product flavor or an Xcode scheme, null for
/// Represents a custom Android product flavor or an Xcode scheme, null for
...
@@ -57,7 +57,7 @@ class BuildInfo {
...
@@ -57,7 +57,7 @@ class BuildInfo {
/// The path to the .packages file to use for compilation.
/// The path to the .packages file to use for compilation.
///
///
/// This is used by package:package_config to locate the actual package_config.json
/// This is used by package:package_config to locate the actual package_config.json
/// file. If not provded, defaults to `.packages`.
/// file. If not prov
i
ded, defaults to `.packages`.
final
String
packagesPath
;
final
String
packagesPath
;
final
List
<
String
>
fileSystemRoots
;
final
List
<
String
>
fileSystemRoots
;
...
@@ -114,7 +114,7 @@ class BuildInfo {
...
@@ -114,7 +114,7 @@ class BuildInfo {
/// rerun tasks.
/// rerun tasks.
final
String
performanceMeasurementFile
;
final
String
performanceMeasurementFile
;
/// If provided, an output directory where one or more v8-style heapsnapshots
/// If provided, an output directory where one or more v8-style heap
snapshots
/// will be written for code size profiling.
/// will be written for code size profiling.
final
String
codeSizeDirectory
;
final
String
codeSizeDirectory
;
...
@@ -152,14 +152,14 @@ class BuildInfo {
...
@@ -152,14 +152,14 @@ class BuildInfo {
String
get
modeName
=>
getModeName
(
mode
);
String
get
modeName
=>
getModeName
(
mode
);
String
get
friendlyModeName
=>
getFriendlyModeName
(
mode
);
String
get
friendlyModeName
=>
getFriendlyModeName
(
mode
);
/// the flavor name in the output files is lowercased (see flutter.gradle),
/// the flavor name in the output files is lower
-
cased (see flutter.gradle),
/// so the lower cased flavor name is used to compute the output file name
/// so the lower cased flavor name is used to compute the output file name
String
get
lowerCasedFlavor
=>
flavor
?.
toLowerCase
();
String
get
lowerCasedFlavor
=>
flavor
?.
toLowerCase
();
/// Convert to a structued string encoded structure appropriate for usage as
/// Convert to a structu
r
ed string encoded structure appropriate for usage as
/// environment variables or to embed in other scripts.
/// environment variables or to embed in other scripts.
///
///
/// Fields that are `null` are excluded from this configration.
/// Fields that are `null` are excluded from this config
u
ration.
Map
<
String
,
String
>
toEnvironmentConfig
()
{
Map
<
String
,
String
>
toEnvironmentConfig
()
{
return
<
String
,
String
>{
return
<
String
,
String
>{
if
(
dartDefines
?.
isNotEmpty
??
false
)
if
(
dartDefines
?.
isNotEmpty
??
false
)
...
@@ -425,7 +425,7 @@ enum TargetPlatform {
...
@@ -425,7 +425,7 @@ enum TargetPlatform {
fuchsia_x64
,
fuchsia_x64
,
tester
,
tester
,
web_javascript
,
web_javascript
,
// The arch specific android target platforms are soft-depre
ac
ted.
// The arch specific android target platforms are soft-depre
ca
ted.
// Instead of using TargetPlatform as a combination arch + platform
// Instead of using TargetPlatform as a combination arch + platform
// the code will be updated to carry arch information in [DarwinArch]
// the code will be updated to carry arch information in [DarwinArch]
// and [AndroidArch].
// and [AndroidArch].
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/build_system.dart
View file @
08576cb6
...
@@ -835,7 +835,7 @@ class _BuildInstance {
...
@@ -835,7 +835,7 @@ class _BuildInstance {
elapsedMilliseconds:
stopwatch
.
elapsedMilliseconds
,
elapsedMilliseconds:
stopwatch
.
elapsedMilliseconds
,
skipped:
skipped
,
skipped:
skipped
,
succeeded:
succeeded
,
succeeded:
succeeded
,
analyicsName:
node
.
target
.
analyticsName
,
analy
t
icsName:
node
.
target
.
analyticsName
,
);
);
}
}
return
succeeded
;
return
succeeded
;
...
@@ -864,14 +864,14 @@ class PerformanceMeasurement {
...
@@ -864,14 +864,14 @@ class PerformanceMeasurement {
@required
this
.
elapsedMilliseconds
,
@required
this
.
elapsedMilliseconds
,
@required
this
.
skipped
,
@required
this
.
skipped
,
@required
this
.
succeeded
,
@required
this
.
succeeded
,
@required
this
.
analyicsName
,
@required
this
.
analy
t
icsName
,
});
});
final
int
elapsedMilliseconds
;
final
int
elapsedMilliseconds
;
final
String
target
;
final
String
target
;
final
bool
skipped
;
final
bool
skipped
;
final
bool
succeeded
;
final
bool
succeeded
;
final
String
analyicsName
;
final
String
analy
t
icsName
;
}
}
/// Check if there are any dependency cycles in the target.
/// Check if there are any dependency cycles in the target.
...
@@ -1062,7 +1062,7 @@ class Node {
...
@@ -1062,7 +1062,7 @@ class Node {
}
}
}
}
// If we depend on a file that doesnt exist on disk, mark the build as
// If we depend on a file that doesn
'
t exist on disk, mark the build as
// dirty. if the rule is not correctly specified, this will result in it
// dirty. if the rule is not correctly specified, this will result in it
// always being rerun.
// always being rerun.
if
(
missingInputs
.
isNotEmpty
)
{
if
(
missingInputs
.
isNotEmpty
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/depfile.dart
View file @
08576cb6
...
@@ -101,7 +101,7 @@ class DepfileService {
...
@@ -101,7 +101,7 @@ class DepfileService {
.
map
<
String
>((
String
path
)
=>
path
.
replaceAllMapped
(
_escapeExpr
,
(
Match
match
)
=>
match
.
group
(
1
)).
trim
())
.
map
<
String
>((
String
path
)
=>
path
.
replaceAllMapped
(
_escapeExpr
,
(
Match
match
)
=>
match
.
group
(
1
)).
trim
())
.
where
((
String
path
)
=>
path
.
isNotEmpty
)
.
where
((
String
path
)
=>
path
.
isNotEmpty
)
// The tool doesn't write duplicates to these lists. This call is an attempt to
// The tool doesn't write duplicates to these lists. This call is an attempt to
// be resil
l
ient to the outputs of other tools which write or user edits to depfiles.
// be resilient to the outputs of other tools which write or user edits to depfiles.
.
toSet
()
.
toSet
()
.
map
(
_fileSystem
.
file
)
.
map
(
_fileSystem
.
file
)
.
toList
();
.
toList
();
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/targets/android.dart
View file @
08576cb6
...
@@ -170,7 +170,7 @@ class AndroidAot extends AotElfBase {
...
@@ -170,7 +170,7 @@ class AndroidAot extends AotElfBase {
/// The selected build mode.
/// The selected build mode.
///
///
/// This is restricted to [BuildMode.profile] or [BuildMode.relese].
/// This is restricted to [BuildMode.profile] or [BuildMode.rele
a
se].
final
BuildMode
buildMode
;
final
BuildMode
buildMode
;
@override
@override
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/targets/assets.dart
View file @
08576cb6
...
@@ -176,7 +176,7 @@ DevFSContent processSkSLBundle(String bundlePath, {
...
@@ -176,7 +176,7 @@ DevFSContent processSkSLBundle(String bundlePath, {
bundle
[
'platform'
]
as
String
);
bundle
[
'platform'
]
as
String
);
if
(
bundleTargetPlatform
!=
targetPlatform
)
{
if
(
bundleTargetPlatform
!=
targetPlatform
)
{
logger
.
printError
(
logger
.
printError
(
'The SkSL bundle was created for
$bundleTargetPlatform
, but the curent '
'The SkSL bundle was created for
$bundleTargetPlatform
, but the cur
r
ent '
'platform is
$targetPlatform
. This may lead to less efficient shader '
'platform is
$targetPlatform
. This may lead to less efficient shader '
'caching.'
'caching.'
);
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/targets/common.dart
View file @
08576cb6
...
@@ -165,7 +165,7 @@ class ReleaseCopyFlutterBundle extends CopyFlutterBundle {
...
@@ -165,7 +165,7 @@ class ReleaseCopyFlutterBundle extends CopyFlutterBundle {
///
///
/// Note that this target depends on the `.dart_tool/package_config.json` file
/// Note that this target depends on the `.dart_tool/package_config.json` file
/// even though it is not listed as an input. Pub inserts a timestamp into
/// even though it is not listed as an input. Pub inserts a timestamp into
/// the file which causes unecessary rebuilds, so instead a subset of the contents
/// the file which causes un
n
ecessary rebuilds, so instead a subset of the contents
/// are used an input instead.
/// are used an input instead.
class
KernelSnapshot
extends
Target
{
class
KernelSnapshot
extends
Target
{
const
KernelSnapshot
();
const
KernelSnapshot
();
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart
View file @
08576cb6
...
@@ -132,7 +132,7 @@ class IconTreeShaker {
...
@@ -132,7 +132,7 @@ class IconTreeShaker {
if
(
fonts
.
length
!=
iconData
.
length
)
{
if
(
fonts
.
length
!=
iconData
.
length
)
{
environment
.
logger
.
printStatus
(
environment
.
logger
.
printStatus
(
'Expected to find fonts for
${iconData.keys}
, but found '
'Expected to find fonts for
${iconData.keys}
, but found '
'
${fonts.keys}
. This usually means you are refering to '
'
${fonts.keys}
. This usually means you are refer
r
ing to '
'font families in an IconData class but not including them '
'font families in an IconData class but not including them '
'in the assets section of your pubspec.yaml, are missing '
'in the assets section of your pubspec.yaml, are missing '
'the package that would include them, or are missing '
'the package that would include them, or are missing '
...
@@ -219,7 +219,7 @@ class IconTreeShaker {
...
@@ -219,7 +219,7 @@ class IconTreeShaker {
return
true
;
return
true
;
}
}
/// Returns a map of { fontFamly: relativePath } pairs.
/// Returns a map of { fontFam
i
ly: relativePath } pairs.
Future
<
Map
<
String
,
String
>>
_parseFontJson
(
Future
<
Map
<
String
,
String
>>
_parseFontJson
(
String
fontManifestData
,
String
fontManifestData
,
Set
<
String
>
families
,
Set
<
String
>
families
,
...
@@ -303,9 +303,9 @@ class IconTreeShaker {
...
@@ -303,9 +303,9 @@ class IconTreeShaker {
return
_parseConstFinderResult
(
constFinderResult
);
return
_parseConstFinderResult
(
constFinderResult
);
}
}
Map
<
String
,
List
<
int
>>
_parseConstFinderResult
(
_ConstFinderResult
consts
)
{
Map
<
String
,
List
<
int
>>
_parseConstFinderResult
(
_ConstFinderResult
const
ant
s
)
{
final
Map
<
String
,
List
<
int
>>
result
=
<
String
,
List
<
int
>>{};
final
Map
<
String
,
List
<
int
>>
result
=
<
String
,
List
<
int
>>{};
for
(
final
Map
<
String
,
dynamic
>
iconDataMap
in
consts
.
constantInstances
)
{
for
(
final
Map
<
String
,
dynamic
>
iconDataMap
in
const
ant
s
.
constantInstances
)
{
if
((
iconDataMap
[
'fontPackage'
]
??
''
)
is
!
String
||
// Null is ok here.
if
((
iconDataMap
[
'fontPackage'
]
??
''
)
is
!
String
||
// Null is ok here.
iconDataMap
[
'fontFamily'
]
is
!
String
||
iconDataMap
[
'fontFamily'
]
is
!
String
||
iconDataMap
[
'codePoint'
]
is
!
num
)
{
iconDataMap
[
'codePoint'
]
is
!
num
)
{
...
@@ -344,7 +344,7 @@ class _ConstFinderResult {
...
@@ -344,7 +344,7 @@ class _ConstFinderResult {
List
<
Map
<
String
,
dynamic
>>
get
nonConstantLocations
{
List
<
Map
<
String
,
dynamic
>>
get
nonConstantLocations
{
_nonConstantLocations
??=
_getList
(
_nonConstantLocations
??=
_getList
(
result
[
'nonConstantLocations'
],
result
[
'nonConstantLocations'
],
'Invalid ConstFinder output: Expected "nonConstLocations" to be a list ofobjects'
,
'Invalid ConstFinder output: Expected "nonConstLocations" to be a list of
objects'
,
);
);
return
_nonConstantLocations
;
return
_nonConstantLocations
;
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/targets/ios.dart
View file @
08576cb6
...
@@ -187,8 +187,8 @@ class AotAssemblyProfile extends AotAssemblyBase {
...
@@ -187,8 +187,8 @@ class AotAssemblyProfile extends AotAssemblyBase {
}
}
/// Create a trivial App.framework file for debug iOS builds.
/// Create a trivial App.framework file for debug iOS builds.
class
DebugUniveralFramework
extends
Target
{
class
DebugUniver
s
alFramework
extends
Target
{
const
DebugUniveralFramework
();
const
DebugUniver
s
alFramework
();
@override
@override
String
get
name
=>
'debug_universal_framework'
;
String
get
name
=>
'debug_universal_framework'
;
...
@@ -375,7 +375,7 @@ class DebugIosApplicationBundle extends IosAssetBundle {
...
@@ -375,7 +375,7 @@ class DebugIosApplicationBundle extends IosAssetBundle {
@override
@override
List
<
Target
>
get
dependencies
=>
<
Target
>[
List
<
Target
>
get
dependencies
=>
<
Target
>[
const
DebugUniveralFramework
(),
const
DebugUniver
s
alFramework
(),
...
super
.
dependencies
,
...
super
.
dependencies
,
];
];
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/targets/localizations.dart
View file @
08576cb6
...
@@ -197,7 +197,7 @@ class LocalizationOptions {
...
@@ -197,7 +197,7 @@ class LocalizationOptions {
/// The `--header-file` argument.
/// The `--header-file` argument.
///
///
/// A file containing the header to prep
r
end to the generated
/// A file containing the header to prepend to the generated
/// Dart localizations.
/// Dart localizations.
final
Uri
headerFile
;
final
Uri
headerFile
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/build_system/targets/web.dart
View file @
08576cb6
...
@@ -37,7 +37,7 @@ const String kDart2jsOptimization = 'Dart2jsOptimization';
...
@@ -37,7 +37,7 @@ const String kDart2jsOptimization = 'Dart2jsOptimization';
const
String
kCspMode
=
'cspMode'
;
const
String
kCspMode
=
'cspMode'
;
/// The caching strategy to use for service worker generation.
/// The caching strategy to use for service worker generation.
const
String
kServiceWorkerStrategy
=
'ServiceWorkerStrat
ge
y'
;
const
String
kServiceWorkerStrategy
=
'ServiceWorkerStrat
eg
y'
;
/// Whether the dart2js build should output source maps.
/// Whether the dart2js build should output source maps.
const
String
kSourceMapsEnabled
=
'SourceMaps'
;
const
String
kSourceMapsEnabled
=
'SourceMaps'
;
...
@@ -55,7 +55,7 @@ const String kOfflineFirst = 'offline-first';
...
@@ -55,7 +55,7 @@ const String kOfflineFirst = 'offline-first';
const
String
kNoneWorker
=
'none'
;
const
String
kNoneWorker
=
'none'
;
/// Convert a [value] into a [ServiceWorkerStrategy].
/// Convert a [value] into a [ServiceWorkerStrategy].
ServiceWorkerStrategy
_serviceWorkerStrategy
f
romString
(
String
value
)
{
ServiceWorkerStrategy
_serviceWorkerStrategy
F
romString
(
String
value
)
{
switch
(
value
)
{
switch
(
value
)
{
case
kNoneWorker:
case
kNoneWorker:
return
ServiceWorkerStrategy
.
none
;
return
ServiceWorkerStrategy
.
none
;
...
@@ -429,7 +429,7 @@ class WebServiceWorker extends Target {
...
@@ -429,7 +429,7 @@ class WebServiceWorker extends Target {
final
File
serviceWorkerFile
=
environment
.
outputDir
final
File
serviceWorkerFile
=
environment
.
outputDir
.
childFile
(
'flutter_service_worker.js'
);
.
childFile
(
'flutter_service_worker.js'
);
final
Depfile
depfile
=
Depfile
(
contents
,
<
File
>[
serviceWorkerFile
]);
final
Depfile
depfile
=
Depfile
(
contents
,
<
File
>[
serviceWorkerFile
]);
final
ServiceWorkerStrategy
serviceWorkerStrategy
=
_serviceWorkerStrategy
f
romString
(
final
ServiceWorkerStrategy
serviceWorkerStrategy
=
_serviceWorkerStrategy
F
romString
(
environment
.
defines
[
kServiceWorkerStrategy
],
environment
.
defines
[
kServiceWorkerStrategy
],
);
);
final
String
serviceWorker
=
generateServiceWorker
(
final
String
serviceWorker
=
generateServiceWorker
(
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/cache.dart
View file @
08576cb6
...
@@ -647,7 +647,7 @@ abstract class CachedArtifact extends ArtifactSet {
...
@@ -647,7 +647,7 @@ abstract class CachedArtifact extends ArtifactSet {
/// Ensures that the source files for all of the dependencies for the
/// Ensures that the source files for all of the dependencies for the
/// flutter_tool are present.
/// flutter_tool are present.
///
///
/// This does not handle cases whe
e
re the source files are modified or the
/// This does not handle cases where the source files are modified or the
/// directory contents are incomplete.
/// directory contents are incomplete.
class
PubDependencies
extends
ArtifactSet
{
class
PubDependencies
extends
ArtifactSet
{
PubDependencies
({
PubDependencies
({
...
@@ -1370,7 +1370,7 @@ class IosUsbArtifacts extends CachedArtifact {
...
@@ -1370,7 +1370,7 @@ class IosUsbArtifacts extends CachedArtifact {
// For unknown reasons, users are getting into bad states where libimobiledevice is
// For unknown reasons, users are getting into bad states where libimobiledevice is
// downloaded but some executables are missing from the zip. The names here are
// downloaded but some executables are missing from the zip. The names here are
// used for additional download checks below, so we can redownload if they are
// used for additional download checks below, so we can re
-
download if they are
// missing.
// missing.
static
const
Map
<
String
,
List
<
String
>>
_kExecutables
=
<
String
,
List
<
String
>>{
static
const
Map
<
String
,
List
<
String
>>
_kExecutables
=
<
String
,
List
<
String
>>{
'libimobiledevice'
:
<
String
>[
'libimobiledevice'
:
<
String
>[
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/assemble.dart
View file @
08576cb6
...
@@ -120,15 +120,15 @@ class AssembleCommand extends FlutterCommand {
...
@@ -120,15 +120,15 @@ class AssembleCommand extends FlutterCommand {
@override
@override
Future
<
Map
<
CustomDimensions
,
String
>>
get
usageValues
async
{
Future
<
Map
<
CustomDimensions
,
String
>>
get
usageValues
async
{
final
FlutterProject
futterProject
=
FlutterProject
.
current
();
final
FlutterProject
f
l
utterProject
=
FlutterProject
.
current
();
if
(
futterProject
==
null
)
{
if
(
f
l
utterProject
==
null
)
{
return
const
<
CustomDimensions
,
String
>{};
return
const
<
CustomDimensions
,
String
>{};
}
}
try
{
try
{
final
Environment
localEnvironment
=
createEnvironment
();
final
Environment
localEnvironment
=
createEnvironment
();
return
<
CustomDimensions
,
String
>{
return
<
CustomDimensions
,
String
>{
CustomDimensions
.
commandBuildBundleTargetPlatform
:
localEnvironment
.
defines
[
'TargetPlatform'
],
CustomDimensions
.
commandBuildBundleTargetPlatform
:
localEnvironment
.
defines
[
'TargetPlatform'
],
CustomDimensions
.
commandBuildBundleIsModule
:
'
${futterProject.isModule}
'
,
CustomDimensions
.
commandBuildBundleIsModule
:
'
${f
l
utterProject.isModule}
'
,
};
};
}
on
Exception
{
}
on
Exception
{
// We've failed to send usage.
// We've failed to send usage.
...
@@ -285,7 +285,7 @@ void writePerformanceData(Iterable<PerformanceMeasurement> measurements, File ou
...
@@ -285,7 +285,7 @@ void writePerformanceData(Iterable<PerformanceMeasurement> measurements, File ou
'targets'
:
<
Object
>[
'targets'
:
<
Object
>[
for
(
final
PerformanceMeasurement
measurement
in
measurements
)
for
(
final
PerformanceMeasurement
measurement
in
measurements
)
<
String
,
Object
>{
<
String
,
Object
>{
'name'
:
measurement
.
analyicsName
,
'name'
:
measurement
.
analy
t
icsName
,
'skipped'
:
measurement
.
skipped
,
'skipped'
:
measurement
.
skipped
,
'succeeded'
:
measurement
.
succeeded
,
'succeeded'
:
measurement
.
succeeded
,
'elapsedMilliseconds'
:
measurement
.
elapsedMilliseconds
,
'elapsedMilliseconds'
:
measurement
.
elapsedMilliseconds
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/build_bundle.dart
View file @
08576cb6
...
@@ -79,13 +79,13 @@ class BuildBundleCommand extends BuildSubCommand {
...
@@ -79,13 +79,13 @@ class BuildBundleCommand extends BuildSubCommand {
@override
@override
Future
<
Map
<
CustomDimensions
,
String
>>
get
usageValues
async
{
Future
<
Map
<
CustomDimensions
,
String
>>
get
usageValues
async
{
final
String
projectDir
=
globals
.
fs
.
file
(
targetFile
).
parent
.
parent
.
path
;
final
String
projectDir
=
globals
.
fs
.
file
(
targetFile
).
parent
.
parent
.
path
;
final
FlutterProject
futterProject
=
FlutterProject
.
fromPath
(
projectDir
);
final
FlutterProject
f
l
utterProject
=
FlutterProject
.
fromPath
(
projectDir
);
if
(
futterProject
==
null
)
{
if
(
f
l
utterProject
==
null
)
{
return
const
<
CustomDimensions
,
String
>{};
return
const
<
CustomDimensions
,
String
>{};
}
}
return
<
CustomDimensions
,
String
>{
return
<
CustomDimensions
,
String
>{
CustomDimensions
.
commandBuildBundleTargetPlatform
:
stringArg
(
'target-platform'
),
CustomDimensions
.
commandBuildBundleTargetPlatform
:
stringArg
(
'target-platform'
),
CustomDimensions
.
commandBuildBundleIsModule
:
'
${futterProject.isModule}
'
,
CustomDimensions
.
commandBuildBundleIsModule
:
'
${f
l
utterProject.isModule}
'
,
};
};
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/build_ios_framework.dart
View file @
08576cb6
...
@@ -82,7 +82,7 @@ class BuildIOSFrameworkCommand extends BuildSubCommand {
...
@@ -82,7 +82,7 @@ class BuildIOSFrameworkCommand extends BuildSubCommand {
help:
'Produce xcframeworks that include all valid architectures (Xcode 11 or later).'
,
help:
'Produce xcframeworks that include all valid architectures (Xcode 11 or later).'
,
)
)
..
addFlag
(
'cocoapods'
,
..
addFlag
(
'cocoapods'
,
help:
'Produce a Flutter.podspec instead of an engine Flutter.framework (recomended if host app uses CocoaPods).'
,
help:
'Produce a Flutter.podspec instead of an engine Flutter.framework (recom
m
ended if host app uses CocoaPods).'
,
)
)
..
addOption
(
'output'
,
..
addOption
(
'output'
,
abbr:
'o'
,
abbr:
'o'
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/build_web.dart
View file @
08576cb6
...
@@ -42,7 +42,7 @@ class BuildWebCommand extends BuildSubCommand {
...
@@ -42,7 +42,7 @@ class BuildWebCommand extends BuildSubCommand {
defaultsTo:
false
,
defaultsTo:
false
,
help:
'Whether to generate a sourcemap file. These can be used by browsers '
help:
'Whether to generate a sourcemap file. These can be used by browsers '
'To view and debug the original source code of a compiled and minified Dart '
'To view and debug the original source code of a compiled and minified Dart '
'application. Defaults to false (no sourcemaps produced).'
'application. Defaults to false (
i.e.
no sourcemaps produced).'
);
);
argParser
.
addOption
(
'pwa-strategy'
,
argParser
.
addOption
(
'pwa-strategy'
,
defaultsTo:
kOfflineFirst
,
defaultsTo:
kOfflineFirst
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/doctor.dart
View file @
08576cb6
...
@@ -27,7 +27,7 @@ class DoctorCommand extends FlutterCommand {
...
@@ -27,7 +27,7 @@ class DoctorCommand extends FlutterCommand {
@override
@override
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
=>
<
DevelopmentArtifact
>{
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
=>
<
DevelopmentArtifact
>{
// This is required because the gradle hostonly tests do not correctly specify
// This is required because the gradle host
-
only tests do not correctly specify
// their dependencies.
// their dependencies.
DevelopmentArtifact
.
androidGenSnapshot
,
DevelopmentArtifact
.
androidGenSnapshot
,
};
};
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/downgrade.dart
View file @
08576cb6
...
@@ -98,9 +98,9 @@ class DowngradeCommand extends FlutterCommand {
...
@@ -98,9 +98,9 @@ class DowngradeCommand extends FlutterCommand {
'to switch to an official channel.'
,
'to switch to an official channel.'
,
);
);
}
}
final
String
lastFlutterVesion
=
_persistentToolState
.
lastActiveVersion
(
channel
);
final
String
lastFlutterVe
r
sion
=
_persistentToolState
.
lastActiveVersion
(
channel
);
final
String
currentFlutterVersion
=
_flutterVersion
.
frameworkRevision
;
final
String
currentFlutterVersion
=
_flutterVersion
.
frameworkRevision
;
if
(
lastFlutterVe
sion
==
null
||
currentFlutterVersion
==
lastFlutterVe
sion
)
{
if
(
lastFlutterVe
rsion
==
null
||
currentFlutterVersion
==
lastFlutterVer
sion
)
{
final
String
trailing
=
await
_createErrorMessage
(
workingDirectory
,
channel
);
final
String
trailing
=
await
_createErrorMessage
(
workingDirectory
,
channel
);
throwToolExit
(
throwToolExit
(
'There is no previously recorded version for channel "
$currentChannel
".
\n
'
'There is no previously recorded version for channel "
$currentChannel
".
\n
'
...
@@ -108,9 +108,9 @@ class DowngradeCommand extends FlutterCommand {
...
@@ -108,9 +108,9 @@ class DowngradeCommand extends FlutterCommand {
);
);
}
}
// Detect unkown versions.
// Detect unk
n
own versions.
final
RunResult
parseResult
=
await
_processUtils
.
run
(<
String
>[
final
RunResult
parseResult
=
await
_processUtils
.
run
(<
String
>[
'git'
,
'describe'
,
'--tags'
,
lastFlutterVesion
,
'git'
,
'describe'
,
'--tags'
,
lastFlutterVe
r
sion
,
],
workingDirectory:
workingDirectory
);
],
workingDirectory:
workingDirectory
);
if
(
parseResult
.
exitCode
!=
0
)
{
if
(
parseResult
.
exitCode
!=
0
)
{
throwToolExit
(
'Failed to parse version for downgrade:
\n
${parseResult.stderr}
'
);
throwToolExit
(
'Failed to parse version for downgrade:
\n
${parseResult.stderr}
'
);
...
@@ -137,7 +137,7 @@ class DowngradeCommand extends FlutterCommand {
...
@@ -137,7 +137,7 @@ class DowngradeCommand extends FlutterCommand {
// so this operation is safe.
// so this operation is safe.
try
{
try
{
await
_processUtils
.
run
(
await
_processUtils
.
run
(
<
String
>[
'git'
,
'reset'
,
'--hard'
,
lastFlutterVesion
],
<
String
>[
'git'
,
'reset'
,
'--hard'
,
lastFlutterVe
r
sion
],
throwOnError:
true
,
throwOnError:
true
,
workingDirectory:
workingDirectory
,
workingDirectory:
workingDirectory
,
);
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/run.dart
View file @
08576cb6
...
@@ -47,7 +47,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
...
@@ -47,7 +47,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
..
addFlag
(
'dump-skp-on-shader-compilation'
,
..
addFlag
(
'dump-skp-on-shader-compilation'
,
negatable:
false
,
negatable:
false
,
help:
'Automatically dump the skp that triggers new shader compilations. '
help:
'Automatically dump the skp that triggers new shader compilations. '
'This is useful for wrting custom ShaderWarmUp to reduce jank. '
'This is useful for wr
i
ting custom ShaderWarmUp to reduce jank. '
'By default, this is not enabled to reduce the overhead. '
'By default, this is not enabled to reduce the overhead. '
'This is only available in profile or debug build. '
,
'This is only available in profile or debug build. '
,
)
)
...
@@ -141,7 +141,7 @@ class RunCommand extends RunCommandBase {
...
@@ -141,7 +141,7 @@ class RunCommand extends RunCommandBase {
help:
'Enable tracing to the endless tracer. This is useful when '
help:
'Enable tracing to the endless tracer. This is useful when '
'recording huge amounts of traces. If we need to use endless buffer to '
'recording huge amounts of traces. If we need to use endless buffer to '
'record startup traces, we can combine the ("--trace-startup"). '
'record startup traces, we can combine the ("--trace-startup"). '
'For ex
e
mple, flutter run --trace-startup --endless-trace-buffer. '
,
'For ex
a
mple, flutter run --trace-startup --endless-trace-buffer. '
,
)
)
..
addFlag
(
'trace-systrace'
,
..
addFlag
(
'trace-systrace'
,
negatable:
false
,
negatable:
false
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/symbolize.dart
View file @
08576cb6
...
@@ -14,10 +14,10 @@ import '../base/io.dart';
...
@@ -14,10 +14,10 @@ import '../base/io.dart';
import
'../convert.dart'
;
import
'../convert.dart'
;
import
'../runner/flutter_command.dart'
;
import
'../runner/flutter_command.dart'
;
/// Support for symboli
cat
ing a Dart stack trace.
/// Support for symboli
z
ing a Dart stack trace.
///
///
/// This command accepts either paths to an input file containing the
/// This command accepts either paths to an input file containing the
/// stack trace and an output file for the symboli
cated
trace to be
/// stack trace and an output file for the symboli
zing
trace to be
/// written, or it accepts a stack trace over stdin and outputs it
/// written, or it accepts a stack trace over stdin and outputs it
/// over stdout.
/// over stdout.
class
SymbolizeCommand
extends
FlutterCommand
{
class
SymbolizeCommand
extends
FlutterCommand
{
...
@@ -43,7 +43,7 @@ class SymbolizeCommand extends FlutterCommand {
...
@@ -43,7 +43,7 @@ class SymbolizeCommand extends FlutterCommand {
argParser
.
addOption
(
argParser
.
addOption
(
'output'
,
'output'
,
abbr:
'o'
,
abbr:
'o'
,
valueHelp:
'A file path for a symboli
cat
ed stack trace to be written to.'
valueHelp:
'A file path for a symboli
z
ed stack trace to be written to.'
);
);
}
}
...
@@ -63,7 +63,7 @@ class SymbolizeCommand extends FlutterCommand {
...
@@ -63,7 +63,7 @@ class SymbolizeCommand extends FlutterCommand {
@override
@override
Future
<
void
>
validateCommand
()
{
Future
<
void
>
validateCommand
()
{
if
(!
argResults
.
wasParsed
(
'debug-info'
))
{
if
(!
argResults
.
wasParsed
(
'debug-info'
))
{
throwToolExit
(
'"--debug-info" is required to symboli
cat
e stack traces.'
);
throwToolExit
(
'"--debug-info" is required to symboli
z
e stack traces.'
);
}
}
if
(!
_fileSystem
.
isFileSync
(
stringArg
(
'debug-info'
)))
{
if
(!
_fileSystem
.
isFileSync
(
stringArg
(
'debug-info'
)))
{
throwToolExit
(
'
${stringArg('debug-info')}
does not exist.'
);
throwToolExit
(
'
${stringArg('debug-info')}
does not exist.'
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/update_packages.dart
View file @
08576cb6
...
@@ -518,7 +518,7 @@ enum DependencyKind {
...
@@ -518,7 +518,7 @@ enum DependencyKind {
// "sdk" dependency in the dependency_overrides section.
// "sdk" dependency in the dependency_overrides section.
overridden
,
overridden
,
// A dep
d
endency that uses git.
// A dependency that uses git.
git
,
git
,
}
}
...
@@ -812,7 +812,7 @@ class PubspecYaml {
...
@@ -812,7 +812,7 @@ class PubspecYaml {
// Since we're in one of the places where we can list dependencies,
// Since we're in one of the places where we can list dependencies,
// remember this as the current last known valid place to insert our
// remember this as the current last known valid place to insert our
// transitive dev dependencies. If the section is for regular dependencies,
// transitive dev dependencies. If the section is for regular dependencies,
// then also remem
e
ber the line for the end of direct dependencies.
// then also remember the line for the end of direct dependencies.
if
(
section
==
Section
.
dependencies
)
{
if
(
section
==
Section
.
dependencies
)
{
endOfDirectDependencies
=
output
.
length
;
endOfDirectDependencies
=
output
.
length
;
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/upgrade.dart
View file @
08576cb6
...
@@ -37,7 +37,7 @@ class UpgradeCommand extends FlutterCommand {
...
@@ -37,7 +37,7 @@ class UpgradeCommand extends FlutterCommand {
..
addOption
(
..
addOption
(
'working-directory'
,
'working-directory'
,
hide:
true
,
hide:
true
,
help:
'Override the upgrade working directoy for integration testing.'
help:
'Override the upgrade working directo
r
y for integration testing.'
);
);
}
}
...
@@ -124,7 +124,7 @@ class UpgradeCommandRunner {
...
@@ -124,7 +124,7 @@ class UpgradeCommandRunner {
}
}
// If there are uncommitted changes we might be on the right commit but
// If there are uncommitted changes we might be on the right commit but
// we should still warn.
// we should still warn.
if
(!
force
&&
await
hasUncomittedChanges
())
{
if
(!
force
&&
await
hasUncom
m
ittedChanges
())
{
throwToolExit
(
throwToolExit
(
'Your flutter checkout has local changes that would be erased by '
'Your flutter checkout has local changes that would be erased by '
'upgrading. If you want to keep these changes, it is recommended that '
'upgrading. If you want to keep these changes, it is recommended that '
...
@@ -178,7 +178,7 @@ class UpgradeCommandRunner {
...
@@ -178,7 +178,7 @@ class UpgradeCommandRunner {
globals
.
persistentToolState
.
redisplayWelcomeMessage
=
true
;
globals
.
persistentToolState
.
redisplayWelcomeMessage
=
true
;
}
}
Future
<
bool
>
hasUncomittedChanges
()
async
{
Future
<
bool
>
hasUncom
m
ittedChanges
()
async
{
try
{
try
{
final
RunResult
result
=
await
processUtils
.
run
(
final
RunResult
result
=
await
processUtils
.
run
(
<
String
>[
'git'
,
'status'
,
'-s'
],
<
String
>[
'git'
,
'status'
,
'-s'
],
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/compile.dart
View file @
08576cb6
...
@@ -866,7 +866,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
...
@@ -866,7 +866,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
}
}
}
}
/// Convert a file URI into a multiroot scheme URI if provided, otherwise
/// Convert a file URI into a multi
-
root scheme URI if provided, otherwise
/// return unmodified.
/// return unmodified.
@visibleForTesting
@visibleForTesting
String
toMultiRootPath
(
Uri
fileUri
,
String
scheme
,
List
<
String
>
fileSystemRoots
,
bool
windows
)
{
String
toMultiRootPath
(
Uri
fileUri
,
String
scheme
,
List
<
String
>
fileSystemRoots
,
bool
windows
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/devfs.dart
View file @
08576cb6
...
@@ -242,7 +242,7 @@ class _DevFSHttpWriter implements DevFSWriter {
...
@@ -242,7 +242,7 @@ class _DevFSHttpWriter implements DevFSWriter {
final
String
fsName
;
final
String
fsName
;
final
Uri
httpAddress
;
final
Uri
httpAddress
;
// 3 was chosen to try to limit the vari
e
nce in the time it takes to execute
// 3 was chosen to try to limit the vari
a
nce in the time it takes to execute
// `await request.close()` since there is a known bug in Dart where it doesn't
// `await request.close()` since there is a known bug in Dart where it doesn't
// always return a status code in response to a PUT request:
// always return a status code in response to a PUT request:
// https://github.com/dart-lang/sdk/issues/43525.
// https://github.com/dart-lang/sdk/issues/43525.
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/device.dart
View file @
08576cb6
...
@@ -81,7 +81,7 @@ class PlatformType {
...
@@ -81,7 +81,7 @@ class PlatformType {
String
toString
()
=>
value
;
String
toString
()
=>
value
;
}
}
/// A disovery mechanism for flutter-supported development devices.
/// A dis
c
overy mechanism for flutter-supported development devices.
abstract
class
DeviceManager
{
abstract
class
DeviceManager
{
DeviceManager
({
DeviceManager
({
@required
Logger
logger
,
@required
Logger
logger
,
...
@@ -238,7 +238,7 @@ abstract class DeviceManager {
...
@@ -238,7 +238,7 @@ abstract class DeviceManager {
// Always remove web and fuchsia devices from `--all`. This setting
// Always remove web and fuchsia devices from `--all`. This setting
// currently requires devices to share a frontend_server and resident
// currently requires devices to share a frontend_server and resident
// runn
n
er instance. Both web and fuchsia require differently configured
// runner instance. Both web and fuchsia require differently configured
// compilers, and web requires an entirely different resident runner.
// compilers, and web requires an entirely different resident runner.
if
(
hasSpecifiedAllDevices
)
{
if
(
hasSpecifiedAllDevices
)
{
devices
=
<
Device
>[
devices
=
<
Device
>[
...
@@ -270,7 +270,7 @@ abstract class DeviceManager {
...
@@ -270,7 +270,7 @@ abstract class DeviceManager {
// If there are still multiple devices and the user did not specify to run
// If there are still multiple devices and the user did not specify to run
// all, then attempt to prioritize ephemeral devices. For example, if the
// all, then attempt to prioritize ephemeral devices. For example, if the
// user only typed 'flutter run' and both an Android device and desktop
// user only typed 'flutter run' and both an Android device and desktop
// device are avail
i
ble, choose the Android device.
// device are avail
a
ble, choose the Android device.
if
(
devices
.
length
>
1
&&
!
hasSpecifiedAllDevices
)
{
if
(
devices
.
length
>
1
&&
!
hasSpecifiedAllDevices
)
{
// Note: ephemeral is nullable for device types where this is not well
// Note: ephemeral is nullable for device types where this is not well
// defined.
// defined.
...
@@ -626,7 +626,7 @@ abstract class Device {
...
@@ -626,7 +626,7 @@ abstract class Device {
/// Create a platform-specific [DevFSWriter] for the given [app], or
/// Create a platform-specific [DevFSWriter] for the given [app], or
/// null if the device does not support them.
/// null if the device does not support them.
///
///
/// For example, the des
tk
op device classes can use a writer which
/// For example, the des
kt
op device classes can use a writer which
/// copies the files across the local file system.
/// copies the files across the local file system.
DevFSWriter
createDevFSWriter
(
DevFSWriter
createDevFSWriter
(
covariant
ApplicationPackage
app
,
covariant
ApplicationPackage
app
,
...
@@ -685,7 +685,7 @@ abstract class Device {
...
@@ -685,7 +685,7 @@ abstract class Device {
bool
get
supportsHotRestart
=>
true
;
bool
get
supportsHotRestart
=>
true
;
/// Whether flutter applications running on this device can be terminated
/// Whether flutter applications running on this device can be terminated
/// from the
vms
ervice.
/// from the
VM S
ervice.
bool
get
supportsFlutterExit
=>
true
;
bool
get
supportsFlutterExit
=>
true
;
/// Whether the device supports taking screenshots of a running flutter
/// Whether the device supports taking screenshots of a running flutter
...
@@ -938,7 +938,7 @@ class DebuggingOptions {
...
@@ -938,7 +938,7 @@ class DebuggingOptions {
/// Enable expression evaluation for web target.
/// Enable expression evaluation for web target.
final
bool
webEnableExpressionEvaluation
;
final
bool
webEnableExpressionEvaluation
;
/// A file where the
vms
ervice URL should be written after the application is started.
/// A file where the
VM S
ervice URL should be written after the application is started.
final
String
vmserviceOutFile
;
final
String
vmserviceOutFile
;
final
bool
fastStart
;
final
bool
fastStart
;
...
@@ -1053,7 +1053,7 @@ class NoOpDeviceLogReader implements DeviceLogReader {
...
@@ -1053,7 +1053,7 @@ class NoOpDeviceLogReader implements DeviceLogReader {
void
dispose
()
{
}
void
dispose
()
{
}
}
}
// A portforwarder which does not support forwarding ports.
// A port
forwarder which does not support forwarding ports.
class
NoOpDevicePortForwarder
implements
DevicePortForwarder
{
class
NoOpDevicePortForwarder
implements
DevicePortForwarder
{
const
NoOpDevicePortForwarder
();
const
NoOpDevicePortForwarder
();
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/doctor.dart
View file @
08576cb6
...
@@ -596,7 +596,7 @@ class ValidationResult {
...
@@ -596,7 +596,7 @@ class ValidationResult {
/// on the cause and/or solution to the validation failure.
/// on the cause and/or solution to the validation failure.
@immutable
@immutable
class
ValidationMessage
{
class
ValidationMessage
{
/// Create a validation message with information for a passing validat
i
or.
/// Create a validation message with information for a passing validator.
///
///
/// By default this is not displayed unless the doctor is run in
/// By default this is not displayed unless the doctor is run in
/// verbose mode.
/// verbose mode.
...
@@ -663,7 +663,7 @@ class ValidationMessage {
...
@@ -663,7 +663,7 @@ class ValidationMessage {
int
get
hashCode
=>
type
.
hashCode
^
message
.
hashCode
^
contextUrl
.
hashCode
;
int
get
hashCode
=>
type
.
hashCode
^
message
.
hashCode
^
contextUrl
.
hashCode
;
}
}
/// A validator that checks the version of Flutter, as well as some auxil
l
ary information
/// A validator that checks the version of Flutter, as well as some auxil
i
ary information
/// such as the pub or Flutter cache overrides.
/// such as the pub or Flutter cache overrides.
///
///
/// This is primarily useful for diagnosing issues on Github bug reports by displaying
/// This is primarily useful for diagnosing issues on Github bug reports by displaying
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/emulator.dart
View file @
08576cb6
...
@@ -237,7 +237,7 @@ abstract class EmulatorDiscovery {
...
@@ -237,7 +237,7 @@ abstract class EmulatorDiscovery {
/// Whether this emulator discovery is capable of listing any emulators.
/// Whether this emulator discovery is capable of listing any emulators.
bool
get
canListAnything
;
bool
get
canListAnything
;
/// Whether this emulator discovery is capab
a
le of launching new emulators.
/// Whether this emulator discovery is capable of launching new emulators.
bool
get
canLaunchAnything
;
bool
get
canLaunchAnything
;
Future
<
List
<
Emulator
>>
get
emulators
;
Future
<
List
<
Emulator
>>
get
emulators
;
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
View file @
08576cb6
...
@@ -320,7 +320,7 @@ class FuchsiaDevice extends Device {
...
@@ -320,7 +320,7 @@ class FuchsiaDevice extends Device {
}
}
packageRepo
.
createSync
(
recursive:
true
);
packageRepo
.
createSync
(
recursive:
true
);
}
on
Exception
catch
(
e
)
{
}
on
Exception
catch
(
e
)
{
globals
.
printError
(
'Failed to create Fuch
is
a package repo directory '
globals
.
printError
(
'Failed to create Fuch
si
a package repo directory '
'at
${packageRepo.path}
:
$e
'
);
'at
${packageRepo.path}
:
$e
'
);
return
LaunchResult
.
failed
();
return
LaunchResult
.
failed
();
}
}
...
@@ -440,7 +440,7 @@ class FuchsiaDevice extends Device {
...
@@ -440,7 +440,7 @@ class FuchsiaDevice extends Device {
}
}
if
(
debuggingOptions
.
buildInfo
.
mode
.
isRelease
)
{
if
(
debuggingOptions
.
buildInfo
.
mode
.
isRelease
)
{
globals
.
printTrace
(
'App succesfully started in a release mode.'
);
globals
.
printTrace
(
'App succes
s
fully started in a release mode.'
);
return
LaunchResult
.
succeeded
();
return
LaunchResult
.
succeeded
();
}
}
globals
.
printTrace
(
'App started in a non-release mode. Setting up vmservice connection.'
);
globals
.
printTrace
(
'App started in a non-release mode. Setting up vmservice connection.'
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart
View file @
08576cb6
...
@@ -38,7 +38,7 @@ class FuchsiaKernelCompiler {
...
@@ -38,7 +38,7 @@ class FuchsiaKernelCompiler {
mode:
buildInfo
.
mode
,
mode:
buildInfo
.
mode
,
);
);
if
(!
globals
.
fs
.
isFileSync
(
kernelCompiler
))
{
if
(!
globals
.
fs
.
isFileSync
(
kernelCompiler
))
{
throwToolExit
(
'Fuch
is
a kernel compiler not found at "
$kernelCompiler
"'
);
throwToolExit
(
'Fuch
si
a kernel compiler not found at "
$kernelCompiler
"'
);
}
}
final
String
platformDill
=
globals
.
artifacts
.
getArtifactPath
(
final
String
platformDill
=
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
platformKernelDill
,
Artifact
.
platformKernelDill
,
...
@@ -46,7 +46,7 @@ class FuchsiaKernelCompiler {
...
@@ -46,7 +46,7 @@ class FuchsiaKernelCompiler {
mode:
buildInfo
.
mode
,
mode:
buildInfo
.
mode
,
);
);
if
(!
globals
.
fs
.
isFileSync
(
platformDill
))
{
if
(!
globals
.
fs
.
isFileSync
(
platformDill
))
{
throwToolExit
(
'Fuch
is
a platform file not found at "
$platformDill
"'
);
throwToolExit
(
'Fuch
si
a platform file not found at "
$platformDill
"'
);
}
}
List
<
String
>
flags
=
<
String
>[
List
<
String
>
flags
=
<
String
>[
'--target'
,
'flutter_runner'
,
'--target'
,
'flutter_runner'
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/fuchsia/fuchsia_pm.dart
View file @
08576cb6
...
@@ -76,7 +76,7 @@ class FuchsiaPM {
...
@@ -76,7 +76,7 @@ class FuchsiaPM {
/// When successful, creates a file `app_name-0.far` under [buildPath], which
/// When successful, creates a file `app_name-0.far` under [buildPath], which
/// is the Fuchsia package.
/// is the Fuchsia package.
///
///
/// [buildPath] should be the same path passed to [init], and [man
fi
estPath]
/// [buildPath] should be the same path passed to [init], and [man
if
estPath]
/// should be the same manifest passed to [build].
/// should be the same manifest passed to [build].
Future
<
bool
>
archive
(
String
buildPath
,
String
keyPath
,
String
manifestPath
)
{
Future
<
bool
>
archive
(
String
buildPath
,
String
keyPath
,
String
manifestPath
)
{
return
_runPMCommand
(<
String
>[
return
_runPMCommand
(<
String
>[
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/intellij/intellij_validator.dart
View file @
08576cb6
...
@@ -251,9 +251,9 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
...
@@ -251,9 +251,9 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
for
(
final
Directory
dir
in
installDirs
)
{
for
(
final
Directory
dir
in
installDirs
)
{
checkForIntelliJ
(
dir
);
checkForIntelliJ
(
dir
);
if
(!
dir
.
path
.
endsWith
(
'.app'
))
{
if
(!
dir
.
path
.
endsWith
(
'.app'
))
{
for
(
final
FileSystemEntity
subdir
in
dir
.
listSync
())
{
for
(
final
FileSystemEntity
subdir
ectory
in
dir
.
listSync
())
{
if
(
subdir
is
Directory
)
{
if
(
subdir
ectory
is
Directory
)
{
checkForIntelliJ
(
subdir
);
checkForIntelliJ
(
subdir
ectory
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/ios/devices.dart
View file @
08576cb6
...
@@ -887,7 +887,7 @@ class IOSDevicePortForwarder extends DevicePortForwarder {
...
@@ -887,7 +887,7 @@ class IOSDevicePortForwarder extends DevicePortForwarder {
while
(!
connected
)
{
while
(!
connected
)
{
_logger
.
printTrace
(
'Attempting to forward device port
$devicePort
to host port
$hostPort
'
);
_logger
.
printTrace
(
'Attempting to forward device port
$devicePort
to host port
$hostPort
'
);
process
=
await
_iproxy
.
forward
(
devicePort
,
hostPort
,
_id
);
process
=
await
_iproxy
.
forward
(
devicePort
,
hostPort
,
_id
);
// TODO(ianh): This is a flak
e
y race condition, https://github.com/libimobiledevice/libimobiledevice/issues/674
// TODO(ianh): This is a flaky race condition, https://github.com/libimobiledevice/libimobiledevice/issues/674
connected
=
!
await
process
.
stdout
.
isEmpty
.
timeout
(
_kiProxyPortForwardTimeout
,
onTimeout:
()
=>
false
);
connected
=
!
await
process
.
stdout
.
isEmpty
.
timeout
(
_kiProxyPortForwardTimeout
,
onTimeout:
()
=>
false
);
if
(!
connected
)
{
if
(!
connected
)
{
process
.
kill
();
process
.
kill
();
...
@@ -919,7 +919,7 @@ class IOSDevicePortForwarder extends DevicePortForwarder {
...
@@ -919,7 +919,7 @@ class IOSDevicePortForwarder extends DevicePortForwarder {
return
;
return
;
}
}
_logger
.
printTrace
(
'Unforwarding port
$forwardedPort
'
);
_logger
.
printTrace
(
'Un
-
forwarding port
$forwardedPort
'
);
forwardedPort
.
dispose
();
forwardedPort
.
dispose
();
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
08576cb6
...
@@ -502,7 +502,7 @@ class XcodeProjectInfo {
...
@@ -502,7 +502,7 @@ class XcodeProjectInfo {
/// Checks whether the [buildConfigurations] contains the specified string, without
/// Checks whether the [buildConfigurations] contains the specified string, without
/// regard to case.
/// regard to case.
bool
hasBuildConfiguratinForBuildMode
(
String
buildMode
)
{
bool
hasBuildConfigurati
o
nForBuildMode
(
String
buildMode
)
{
buildMode
=
buildMode
.
toLowerCase
();
buildMode
=
buildMode
.
toLowerCase
();
for
(
final
String
name
in
buildConfigurations
)
{
for
(
final
String
name
in
buildConfigurations
)
{
if
(
name
.
toLowerCase
()
==
buildMode
)
{
if
(
name
.
toLowerCase
()
==
buildMode
)
{
...
@@ -537,7 +537,7 @@ class XcodeProjectInfo {
...
@@ -537,7 +537,7 @@ class XcodeProjectInfo {
/// null, if there is no unique best match.
/// null, if there is no unique best match.
String
buildConfigurationFor
(
BuildInfo
buildInfo
,
String
scheme
)
{
String
buildConfigurationFor
(
BuildInfo
buildInfo
,
String
scheme
)
{
final
String
expectedConfiguration
=
expectedBuildConfigurationFor
(
buildInfo
,
scheme
);
final
String
expectedConfiguration
=
expectedBuildConfigurationFor
(
buildInfo
,
scheme
);
if
(
hasBuildConfiguratinForBuildMode
(
expectedConfiguration
))
{
if
(
hasBuildConfigurati
o
nForBuildMode
(
expectedConfiguration
))
{
return
expectedConfiguration
;
return
expectedConfiguration
;
}
}
final
String
baseConfiguration
=
_baseConfigurationFor
(
buildInfo
);
final
String
baseConfiguration
=
_baseConfigurationFor
(
buildInfo
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/isolated/devfs_web.dart
View file @
08576cb6
...
@@ -431,7 +431,7 @@ class WebAssetServer implements AssetReader {
...
@@ -431,7 +431,7 @@ class WebAssetServer implements AssetReader {
final
int
length
=
file
.
lengthSync
();
final
int
length
=
file
.
lengthSync
();
// Attempt to determine the file's mime type. if this is not provided some
// Attempt to determine the file's mime type. if this is not provided some
// browsers will refuse to render images/show video et
cetera
. If the tool
// browsers will refuse to render images/show video et
c
. If the tool
// cannot determine a mime type, fall back to application/octet-stream.
// cannot determine a mime type, fall back to application/octet-stream.
String
mimeType
;
String
mimeType
;
if
(
length
>=
12
)
{
if
(
length
>=
12
)
{
...
@@ -544,7 +544,7 @@ class WebAssetServer implements AssetReader {
...
@@ -544,7 +544,7 @@ class WebAssetServer implements AssetReader {
return
modules
;
return
modules
;
}
}
/// Whether to use the cavaskit SDK for rendering.
/// Whether to use the ca
n
vaskit SDK for rendering.
bool
canvasKitRendering
=
false
;
bool
canvasKitRendering
=
false
;
shelf
.
Response
_serveIndex
()
{
shelf
.
Response
_serveIndex
()
{
...
@@ -864,9 +864,9 @@ class WebDevFS implements DevFS {
...
@@ -864,9 +864,9 @@ class WebDevFS implements DevFS {
}
}
// The tool generates an entrypoint file in a temp directory to handle
// The tool generates an entrypoint file in a temp directory to handle
// the web specific boot
r
strap logic. To make it easier for DWDS to handle
// the web specific bootstrap logic. To make it easier for DWDS to handle
// mapping the file name, this is done via an additional file root and
// mapping the file name, this is done via an additional file root and
// speci
ci
al hard-coded scheme.
// special hard-coded scheme.
final
CompilerOutput
compilerOutput
=
await
generator
.
recompile
(
final
CompilerOutput
compilerOutput
=
await
generator
.
recompile
(
Uri
(
Uri
(
scheme:
'org-dartlang-app'
,
scheme:
'org-dartlang-app'
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart
View file @
08576cb6
...
@@ -104,7 +104,7 @@ const Set<String> _validNumberFormats = <String>{
...
@@ -104,7 +104,7 @@ const Set<String> _validNumberFormats = <String>{
// The names of the NumberFormat factory constructors which have named
// The names of the NumberFormat factory constructors which have named
// parameters rather than positional parameters.
// parameters rather than positional parameters.
//
//
// This helps the tool correctly generate number form
m
atting code correctly.
// This helps the tool correctly generate number formatting code correctly.
//
//
// Example of code that uses named parameters:
// Example of code that uses named parameters:
// final NumberFormat format = NumberFormat.compact(
// final NumberFormat format = NumberFormat.compact(
...
@@ -176,7 +176,7 @@ class OptionalParameter {
...
@@ -176,7 +176,7 @@ class OptionalParameter {
// Each placeholder can optionally specify a valid Dart type. If the type
// Each placeholder can optionally specify a valid Dart type. If the type
// is NumberFormat or DateFormat then a format which matches one of the
// is NumberFormat or DateFormat then a format which matches one of the
// type's factory constructors can also be specified. In this example the
// type's factory constructors can also be specified. In this example the
// date placeholder is to be formated with DateFormat.yMMMMd:
// date placeholder is to be format
t
ed with DateFormat.yMMMMd:
//
//
// "helloWorldOn": "Hello World on {date}",
// "helloWorldOn": "Hello World on {date}",
// "@helloWorldOn": {
// "@helloWorldOn": {
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/localizations/localizations_utils.dart
View file @
08576cb6
...
@@ -238,7 +238,7 @@ String describeLocale(String tag) {
...
@@ -238,7 +238,7 @@ String describeLocale(String tag) {
return
output
;
return
output
;
}
}
/// Return the input string as a Dart-pars
e
able string.
/// Return the input string as a Dart-parsable string.
///
///
/// ```
/// ```
/// foo => 'foo'
/// foo => 'foo'
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/macos/cocoapods.dart
View file @
08576cb6
...
@@ -67,7 +67,7 @@ enum CocoaPodsStatus {
...
@@ -67,7 +67,7 @@ enum CocoaPodsStatus {
brokenInstall
,
brokenInstall
,
}
}
/// Cocoapods is a depenency management solution for iOS and macOS applications.
/// Cocoapods is a depen
d
ency management solution for iOS and macOS applications.
///
///
/// Cocoapods is generally installed via ruby gems and interacted with via
/// Cocoapods is generally installed via ruby gems and interacted with via
/// the `pod` CLI command.
/// the `pod` CLI command.
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/macos/macos_device.dart
View file @
08576cb6
...
@@ -77,7 +77,7 @@ class MacOSDevice extends DesktopDevice {
...
@@ -77,7 +77,7 @@ class MacOSDevice extends DesktopDevice {
void
onAttached
(
covariant
MacOSApp
package
,
BuildMode
buildMode
,
Process
process
)
{
void
onAttached
(
covariant
MacOSApp
package
,
BuildMode
buildMode
,
Process
process
)
{
// Bring app to foreground. Ideally this would be done post-launch rather
// Bring app to foreground. Ideally this would be done post-launch rather
// than post-attach, since this won't run for release builds, but there's
// than post-attach, since this won't run for release builds, but there's
// no general-purpose way of knowing when a process is far enoug along in
// no general-purpose way of knowing when a process is far enoug
h
along in
// the launch process for 'open' to foreground it.
// the launch process for 'open' to foreground it.
_processManager
.
run
(<
String
>[
_processManager
.
run
(<
String
>[
'open'
,
package
.
applicationBundle
(
buildMode
),
'open'
,
package
.
applicationBundle
(
buildMode
),
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/macos/macos_workflow.dart
View file @
08576cb6
...
@@ -10,9 +10,6 @@ import '../features.dart';
...
@@ -10,9 +10,6 @@ import '../features.dart';
/// The macOS-specific implementation of a [Workflow].
/// The macOS-specific implementation of a [Workflow].
///
/// This workflow requires the flutter-desktop-embedding as a sibling
/// repository to the flutter repo.
class
MacOSWorkflow
implements
Workflow
{
class
MacOSWorkflow
implements
Workflow
{
const
MacOSWorkflow
({
const
MacOSWorkflow
({
@required
Platform
platform
,
@required
Platform
platform
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/platform_plugins.dart
View file @
08576cb6
...
@@ -14,7 +14,7 @@ const String kPluginClass = 'pluginClass';
...
@@ -14,7 +14,7 @@ const String kPluginClass = 'pluginClass';
/// Constant for 'pluginClass' key in plugin maps.
/// Constant for 'pluginClass' key in plugin maps.
const
String
kDartPluginClass
=
'dartPluginClass'
;
const
String
kDartPluginClass
=
'dartPluginClass'
;
/// Marker interface for all platform specific plugin config impls.
/// Marker interface for all platform specific plugin config impl
ementation
s.
abstract
class
PluginPlatform
{
abstract
class
PluginPlatform
{
const
PluginPlatform
();
const
PluginPlatform
();
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/plugins.dart
View file @
08576cb6
...
@@ -937,7 +937,7 @@ Future<void> _writeIOSPluginRegistrant(FlutterProject project, List<Plugin> plug
...
@@ -937,7 +937,7 @@ Future<void> _writeIOSPluginRegistrant(FlutterProject project, List<Plugin> plug
/// that file, rather than the generated file.
/// that file, rather than the generated file.
String
_cmakeRelativePluginSymlinkDirectoryPath
(
CmakeBasedProject
project
)
{
String
_cmakeRelativePluginSymlinkDirectoryPath
(
CmakeBasedProject
project
)
{
final
String
makefileDirPath
=
project
.
cmakeFile
.
parent
.
absolute
.
path
;
final
String
makefileDirPath
=
project
.
cmakeFile
.
parent
.
absolute
.
path
;
// CMake alway uses posix-style path separators, regardless of the platform.
// CMake alway
s
uses posix-style path separators, regardless of the platform.
final
path
.
Context
cmakePathContext
=
path
.
Context
(
style:
path
.
Style
.
posix
);
final
path
.
Context
cmakePathContext
=
path
.
Context
(
style:
path
.
Style
.
posix
);
final
List
<
String
>
relativePathComponents
=
globals
.
fs
.
path
.
split
(
globals
.
fs
.
path
.
relative
(
final
List
<
String
>
relativePathComponents
=
globals
.
fs
.
path
.
split
(
globals
.
fs
.
path
.
relative
(
project
.
pluginSymlinkDirectory
.
absolute
.
path
,
project
.
pluginSymlinkDirectory
.
absolute
.
path
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/project.dart
View file @
08576cb6
...
@@ -343,7 +343,7 @@ abstract class CmakeBasedProject {
...
@@ -343,7 +343,7 @@ abstract class CmakeBasedProject {
/// the build.
/// the build.
File
get
generatedCmakeConfigFile
;
File
get
generatedCmakeConfigFile
;
/// Includ
able
CMake with rules and variables for plugin builds.
/// Includ
ed
CMake with rules and variables for plugin builds.
File
get
generatedPluginCmakeFile
;
File
get
generatedPluginCmakeFile
;
/// The directory to write plugin symlinks.
/// The directory to write plugin symlinks.
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/resident_runner.dart
View file @
08576cb6
...
@@ -328,7 +328,7 @@ class FlutterDevice {
...
@@ -328,7 +328,7 @@ class FlutterDevice {
return
vmService
.
onDone
return
vmService
.
onDone
.
catchError
((
dynamic
error
,
StackTrace
stackTrace
)
{
.
catchError
((
dynamic
error
,
StackTrace
stackTrace
)
{
globals
.
logger
.
printError
(
globals
.
logger
.
printError
(
'unhan
ld
ed error waiting for vm service exit:
\n
$error
'
,
'unhan
dl
ed error waiting for vm service exit:
\n
$error
'
,
stackTrace:
stackTrace
,
stackTrace:
stackTrace
,
);
);
})
})
...
@@ -1083,7 +1083,7 @@ abstract class ResidentRunner {
...
@@ -1083,7 +1083,7 @@ abstract class ResidentRunner {
/// If the device has a connected vmservice, this method will attempt to hide
/// If the device has a connected vmservice, this method will attempt to hide
/// and restore the debug banner before taking the screenshot.
/// and restore the debug banner before taking the screenshot.
///
///
/// Throws an [AssertionError] if [Devce.supportsScreenshot] is not true.
/// Throws an [AssertionError] if [Dev
i
ce.supportsScreenshot] is not true.
Future
<
void
>
screenshot
(
FlutterDevice
device
)
async
{
Future
<
void
>
screenshot
(
FlutterDevice
device
)
async
{
assert
(
device
.
device
.
supportsScreenshot
);
assert
(
device
.
device
.
supportsScreenshot
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/run_hot.dart
View file @
08576cb6
...
@@ -536,7 +536,7 @@ class HotRunner extends ResidentRunner {
...
@@ -536,7 +536,7 @@ class HotRunner extends ResidentRunner {
// The engine handles killing and recreating isolates that it has spawned
// The engine handles killing and recreating isolates that it has spawned
// ("uiIsolates"). The isolates that were spawned from these uiIsolates
// ("uiIsolates"). The isolates that were spawned from these uiIsolates
// will not be restared, and so they must be manually killed.
// will not be restar
t
ed, and so they must be manually killed.
final
vm_service
.
VM
vm
=
await
device
.
vmService
.
getVM
();
final
vm_service
.
VM
vm
=
await
device
.
vmService
.
getVM
();
for
(
final
vm_service
.
IsolateRef
isolateRef
in
vm
.
isolates
)
{
for
(
final
vm_service
.
IsolateRef
isolateRef
in
vm
.
isolates
)
{
if
(
uiIsolatesIds
.
contains
(
isolateRef
.
id
))
{
if
(
uiIsolatesIds
.
contains
(
isolateRef
.
id
))
{
...
@@ -570,7 +570,7 @@ class HotRunner extends ResidentRunner {
...
@@ -570,7 +570,7 @@ class HotRunner extends ResidentRunner {
try
{
try
{
await
device
.
vmService
.
streamListen
(
'Isolate'
);
await
device
.
vmService
.
streamListen
(
'Isolate'
);
}
on
vm_service
.
RPCError
{
}
on
vm_service
.
RPCError
{
// Do nothing, we're already subcribed.
// Do nothing, we're already sub
s
cribed.
}
}
isolateNotifications
.
add
(
isolateNotifications
.
add
(
device
.
vmService
.
onIsolateEvent
.
firstWhere
((
vm_service
.
Event
event
)
{
device
.
vmService
.
onIsolateEvent
.
firstWhere
((
vm_service
.
Event
event
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
08576cb6
...
@@ -553,7 +553,7 @@ abstract class FlutterCommand extends Command<void> {
...
@@ -553,7 +553,7 @@ abstract class FlutterCommand extends Command<void> {
argParser
.
addFlag
(
FlutterOptions
.
kNullAssertions
,
argParser
.
addFlag
(
FlutterOptions
.
kNullAssertions
,
help:
help:
'Perform additional null assertions on the boundaries of migrated and '
'Perform additional null assertions on the boundaries of migrated and '
'unmigrated code. This setting is not currently supported on desktop '
'un
-
migrated code. This setting is not currently supported on desktop '
'devices.'
'devices.'
);
);
}
}
...
@@ -598,7 +598,7 @@ abstract class FlutterCommand extends Command<void> {
...
@@ -598,7 +598,7 @@ abstract class FlutterCommand extends Command<void> {
FlutterOptions
.
kPerformanceMeasurementFile
,
FlutterOptions
.
kPerformanceMeasurementFile
,
help:
help:
'The name of a file where flutter assemble performance and '
'The name of a file where flutter assemble performance and '
'cachedness information will be written in a JSON format.'
'cached
-
ness information will be written in a JSON format.'
);
);
}
}
...
@@ -1186,7 +1186,7 @@ mixin TargetPlatformBasedDevelopmentArtifacts on FlutterCommand {
...
@@ -1186,7 +1186,7 @@ mixin TargetPlatformBasedDevelopmentArtifacts on FlutterCommand {
@override
@override
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
{
Future
<
Set
<
DevelopmentArtifact
>>
get
requiredArtifacts
async
{
// If there is no specified target device, fallback to the default
// If there is no specified target device, fallback to the default
// confi
ug
ration.
// confi
gu
ration.
final
String
rawTargetPlatform
=
stringArg
(
'target-platform'
);
final
String
rawTargetPlatform
=
stringArg
(
'target-platform'
);
final
TargetPlatform
targetPlatform
=
getTargetPlatformForName
(
rawTargetPlatform
);
final
TargetPlatform
targetPlatform
=
getTargetPlatformForName
(
rawTargetPlatform
);
if
(
targetPlatform
==
null
)
{
if
(
targetPlatform
==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/test/coverage_collector.dart
View file @
08576cb6
...
@@ -279,7 +279,7 @@ void _buildCoverageMap(
...
@@ -279,7 +279,7 @@ void _buildCoverageMap(
final
List
<
int
>
hits
=
(
coverage
[
'hits'
]
as
List
<
dynamic
>).
cast
<
int
>();
final
List
<
int
>
hits
=
(
coverage
[
'hits'
]
as
List
<
dynamic
>).
cast
<
int
>();
final
List
<
int
>
misses
=
(
coverage
[
'misses'
]
as
List
<
dynamic
>).
cast
<
int
>();
final
List
<
int
>
misses
=
(
coverage
[
'misses'
]
as
List
<
dynamic
>).
cast
<
int
>();
final
List
<
dynamic
>
tokenPositions
=
scripts
[
scriptRef
[
'id'
]][
'tokenPosTable'
]
as
List
<
dynamic
>;
final
List
<
dynamic
>
tokenPositions
=
scripts
[
scriptRef
[
'id'
]][
'tokenPosTable'
]
as
List
<
dynamic
>;
// The token positions can be null if the script has no
coverable lines
.
// The token positions can be null if the script has no
lines that may be covered
.
if
(
tokenPositions
==
null
)
{
if
(
tokenPositions
==
null
)
{
continue
;
continue
;
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/version.dart
View file @
08576cb6
...
@@ -77,7 +77,7 @@ class FlutterVersion {
...
@@ -77,7 +77,7 @@ class FlutterVersion {
_frameworkVersion
=
gitTagVersion
.
frameworkVersionFor
(
_frameworkRevision
);
_frameworkVersion
=
gitTagVersion
.
frameworkVersionFor
(
_frameworkRevision
);
}
}
/// Fetchs tags from the upstream Flutter repository and re-calculates the
/// Fetch
e
s tags from the upstream Flutter repository and re-calculates the
/// version.
/// version.
///
///
/// This carries a performance penalty, and should only be called when the
/// This carries a performance penalty, and should only be called when the
...
@@ -259,7 +259,7 @@ class FlutterVersion {
...
@@ -259,7 +259,7 @@ class FlutterVersion {
);
);
}
on
VersionCheckError
catch
(
error
)
{
}
on
VersionCheckError
catch
(
error
)
{
if
(
globals
.
platform
.
environment
.
containsKey
(
'FLUTTER_GIT_URL'
))
{
if
(
globals
.
platform
.
environment
.
containsKey
(
'FLUTTER_GIT_URL'
))
{
globals
.
logger
.
printError
(
'Warning: the Flutter git upstream was overriden '
globals
.
logger
.
printError
(
'Warning: the Flutter git upstream was overrid
d
en '
'by the environment variable FLUTTER_GIT_URL =
$_flutterGit
'
);
'by the environment variable FLUTTER_GIT_URL =
$_flutterGit
'
);
}
}
globals
.
logger
.
printError
(
error
.
toString
());
globals
.
logger
.
printError
(
error
.
toString
());
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/vmservice.dart
View file @
08576cb6
...
@@ -421,10 +421,10 @@ extension FlutterVmService on vm_service.VmService {
...
@@ -421,10 +421,10 @@ extension FlutterVmService on vm_service.VmService {
});
});
}
}
/// Retr
ei
ve the cached SkSL shaders from an attached Flutter view.
/// Retr
ie
ve the cached SkSL shaders from an attached Flutter view.
///
///
/// This method will only return data if `--cache-sksl` was provided as a
/// This method will only return data if `--cache-sksl` was provided as a
/// flutter run agument, and only then on physical devices.
/// flutter run a
r
gument, and only then on physical devices.
Future
<
Map
<
String
,
Object
>>
getSkSLs
({
Future
<
Map
<
String
,
Object
>>
getSkSLs
({
@required
String
viewId
,
@required
String
viewId
,
})
async
{
})
async
{
...
@@ -437,7 +437,7 @@ extension FlutterVmService on vm_service.VmService {
...
@@ -437,7 +437,7 @@ extension FlutterVmService on vm_service.VmService {
return
response
.
json
[
'SkSLs'
]
as
Map
<
String
,
Object
>;
return
response
.
json
[
'SkSLs'
]
as
Map
<
String
,
Object
>;
}
}
/// Flush all tasks on the UI thead for an attached Flutter view.
/// Flush all tasks on the UI th
r
ead for an attached Flutter view.
///
///
/// This method is currently used only for benchmarking.
/// This method is currently used only for benchmarking.
Future
<
void
>
flushUIThreadTasks
({
Future
<
void
>
flushUIThreadTasks
({
...
@@ -809,7 +809,7 @@ Future<String> sharedSkSlWriter(Device device, Map<String, Object> data, {
...
@@ -809,7 +809,7 @@ Future<String> sharedSkSlWriter(Device device, Map<String, Object> data, {
})
async
{
})
async
{
if
(
data
.
isEmpty
)
{
if
(
data
.
isEmpty
)
{
globals
.
logger
.
printStatus
(
globals
.
logger
.
printStatus
(
'No data was recei
e
ved. To ensure SkSL data can be generated use a '
'No data was received. To ensure SkSL data can be generated use a '
'physical device then:
\n
'
'physical device then:
\n
'
' 1. Pass "--cache-sksl" as an argument to flutter run.
\n
'
' 1. Pass "--cache-sksl" as an argument to flutter run.
\n
'
' 2. Interact with the application to force shaders to be compiled.
\n
'
' 2. Interact with the application to force shaders to be compiled.
\n
'
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/web/bootstrap.dart
View file @
08576cb6
...
@@ -52,6 +52,7 @@ String generateMainModule({
...
@@ -52,6 +52,7 @@ String generateMainModule({
@required
String
entrypoint
,
@required
String
entrypoint
,
@required
bool
nullAssertions
,
@required
bool
nullAssertions
,
})
{
})
{
// TODO(jonahwilliams): fix typo in dwds and update.
return
'''/* ENTRYPOINT_EXTENTION_MARKER */
return
'''/* ENTRYPOINT_EXTENTION_MARKER */
// Create the main module loaded below.
// Create the main module loaded below.
define("main_module.bootstrap", ["
$entrypoint
", "dart_sdk"], function(app, dart_sdk) {
define("main_module.bootstrap", ["
$entrypoint
", "dart_sdk"], function(app, dart_sdk) {
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/web/chrome.dart
View file @
08576cb6
...
@@ -162,13 +162,13 @@ class ChromiumLauncher {
...
@@ -162,13 +162,13 @@ class ChromiumLauncher {
/// Launch a Chromium browser to a particular `host` page.
/// Launch a Chromium browser to a particular `host` page.
///
///
///
`headless`
defaults to false, and controls whether we open a headless or
///
[headless]
defaults to false, and controls whether we open a headless or
/// a
`headfull`
browser.
/// a
"headfull"
browser.
///
///
///
`debugPort`
is Chrome's debugging protocol port. If null, a random free
///
[debugPort]
is Chrome's debugging protocol port. If null, a random free
/// port is picked automatically.
/// port is picked automatically.
///
///
///
`skipCheck`
does not attempt to make a devtools connection before returning.
///
[skipCheck]
does not attempt to make a devtools connection before returning.
Future
<
Chromium
>
launch
(
String
url
,
{
Future
<
Chromium
>
launch
(
String
url
,
{
bool
headless
=
false
,
bool
headless
=
false
,
int
debugPort
,
int
debugPort
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/web/web_validator.dart
View file @
08576cb6
...
@@ -8,7 +8,7 @@ import '../base/platform.dart';
...
@@ -8,7 +8,7 @@ import '../base/platform.dart';
import
'../doctor.dart'
;
import
'../doctor.dart'
;
import
'chrome.dart'
;
import
'chrome.dart'
;
/// A validator for Chromium-based brosers.
/// A validator for Chromium-based bro
w
sers.
abstract
class
ChromiumValidator
extends
DoctorValidator
{
abstract
class
ChromiumValidator
extends
DoctorValidator
{
const
ChromiumValidator
(
String
title
)
:
super
(
title
);
const
ChromiumValidator
(
String
title
)
:
super
(
title
);
...
@@ -19,25 +19,25 @@ abstract class ChromiumValidator extends DoctorValidator {
...
@@ -19,25 +19,25 @@ abstract class ChromiumValidator extends DoctorValidator {
@override
@override
Future
<
ValidationResult
>
validate
()
async
{
Future
<
ValidationResult
>
validate
()
async
{
final
bool
canRunChromium
=
_chromiumLauncher
.
canFindExecutable
();
final
bool
canRunChromium
=
_chromiumLauncher
.
canFindExecutable
();
final
String
chromimSearchLocation
=
_chromiumLauncher
.
findExecutable
();
final
String
chromi
u
mSearchLocation
=
_chromiumLauncher
.
findExecutable
();
final
List
<
ValidationMessage
>
messages
=
<
ValidationMessage
>[
final
List
<
ValidationMessage
>
messages
=
<
ValidationMessage
>[
if
(
_platform
.
environment
.
containsKey
(
kChromeEnvironment
))
if
(
_platform
.
environment
.
containsKey
(
kChromeEnvironment
))
if
(!
canRunChromium
)
if
(!
canRunChromium
)
ValidationMessage
.
hint
(
'
$chromimSearchLocation
is not executable.'
)
ValidationMessage
.
hint
(
'
$chromi
u
mSearchLocation
is not executable.'
)
else
else
ValidationMessage
(
'
$kChromeEnvironment
=
$chromimSearchLocation
'
)
ValidationMessage
(
'
$kChromeEnvironment
=
$chromi
u
mSearchLocation
'
)
else
else
if
(!
canRunChromium
)
if
(!
canRunChromium
)
ValidationMessage
.
hint
(
'Cannot find
$_name
. Try setting '
ValidationMessage
.
hint
(
'Cannot find
$_name
. Try setting '
'
$kChromeEnvironment
to a
$_name
executable.'
)
'
$kChromeEnvironment
to a
$_name
executable.'
)
else
else
ValidationMessage
(
'
$_name
at
$chromimSearchLocation
'
),
ValidationMessage
(
'
$_name
at
$chromi
u
mSearchLocation
'
),
];
];
if
(!
canRunChromium
)
{
if
(!
canRunChromium
)
{
return
ValidationResult
(
return
ValidationResult
(
ValidationType
.
missing
,
ValidationType
.
missing
,
messages
,
messages
,
statusInfo:
'Cannot find
$_name
executable at
$chromimSearchLocation
'
,
statusInfo:
'Cannot find
$_name
executable at
$chromi
u
mSearchLocation
'
,
);
);
}
}
return
ValidationResult
(
return
ValidationResult
(
...
@@ -66,7 +66,7 @@ class ChromeValidator extends ChromiumValidator {
...
@@ -66,7 +66,7 @@ class ChromeValidator extends ChromiumValidator {
String
get
_name
=>
'Chrome'
;
String
get
_name
=>
'Chrome'
;
}
}
/// A validator that checks whether
e
Edge is installed and can run.
/// A validator that checks whether Edge is installed and can run.
class
EdgeValidator
extends
ChromiumValidator
{
class
EdgeValidator
extends
ChromiumValidator
{
const
EdgeValidator
({
const
EdgeValidator
({
@required
Platform
platform
,
@required
Platform
platform
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/windows/build_windows.dart
View file @
08576cb6
...
@@ -36,7 +36,7 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {
...
@@ -36,7 +36,7 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {
'to learn about adding Windows support to a project.'
);
'to learn about adding Windows support to a project.'
);
}
}
// Ensure that necessary e
m
phemeral files are generated and up to date.
// Ensure that necessary ephemeral files are generated and up to date.
_writeGeneratedFlutterConfig
(
windowsProject
,
buildInfo
,
target
);
_writeGeneratedFlutterConfig
(
windowsProject
,
buildInfo
,
target
);
createPluginSymlinks
(
windowsProject
.
parent
);
createPluginSymlinks
(
windowsProject
.
parent
);
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/windows/visual_studio.dart
View file @
08576cb6
...
@@ -140,7 +140,7 @@ class VisualStudio {
...
@@ -140,7 +140,7 @@ class VisualStudio {
return
_requiredComponents
().
values
.
toList
();
return
_requiredComponents
().
values
.
toList
();
}
}
/// The consumer-facing version name of the min
u
mum supported version.
/// The consumer-facing version name of the min
i
mum supported version.
///
///
/// E.g., for Visual Studio 2019 this returns "2019" rather than "16".
/// E.g., for Visual Studio 2019 this returns "2019" rather than "16".
String
get
minimumVersionDescription
{
String
get
minimumVersionDescription
{
...
@@ -199,7 +199,7 @@ class VisualStudio {
...
@@ -199,7 +199,7 @@ class VisualStudio {
Map
<
String
,
String
>
_requiredComponents
([
int
majorVersion
])
{
Map
<
String
,
String
>
_requiredComponents
([
int
majorVersion
])
{
// The description of the C++ toolchain required by the template. The
// The description of the C++ toolchain required by the template. The
// component name is significantly different in different versions.
// component name is significantly different in different versions.
// When a new major version of VS is supported, its toochain description
// When a new major version of VS is supported, its too
l
chain description
// should be added below. It should also be made the default, so that when
// should be added below. It should also be made the default, so that when
// there is no installation, the message shows the string that will be
// there is no installation, the message shows the string that will be
// relevant for the most likely fresh install case).
// relevant for the most likely fresh install case).
...
@@ -228,7 +228,7 @@ class VisualStudio {
...
@@ -228,7 +228,7 @@ class VisualStudio {
/// The minimum supported major version.
/// The minimum supported major version.
static
const
int
_minimumSupportedVersion
=
16
;
// '16' is VS 2019.
static
const
int
_minimumSupportedVersion
=
16
;
// '16' is VS 2019.
/// vswhere argument to specif
ic
y the minimum version.
/// vswhere argument to specify the minimum version.
static
const
String
_vswhereMinVersionArgument
=
'-version'
;
static
const
String
_vswhereMinVersionArgument
=
'-version'
;
/// vswhere argument to allow prerelease versions.
/// vswhere argument to allow prerelease versions.
...
@@ -304,7 +304,7 @@ class VisualStudio {
...
@@ -304,7 +304,7 @@ class VisualStudio {
}
}
}
}
}
on
ArgumentError
{
}
on
ArgumentError
{
// Thrown if vswhere doesn
t'
exist; ignore and return null below.
// Thrown if vswhere doesn
't
exist; ignore and return null below.
}
on
ProcessException
{
}
on
ProcessException
{
// Ignored, return null below.
// Ignored, return null below.
}
on
FormatException
{
}
on
FormatException
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart
View file @
08576cb6
...
@@ -106,7 +106,7 @@ void main() {
...
@@ -106,7 +106,7 @@ void main() {
return
BuildResult
(
success:
true
,
performance:
<
String
,
PerformanceMeasurement
>{
return
BuildResult
(
success:
true
,
performance:
<
String
,
PerformanceMeasurement
>{
'hello'
:
PerformanceMeasurement
(
'hello'
:
PerformanceMeasurement
(
target:
'hello'
,
target:
'hello'
,
analyicsName:
'bar'
,
analy
t
icsName:
'bar'
,
elapsedMilliseconds:
123
,
elapsedMilliseconds:
123
,
skipped:
false
,
skipped:
false
,
succeeded:
true
,
succeeded:
true
,
...
@@ -208,7 +208,7 @@ void main() {
...
@@ -208,7 +208,7 @@ void main() {
testWithoutContext
(
'writePerformanceData outputs performance data in JSON form'
,
()
{
testWithoutContext
(
'writePerformanceData outputs performance data in JSON form'
,
()
{
final
List
<
PerformanceMeasurement
>
performanceMeasurement
=
<
PerformanceMeasurement
>[
final
List
<
PerformanceMeasurement
>
performanceMeasurement
=
<
PerformanceMeasurement
>[
PerformanceMeasurement
(
PerformanceMeasurement
(
analyicsName:
'foo'
,
analy
t
icsName:
'foo'
,
target:
'hidden'
,
target:
'hidden'
,
skipped:
false
,
skipped:
false
,
succeeded:
true
,
succeeded:
true
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/commands.shard/hermetic/symbolize_test.dart
View file @
08576cb6
...
@@ -63,7 +63,7 @@ void main() {
...
@@ -63,7 +63,7 @@ void main() {
final
Future
<
void
>
result
=
createTestCommandRunner
(
command
)
final
Future
<
void
>
result
=
createTestCommandRunner
(
command
)
.
run
(
const
<
String
>[
'symbolize'
]);
.
run
(
const
<
String
>[
'symbolize'
]);
expect
(
result
,
throwsToolExit
(
message:
'"--debug-info" is required to symboli
cat
e stack traces.'
));
expect
(
result
,
throwsToolExit
(
message:
'"--debug-info" is required to symboli
z
e stack traces.'
));
});
});
testUsingContext
(
'symbolize exits when --debug-info file is missing'
,
()
async
{
testUsingContext
(
'symbolize exits when --debug-info file is missing'
,
()
async
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart
View file @
08576cb6
...
@@ -369,7 +369,7 @@ class FakeUpgradeCommandRunner extends UpgradeCommandRunner {
...
@@ -369,7 +369,7 @@ class FakeUpgradeCommandRunner extends UpgradeCommandRunner {
Future
<
String
>
fetchRemoteRevision
()
async
=>
remoteRevision
;
Future
<
String
>
fetchRemoteRevision
()
async
=>
remoteRevision
;
@override
@override
Future
<
bool
>
hasUncomittedChanges
()
async
=>
willHaveUncomittedChanges
;
Future
<
bool
>
hasUncom
m
ittedChanges
()
async
=>
willHaveUncomittedChanges
;
@override
@override
Future
<
void
>
upgradeChannel
(
FlutterVersion
flutterVersion
)
async
{}
Future
<
void
>
upgradeChannel
(
FlutterVersion
flutterVersion
)
async
{}
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart
View file @
08576cb6
...
@@ -115,7 +115,7 @@ void main() {
...
@@ -115,7 +115,7 @@ void main() {
]),
]),
]);
]);
await
const
DebugUniveralFramework
().
build
(
environment
);
await
const
DebugUniver
s
alFramework
().
build
(
environment
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/commands/build_aot_test.dart
View file @
08576cb6
...
@@ -116,14 +116,14 @@ void main() {
...
@@ -116,14 +116,14 @@ void main() {
.
thenAnswer
((
Invocation
invocation
)
async
{
.
thenAnswer
((
Invocation
invocation
)
async
{
return
BuildResult
(
success:
true
,
performance:
<
String
,
PerformanceMeasurement
>{
return
BuildResult
(
success:
true
,
performance:
<
String
,
PerformanceMeasurement
>{
'kernel_snapshot'
:
PerformanceMeasurement
(
'kernel_snapshot'
:
PerformanceMeasurement
(
analyicsName:
'kernel_snapshot'
,
analy
t
icsName:
'kernel_snapshot'
,
target:
'kernel_snapshot'
,
target:
'kernel_snapshot'
,
elapsedMilliseconds:
1000
,
elapsedMilliseconds:
1000
,
succeeded:
true
,
succeeded:
true
,
skipped:
false
,
skipped:
false
,
),
),
'anything'
:
PerformanceMeasurement
(
'anything'
:
PerformanceMeasurement
(
analyicsName:
'android_aot'
,
analy
t
icsName:
'android_aot'
,
target:
'anything'
,
target:
'anything'
,
elapsedMilliseconds:
1000
,
elapsedMilliseconds:
1000
,
succeeded:
true
,
succeeded:
true
,
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
08576cb6
...
@@ -1457,7 +1457,7 @@ void main() {
...
@@ -1457,7 +1457,7 @@ void main() {
]);
]);
await
residentRunner
.
writeSkSL
();
await
residentRunner
.
writeSkSL
();
expect
(
testLogger
.
statusText
,
contains
(
'No data was recei
e
ved'
));
expect
(
testLogger
.
statusText
,
contains
(
'No data was received'
));
expect
(
fakeVmServiceHost
.
hasRemainingExpectations
,
false
);
expect
(
fakeVmServiceHost
.
hasRemainingExpectations
,
false
);
}));
}));
...
...
This diff is collapsed.
Click to expand it.
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