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
585e2317
Unverified
Commit
585e2317
authored
Jan 11, 2019
by
Stanislav Baranov
Committed by
GitHub
Jan 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Friendlier flutter tool messages for dynamic mode (#26378)
parent
17d741ea
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
7 deletions
+12
-7
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+5
-0
bundle.dart
packages/flutter_tools/lib/src/bundle.dart
+1
-1
build_aot.dart
packages/flutter_tools/lib/src/commands/build_aot.dart
+1
-1
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+1
-1
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+1
-1
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+1
-1
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+2
-2
No files found.
packages/flutter_tools/lib/src/build_info.dart
View file @
585e2317
...
...
@@ -119,6 +119,7 @@ class BuildInfo {
bool
get
supportsEmulator
=>
isEmulatorBuildMode
(
mode
);
bool
get
supportsSimulator
=>
isEmulatorBuildMode
(
mode
);
String
get
modeName
=>
getModeName
(
mode
);
String
get
friendlyModeName
=>
getFriendlyModeName
(
mode
);
BuildInfo
withTargetPlatform
(
TargetPlatform
targetPlatform
)
=>
BuildInfo
(
mode
,
flavor
,
...
...
@@ -142,6 +143,10 @@ enum BuildMode {
String
getModeName
(
BuildMode
mode
)
=>
getEnumName
(
mode
);
String
getFriendlyModeName
(
BuildMode
mode
)
{
return
snakeCase
(
getModeName
(
mode
)).
replaceAll
(
'_'
,
' '
);
}
// Returns true if the selected build mode uses ahead-of-time compilation.
bool
isAotBuildMode
(
BuildMode
mode
)
{
return
mode
==
BuildMode
.
profile
||
mode
==
BuildMode
.
release
;
...
...
packages/flutter_tools/lib/src/bundle.dart
View file @
585e2317
...
...
@@ -85,7 +85,7 @@ Future<void> build({
}
else
if
(!
fs
.
file
(
compilationTraceFilePath
).
existsSync
())
{
// Be forgiving if compilation trace file is missing.
print
Error
(
'Warning: Ignoring missing compilation training file
$compilationTraceFilePath
.'
);
print
Status
(
'No compilation trace available. To optimize performance, consider using --train
.'
);
final
File
tmp
=
fs
.
systemTempDirectory
.
childFile
(
'flutterEmptyCompilationTrace.txt'
);
compilationTraceFilePath
=
(
tmp
..
createSync
(
recursive:
true
)).
path
;
...
...
packages/flutter_tools/lib/src/commands/build_aot.dart
View file @
585e2317
...
...
@@ -70,7 +70,7 @@ class BuildAotCommand extends BuildSubCommand {
if
(!
argResults
[
'quiet'
])
{
final
String
typeName
=
artifacts
.
getEngineType
(
platform
,
buildMode
);
status
=
logger
.
startProgress
(
'Building AOT snapshot in
${getModeName(getBuildMode())}
mode (
$typeName
)...'
,
'Building AOT snapshot in
${get
Friendly
ModeName(getBuildMode())}
mode (
$typeName
)...'
,
expectSlowOperation:
true
,
);
}
...
...
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
585e2317
...
...
@@ -70,7 +70,7 @@ class BuildIOSCommand extends BuildSubCommand {
}
final
BuildInfo
buildInfo
=
getBuildInfo
();
if
(
forSimulator
&&
!
buildInfo
.
supportsSimulator
)
throwToolExit
(
'
${toTitleCase(buildInfo.
m
odeName)}
mode is not supported for simulators.'
);
throwToolExit
(
'
${toTitleCase(buildInfo.
friendlyM
odeName)}
mode is not supported for simulators.'
);
final
String
logTarget
=
forSimulator
?
'simulator'
:
'device'
;
...
...
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
585e2317
...
...
@@ -342,7 +342,7 @@ class AppDomain extends Domain {
String
isolateFilter
,
})
async
{
if
(
await
device
.
isLocalEmulator
&&
!
options
.
buildInfo
.
supportsEmulator
)
{
throw
'
${toTitleCase(options.buildInfo.
m
odeName)}
mode is not supported for emulators.'
;
throw
'
${toTitleCase(options.buildInfo.
friendlyM
odeName)}
mode is not supported for emulators.'
;
}
// We change the current working directory for the duration of the `start` command.
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
585e2317
...
...
@@ -303,7 +303,7 @@ class RunCommand extends RunCommandBase {
}
if
(!
isEmulatorBuildMode
(
getBuildMode
()))
{
throwToolExit
(
'
${toTitleCase(getModeName(getBuildMode()))}
mode is not supported for emulators.'
);
throwToolExit
(
'
${toTitleCase(get
Friendly
ModeName(getBuildMode()))}
mode is not supported for emulators.'
);
}
}
}
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
585e2317
...
...
@@ -265,7 +265,7 @@ class FlutterDevice {
bool
shouldBuild
,
})
async
{
final
bool
prebuiltMode
=
hotRunner
.
applicationBinary
!=
null
;
final
String
modeName
=
hotRunner
.
debuggingOptions
.
buildInfo
.
m
odeName
;
final
String
modeName
=
hotRunner
.
debuggingOptions
.
buildInfo
.
friendlyM
odeName
;
printStatus
(
'Launching
${getDisplayPath(hotRunner.mainPath)}
on
${device.name}
in
$modeName
mode...'
);
final
TargetPlatform
targetPlatform
=
await
device
.
targetPlatform
;
...
...
@@ -324,7 +324,7 @@ class FlutterDevice {
applicationBinary:
coldRunner
.
applicationBinary
);
final
String
modeName
=
coldRunner
.
debuggingOptions
.
buildInfo
.
m
odeName
;
final
String
modeName
=
coldRunner
.
debuggingOptions
.
buildInfo
.
friendlyM
odeName
;
final
bool
prebuiltMode
=
coldRunner
.
applicationBinary
!=
null
;
if
(
coldRunner
.
mainPath
==
null
)
{
assert
(
prebuiltMode
);
...
...
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