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
99176578
Unverified
Commit
99176578
authored
Jan 11, 2018
by
Alexander Aprelev
Committed by
GitHub
Jan 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling --preview-dart-2 for ios (#14016)
* Fix handling --preview-dart-2 for ios * final var
parent
ccc0d294
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
flx.dart
packages/flutter_tools/lib/src/flx.dart
+1
-1
simulators.dart
packages/flutter_tools/lib/src/ios/simulators.dart
+17
-9
flutter_command_runner.dart
.../flutter_tools/lib/src/runner/flutter_command_runner.dart
+4
-2
No files found.
packages/flutter_tools/lib/src/flx.dart
View file @
99176578
...
...
@@ -69,7 +69,7 @@ Future<Null> build({
}
DevFSContent
kernelContent
;
if
(
!
precompiledSnapshot
&&
previewDart2
)
{
if
(
previewDart2
)
{
final
String
kernelBinaryFilename
=
await
compile
(
sdkRoot:
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
),
incrementalCompilerByteStorePath:
fs
.
path
.
absolute
(
getIncrementalCompilerByteStoreDirectory
()),
...
...
packages/flutter_tools/lib/src/ios/simulators.dart
View file @
99176578
...
...
@@ -306,7 +306,7 @@ class IOSSimulator extends Device {
printTrace
(
'Building
${app.name}
for
$id
.'
);
try
{
await
_setupUpdatedApplicationBundle
(
app
,
debuggingOptions
.
buildInfo
.
flavor
);
await
_setupUpdatedApplicationBundle
(
app
,
debuggingOptions
.
buildInfo
);
}
on
ToolExit
catch
(
e
)
{
printError
(
e
.
message
);
return
new
LaunchResult
.
failed
();
...
...
@@ -322,7 +322,7 @@ class IOSSimulator extends Device {
if
(!
prebuiltApplication
)
{
args
.
addAll
(<
String
>[
'--flutter-assets-dir=
${fs.path.absolute(getAssetBuildDirectory())}
'
,
'--dart-main=
${fs.path.absolute(mainPath)}
'
,
'--dart-main=
${fs.path.absolute(mainPath)}
${debuggingOptions.buildInfo.previewDart2?".dill":""}
'
,
'--packages=
${fs.path.absolute('.packages')}
'
,
]);
}
...
...
@@ -379,17 +379,25 @@ class IOSSimulator extends Device {
return
criteria
.
reduce
((
bool
a
,
bool
b
)
=>
a
&&
b
);
}
Future
<
Null
>
_setupUpdatedApplicationBundle
(
ApplicationPackage
app
,
String
flavor
)
async
{
await
_sideloadUpdatedAssetsForInstalledApplicationBundle
(
app
);
Future
<
Null
>
_setupUpdatedApplicationBundle
(
ApplicationPackage
app
,
BuildInfo
buildInfo
)
async
{
await
_sideloadUpdatedAssetsForInstalledApplicationBundle
(
app
,
buildInfo
);
if
(!
await
_applicationIsInstalledAndRunning
(
app
))
return
_buildAndInstallApplicationBundle
(
app
,
flavor
);
return
_buildAndInstallApplicationBundle
(
app
,
buildInfo
);
}
Future
<
Null
>
_buildAndInstallApplicationBundle
(
ApplicationPackage
app
,
String
flavor
)
async
{
Future
<
Null
>
_buildAndInstallApplicationBundle
(
ApplicationPackage
app
,
BuildInfo
buildInfo
)
async
{
// Step 1: Build the Xcode project.
// The build mode for the simulator is always debug.
final
XcodeBuildResult
buildResult
=
await
buildXcodeProject
(
app:
app
,
buildInfo:
new
BuildInfo
(
BuildMode
.
debug
,
flavor
),
buildForDevice:
false
);
final
BuildInfo
debugBuildInfo
=
new
BuildInfo
(
BuildMode
.
debug
,
buildInfo
.
flavor
,
previewDart2:
buildInfo
.
previewDart2
,
strongMode:
buildInfo
.
strongMode
,
extraFrontEndOptions:
buildInfo
.
extraFrontEndOptions
,
extraGenSnapshotOptions:
buildInfo
.
extraGenSnapshotOptions
,
preferSharedLibrary:
buildInfo
.
preferSharedLibrary
);
final
XcodeBuildResult
buildResult
=
await
buildXcodeProject
(
app:
app
,
buildInfo:
debugBuildInfo
,
buildForDevice:
false
);
if
(!
buildResult
.
success
)
throwToolExit
(
'Could not build the application for the simulator.'
);
...
...
@@ -404,8 +412,8 @@ class IOSSimulator extends Device {
await
SimControl
.
instance
.
install
(
id
,
fs
.
path
.
absolute
(
bundle
.
path
));
}
Future
<
Null
>
_sideloadUpdatedAssetsForInstalledApplicationBundle
(
ApplicationPackage
app
)
=>
flx
.
build
(
precompiledSnapshot:
true
);
Future
<
Null
>
_sideloadUpdatedAssetsForInstalledApplicationBundle
(
ApplicationPackage
app
,
BuildInfo
buildInfo
)
=>
flx
.
build
(
precompiledSnapshot:
true
,
previewDart2:
buildInfo
.
previewDart2
,
strongMode:
buildInfo
.
strongMode
);
@override
Future
<
bool
>
stopApp
(
ApplicationPackage
app
)
async
{
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
99176578
...
...
@@ -341,8 +341,10 @@ class FlutterCommandRunner extends CommandRunner<Null> {
throwToolExit
(
'No Flutter engine build found at
$engineBuildPath
.'
,
exitCode:
2
);
}
final
String
hostLocalEngine
=
'host_'
+
localEngine
.
substring
(
localEngine
.
indexOf
(
'_'
)
+
1
);
final
String
engineHostBuildPath
=
fs
.
path
.
normalize
(
fs
.
path
.
join
(
enginePath
,
'out'
,
hostLocalEngine
));
final
String
basename
=
fs
.
path
.
basename
(
engineBuildPath
);
final
String
engineHostBuildPath
=
fs
.
path
.
normalize
(
fs
.
path
.
join
(
fs
.
path
.
dirname
(
engineBuildPath
),
'host_'
+
basename
.
substring
(
basename
.
indexOf
(
'_'
)
+
1
)));
return
new
EngineBuildPaths
(
targetEngine:
engineBuildPath
,
hostEngine:
engineHostBuildPath
);
}
...
...
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