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
763bf114
Unverified
Commit
763bf114
authored
Jan 24, 2019
by
Liam Appelbe
Committed by
GitHub
Jan 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experimental flags for hot reloads (#26988)
* First pass at incremental exp flags * adkfgjh
parent
d1bde2ed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+6
-0
compile.dart
packages/flutter_tools/lib/src/compile.dart
+9
-2
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/commands/run.dart
View file @
763bf114
...
@@ -333,6 +333,11 @@ class RunCommand extends RunCommandBase {
...
@@ -333,6 +333,11 @@ class RunCommand extends RunCommandBase {
throwToolExit
(
'Error: --train is only allowed when running as --dynamic --profile '
throwToolExit
(
'Error: --train is only allowed when running as --dynamic --profile '
'(recommended) or --debug (may include unwanted debug symbols).'
);
'(recommended) or --debug (may include unwanted debug symbols).'
);
List
<
String
>
expFlags
=
null
;
if
(
argParser
.
options
.
containsKey
(
FlutterOptions
.
kEnableExperiment
)
&&
argResults
[
FlutterOptions
.
kEnableExperiment
]
!=
null
)
{
expFlags
=
argResults
[
FlutterOptions
.
kEnableExperiment
];
}
final
List
<
FlutterDevice
>
flutterDevices
=
devices
.
map
<
FlutterDevice
>((
Device
device
)
{
final
List
<
FlutterDevice
>
flutterDevices
=
devices
.
map
<
FlutterDevice
>((
Device
device
)
{
return
FlutterDevice
(
return
FlutterDevice
(
device
,
device
,
...
@@ -341,6 +346,7 @@ class RunCommand extends RunCommandBase {
...
@@ -341,6 +346,7 @@ class RunCommand extends RunCommandBase {
fileSystemRoots:
argResults
[
'filesystem-root'
],
fileSystemRoots:
argResults
[
'filesystem-root'
],
fileSystemScheme:
argResults
[
'filesystem-scheme'
],
fileSystemScheme:
argResults
[
'filesystem-scheme'
],
viewFilter:
argResults
[
'isolate-filter'
],
viewFilter:
argResults
[
'isolate-filter'
],
experimentalFlags:
expFlags
,
);
);
}).
toList
();
}).
toList
();
...
...
packages/flutter_tools/lib/src/compile.dart
View file @
763bf114
...
@@ -332,7 +332,8 @@ class ResidentCompiler {
...
@@ -332,7 +332,8 @@ class ResidentCompiler {
CompilerMessageConsumer
compilerMessageConsumer
=
printError
,
CompilerMessageConsumer
compilerMessageConsumer
=
printError
,
String
initializeFromDill
,
String
initializeFromDill
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
bool
unsafePackageSerialization
bool
unsafePackageSerialization
,
List
<
String
>
experimentalFlags
,
})
:
assert
(
_sdkRoot
!=
null
),
})
:
assert
(
_sdkRoot
!=
null
),
_trackWidgetCreation
=
trackWidgetCreation
,
_trackWidgetCreation
=
trackWidgetCreation
,
_packagesPath
=
packagesPath
,
_packagesPath
=
packagesPath
,
...
@@ -342,7 +343,8 @@ class ResidentCompiler {
...
@@ -342,7 +343,8 @@ class ResidentCompiler {
_stdoutHandler
=
_StdoutHandler
(
consumer:
compilerMessageConsumer
),
_stdoutHandler
=
_StdoutHandler
(
consumer:
compilerMessageConsumer
),
_controller
=
StreamController
<
_CompilationRequest
>(),
_controller
=
StreamController
<
_CompilationRequest
>(),
_initializeFromDill
=
initializeFromDill
,
_initializeFromDill
=
initializeFromDill
,
_unsafePackageSerialization
=
unsafePackageSerialization
{
_unsafePackageSerialization
=
unsafePackageSerialization
,
_experimentalFlags
=
experimentalFlags
{
// This is a URI, not a file path, so the forward slash is correct even on Windows.
// This is a URI, not a file path, so the forward slash is correct even on Windows.
if
(!
_sdkRoot
.
endsWith
(
'/'
))
if
(!
_sdkRoot
.
endsWith
(
'/'
))
_sdkRoot
=
'
$_sdkRoot
/'
;
_sdkRoot
=
'
$_sdkRoot
/'
;
...
@@ -358,6 +360,7 @@ class ResidentCompiler {
...
@@ -358,6 +360,7 @@ class ResidentCompiler {
final
_StdoutHandler
_stdoutHandler
;
final
_StdoutHandler
_stdoutHandler
;
String
_initializeFromDill
;
String
_initializeFromDill
;
bool
_unsafePackageSerialization
;
bool
_unsafePackageSerialization
;
final
List
<
String
>
_experimentalFlags
;
final
StreamController
<
_CompilationRequest
>
_controller
;
final
StreamController
<
_CompilationRequest
>
_controller
;
...
@@ -470,6 +473,10 @@ class ResidentCompiler {
...
@@ -470,6 +473,10 @@ class ResidentCompiler {
if
(
_unsafePackageSerialization
==
true
)
{
if
(
_unsafePackageSerialization
==
true
)
{
command
.
add
(
'--unsafe-package-serialization'
);
command
.
add
(
'--unsafe-package-serialization'
);
}
}
if
(
_experimentalFlags
!=
null
)
{
var
expFlags
=
_experimentalFlags
.
join
(
","
);
command
.
add
(
'--enable-experiment=
${expFlags}
'
);
}
printTrace
(
command
.
join
(
' '
));
printTrace
(
command
.
join
(
' '
));
_server
=
await
processManager
.
start
(
command
);
_server
=
await
processManager
.
start
(
command
);
_server
.
stdout
_server
.
stdout
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
763bf114
...
@@ -35,6 +35,7 @@ class FlutterDevice {
...
@@ -35,6 +35,7 @@ class FlutterDevice {
this
.
fileSystemScheme
,
this
.
fileSystemScheme
,
this
.
viewFilter
,
this
.
viewFilter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
List
<
String
>
experimentalFlags
,
ResidentCompiler
generator
,
ResidentCompiler
generator
,
})
:
assert
(
trackWidgetCreation
!=
null
),
})
:
assert
(
trackWidgetCreation
!=
null
),
generator
=
generator
??
ResidentCompiler
(
generator
=
generator
??
ResidentCompiler
(
...
@@ -43,6 +44,7 @@ class FlutterDevice {
...
@@ -43,6 +44,7 @@ class FlutterDevice {
fileSystemRoots:
fileSystemRoots
,
fileSystemRoots:
fileSystemRoots
,
fileSystemScheme:
fileSystemScheme
,
fileSystemScheme:
fileSystemScheme
,
targetModel:
targetModel
,
targetModel:
targetModel
,
experimentalFlags:
experimentalFlags
,
);
);
final
Device
device
;
final
Device
device
;
...
...
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