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
7086a2f4
Unverified
Commit
7086a2f4
authored
Nov 19, 2020
by
Jonah Williams
Committed by
GitHub
Nov 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[flutter_tools] wire up alternative invalidation strategy to features (#70865)" (#70884)
This reverts commit
ef474154
.
parent
37f4f1f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
71 deletions
+7
-71
features.dart
packages/flutter_tools/lib/src/features.dart
+0
-30
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+6
-7
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+0
-27
testbed.dart
packages/flutter_tools/test/src/testbed.dart
+1
-7
No files found.
packages/flutter_tools/lib/src/features.dart
View file @
7086a2f4
...
...
@@ -49,9 +49,6 @@ abstract class FeatureFlags {
/// Whether fast single widget reloads are enabled.
bool
get
isSingleWidgetReloadEnabled
=>
false
;
/// Whether the CFE experimental invalidation strategy is enabled.
bool
get
isExperimentalInvalidationStrategyEnabled
=>
false
;
/// Whether a particular feature is enabled for the current channel.
///
/// Prefer using one of the specific getters above instead of this API.
...
...
@@ -95,9 +92,6 @@ class FlutterFeatureFlags implements FeatureFlags {
@override
bool
get
isSingleWidgetReloadEnabled
=>
isEnabled
(
singleWidgetReload
);
@override
bool
get
isExperimentalInvalidationStrategyEnabled
=>
isEnabled
(
experimentalInvalidationStrategy
);
@override
bool
isEnabled
(
Feature
feature
)
{
final
String
currentChannel
=
_flutterVersion
.
channel
;
...
...
@@ -131,7 +125,6 @@ const List<Feature> allFeatures = <Feature>[
flutterAndroidFeature
,
flutterIOSFeature
,
flutterFuchsiaFeature
,
experimentalInvalidationStrategy
,
];
/// The [Feature] for flutter web.
...
...
@@ -277,29 +270,6 @@ const Feature singleWidgetReload = Feature(
),
);
/// The CFE experimental invalidation strategy.
const
Feature
experimentalInvalidationStrategy
=
Feature
(
name:
'Hot reload optimization that reduces incremental artifact size'
,
configSetting:
'experimental-invalidation-strategy'
,
environmentOverride:
'FLUTTER_CFE_EXPERIMENTAL_INVALIDATION'
,
master:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
true
,
),
dev:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
false
,
),
beta:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
false
,
),
stable:
FeatureChannelSetting
(
available:
true
,
enabledByDefault:
false
,
),
);
/// A [Feature] is a process for conditionally enabling tool features.
///
/// All settings are optional, and if not provided will generally default to
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
7086a2f4
...
...
@@ -139,13 +139,12 @@ class FlutterDevice {
}
else
{
// The flutter-widget-cache feature only applies to run mode.
List
<
String
>
extraFrontEndOptions
=
buildInfo
.
extraFrontEndOptions
;
extraFrontEndOptions
=
<
String
>[
if
(
featureFlags
.
isSingleWidgetReloadEnabled
)
'--flutter-widget-cache'
,
if
(
featureFlags
.
isExperimentalInvalidationStrategyEnabled
)
'--enable-experiment=alternative-invalidation-strategy'
,
...?
extraFrontEndOptions
,
];
if
(
featureFlags
.
isSingleWidgetReloadEnabled
)
{
extraFrontEndOptions
=
<
String
>[
'--flutter-widget-cache'
,
...?
extraFrontEndOptions
,
];
}
generator
=
ResidentCompiler
(
globals
.
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
7086a2f4
...
...
@@ -2578,33 +2578,6 @@ void main() {
FeatureFlags:
()
=>
TestFeatureFlags
(
isSingleWidgetReloadEnabled:
true
)
});
testUsingContext
(
'FlutterDevice passes alternative-invalidation-strategy flag when feature is enabled'
,
()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[]);
final
MockDevice
mockDevice
=
MockDevice
();
when
(
mockDevice
.
targetPlatform
).
thenAnswer
((
Invocation
invocation
)
async
{
return
TargetPlatform
.
android_arm
;
});
final
DefaultResidentCompiler
residentCompiler
=
(
await
FlutterDevice
.
create
(
mockDevice
,
buildInfo:
const
BuildInfo
(
BuildMode
.
debug
,
''
,
treeShakeIcons:
false
,
extraFrontEndOptions:
<
String
>[],
),
target:
null
,
platform:
null
,
)).
generator
as
DefaultResidentCompiler
;
expect
(
residentCompiler
.
extraFrontEndOptions
,
contains
(
'--enable-experiment=alternative-invalidation-strategy'
));
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
Artifacts
.
test
(),
FileSystem:
()
=>
MemoryFileSystem
.
test
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
FeatureFlags:
()
=>
TestFeatureFlags
(
isExperimentalInvalidationStrategyEnabled:
true
)
});
testUsingContext
(
'connect sets up log reader'
,
()
=>
testbed
.
run
(()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[]);
final
MockDevice
mockDevice
=
MockDevice
();
...
...
packages/flutter_tools/test/src/testbed.dart
View file @
7086a2f4
...
...
@@ -730,8 +730,7 @@ class TestFeatureFlags implements FeatureFlags {
this
.
isAndroidEnabled
=
true
,
this
.
isIOSEnabled
=
true
,
this
.
isFuchsiaEnabled
=
false
,
this
.
isExperimentalInvalidationStrategyEnabled
=
false
,
});
});
@override
final
bool
isLinuxEnabled
;
...
...
@@ -757,9 +756,6 @@ class TestFeatureFlags implements FeatureFlags {
@override
final
bool
isFuchsiaEnabled
;
@override
final
bool
isExperimentalInvalidationStrategyEnabled
;
@override
bool
isEnabled
(
Feature
feature
)
{
switch
(
feature
)
{
...
...
@@ -779,8 +775,6 @@ class TestFeatureFlags implements FeatureFlags {
return
isIOSEnabled
;
case
flutterFuchsiaFeature:
return
isFuchsiaEnabled
;
case
experimentalInvalidationStrategy:
return
isExperimentalInvalidationStrategyEnabled
;
}
return
false
;
}
...
...
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