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
e4f586d2
Commit
e4f586d2
authored
Mar 03, 2017
by
Michael Goderbauer
Committed by
GitHub
Mar 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Hot Restart on Windows (#8548)
parent
1bb164ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
26 deletions
+25
-26
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+12
-14
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+13
-12
No files found.
packages/flutter_tools/lib/src/run_hot.dart
View file @
e4f586d2
...
...
@@ -313,25 +313,23 @@ class HotRunner extends ResidentRunner {
_devFS
=
null
;
}
Future
<
Null
>
_launchInView
(
String
entryPath
,
String
packagesPath
,
String
assetsDirectoryPath
)
async
{
Future
<
Null
>
_launchInView
(
Uri
entryUri
,
Uri
packagesUri
,
Uri
assetsDirectoryUri
)
async
{
FlutterView
view
=
vmService
.
vm
.
mainView
;
return
view
.
runFromSource
(
entry
Path
,
packagesPath
,
assetsDirectoryPath
);
return
view
.
runFromSource
(
entry
Uri
,
packagesUri
,
assetsDirectoryUri
);
}
Future
<
Null
>
_launchFromDevFS
(
ApplicationPackage
package
,
String
mainScript
)
async
{
String
entryPath
=
fs
.
path
.
relative
(
mainScript
,
from:
projectRootPath
);
String
deviceEntryPath
=
_devFS
.
baseUri
.
resolve
(
entryPath
).
toFilePath
();
String
devicePackagesPath
=
_devFS
.
baseUri
.
resolve
(
'.packages'
).
toFilePath
();
String
deviceAssetsDirectoryPath
=
_devFS
.
baseUri
.
resolve
(
getAssetBuildDirectory
()).
toFilePath
();
await
_launchInView
(
deviceEntryPath
,
devicePackagesPath
,
deviceAssetsDirectoryPath
);
String
entryUri
=
fs
.
path
.
relative
(
mainScript
,
from:
projectRootPath
);
Uri
deviceEntryUri
=
_devFS
.
baseUri
.
resolveUri
(
fs
.
path
.
toUri
(
entryUri
));
Uri
devicePackagesUri
=
_devFS
.
baseUri
.
resolve
(
'.packages'
);
Uri
deviceAssetsDirectoryUri
=
_devFS
.
baseUri
.
resolveUri
(
fs
.
path
.
toUri
(
getAssetBuildDirectory
()));
await
_launchInView
(
deviceEntryUri
,
devicePackagesUri
,
deviceAssetsDirectoryUri
);
}
Future
<
OperationResult
>
_restartFromSources
()
async
{
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
e4f586d2
...
...
@@ -710,15 +710,16 @@ class VM extends ServiceObjectOwner {
}
Future
<
ServiceMap
>
runInView
(
String
viewId
,
String
main
,
String
packages
,
String
assetsDirectory
)
{
Uri
main
,
Uri
packages
,
Uri
assetsDirectory
)
{
// TODO(goderbauer): Transfer Uri (instead of file path) when remote end supports it.
return
invokeRpc
(
'_flutter.runInView'
,
params:
<
String
,
dynamic
>
{
'viewId'
:
viewId
,
'mainScript'
:
main
,
'packagesFile'
:
packages
,
'assetDirectory'
:
assetsDirectory
'mainScript'
:
main
.
toFilePath
(
windows:
false
)
,
'packagesFile'
:
packages
.
toFilePath
(
windows:
false
)
,
'assetDirectory'
:
assetsDirectory
.
toFilePath
(
windows:
false
)
});
}
...
...
@@ -1024,9 +1025,9 @@ class FlutterView extends ServiceObject {
}
// TODO(johnmccutchan): Report errors when running failed.
Future
<
Null
>
runFromSource
(
String
entryPath
,
String
packagesPath
,
String
assetsDirectoryPath
)
async
{
Future
<
Null
>
runFromSource
(
Uri
entryUri
,
Uri
packagesUri
,
Uri
assetsDirectoryUri
)
async
{
final
String
viewId
=
id
;
// When this completer completes the isolate is running.
final
Completer
<
Null
>
completer
=
new
Completer
<
Null
>();
...
...
@@ -1040,9 +1041,9 @@ class FlutterView extends ServiceObject {
}
});
await
owner
.
vm
.
runInView
(
viewId
,
entry
Path
,
packages
Path
,
assetsDirectory
Path
);
entry
Uri
,
packages
Uri
,
assetsDirectory
Uri
);
await
completer
.
future
;
await
owner
.
vm
.
refreshViews
();
await
subscription
.
cancel
();
...
...
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