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
4c511fbd
Unverified
Commit
4c511fbd
authored
Nov 09, 2020
by
Jonah Williams
Committed by
GitHub
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] remove workaround for caching sound dill (#70014)
parent
9f36a027
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
51 deletions
+0
-51
bundle.dart
packages/flutter_tools/lib/src/bundle.dart
+0
-11
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+0
-3
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+0
-1
test_compiler.dart
packages/flutter_tools/lib/src/test/test_compiler.dart
+0
-1
flutter_tester.dart
packages/flutter_tools/lib/src/tester/flutter_tester.dart
+0
-1
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+0
-34
No files found.
packages/flutter_tools/lib/src/bundle.dart
View file @
4c511fbd
...
...
@@ -29,12 +29,10 @@ String get defaultDepfilePath => globals.fs.path.join(getBuildDirectory(), 'snap
String
getDefaultApplicationKernelPath
(
{
@required
bool
trackWidgetCreation
,
@required
NullSafetyMode
nullSafetyMode
,
})
{
return
getKernelPathForTransformerOptions
(
globals
.
fs
.
path
.
join
(
getBuildDirectory
(),
'app.dill'
),
trackWidgetCreation:
trackWidgetCreation
,
nullSafetyMode:
nullSafetyMode
,
);
}
...
...
@@ -42,7 +40,6 @@ String getDefaultCachedKernelPath({
@required
bool
trackWidgetCreation
,
@required
List
<
String
>
dartDefines
,
@required
List
<
String
>
extraFrontEndOptions
,
@required
NullSafetyMode
nullSafetyMode
,
})
{
final
StringBuffer
buffer
=
StringBuffer
();
buffer
.
writeAll
(
dartDefines
);
...
...
@@ -56,21 +53,13 @@ String getDefaultCachedKernelPath({
return
getKernelPathForTransformerOptions
(
globals
.
fs
.
path
.
join
(
getBuildDirectory
(),
'
${buildPrefix}
cache.dill'
),
trackWidgetCreation:
trackWidgetCreation
,
nullSafetyMode:
nullSafetyMode
,
);
}
String
getKernelPathForTransformerOptions
(
String
path
,
{
@required
bool
trackWidgetCreation
,
@required
NullSafetyMode
nullSafetyMode
,
})
{
// Temporary work around until --initialize-from-dill accounts for sound mode.
// The tool does not know the compilation mode if [NullSafetyMode.autodetect] is
// selected.
if
(
nullSafetyMode
==
NullSafetyMode
.
sound
)
{
path
+=
'.sound'
;
}
if
(
trackWidgetCreation
)
{
path
+=
'.track.dill'
;
}
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
4c511fbd
...
...
@@ -123,7 +123,6 @@ class FlutterDevice {
trackWidgetCreation:
buildInfo
.
trackWidgetCreation
,
dartDefines:
buildInfo
.
dartDefines
,
extraFrontEndOptions:
extraFrontEndOptions
,
nullSafetyMode:
buildInfo
.
nullSafetyMode
,
),
targetModel:
TargetModel
.
dartdevc
,
extraFrontEndOptions:
extraFrontEndOptions
,
...
...
@@ -165,7 +164,6 @@ class FlutterDevice {
trackWidgetCreation:
buildInfo
.
trackWidgetCreation
,
dartDefines:
buildInfo
.
dartDefines
,
extraFrontEndOptions:
extraFrontEndOptions
,
nullSafetyMode:
buildInfo
.
nullSafetyMode
,
),
packagesPath:
buildInfo
.
packagesPath
,
artifacts:
globals
.
artifacts
,
...
...
@@ -1181,7 +1179,6 @@ abstract class ResidentRunner {
trackWidgetCreation:
trackWidgetCreation
,
dartDefines:
debuggingOptions
.
buildInfo
.
dartDefines
,
extraFrontEndOptions:
debuggingOptions
.
buildInfo
.
extraFrontEndOptions
,
nullSafetyMode:
debuggingOptions
.
buildInfo
.
nullSafetyMode
,
);
globals
.
fs
.
file
(
copyPath
)
...
...
packages/flutter_tools/lib/src/run_hot.dart
View file @
4c511fbd
...
...
@@ -330,7 +330,6 @@ class HotRunner extends ResidentRunner {
outputPath:
dillOutputPath
??
getDefaultApplicationKernelPath
(
trackWidgetCreation:
debuggingOptions
.
buildInfo
.
trackWidgetCreation
,
nullSafetyMode:
debuggingOptions
.
buildInfo
.
nullSafetyMode
,
),
packageConfig:
packageConfig
,
).
then
((
CompilerOutput
output
)
=>
output
?.
errorCount
==
0
)
...
...
packages/flutter_tools/lib/src/test/test_compiler.dart
View file @
4c511fbd
...
...
@@ -45,7 +45,6 @@ class TestCompiler {
'test_cache'
,
getDefaultCachedKernelPath
(
trackWidgetCreation:
buildInfo
.
trackWidgetCreation
,
nullSafetyMode:
buildInfo
.
nullSafetyMode
,
dartDefines:
buildInfo
.
dartDefines
,
extraFrontEndOptions:
buildInfo
.
extraFrontEndOptions
,
))
{
...
...
packages/flutter_tools/lib/src/tester/flutter_tester.dart
View file @
4c511fbd
...
...
@@ -153,7 +153,6 @@ class FlutterTesterDevice extends Device {
final
String
applicationKernelFilePath
=
getKernelPathForTransformerOptions
(
_fileSystem
.
path
.
join
(
_buildDirectory
,
'flutter-tester-app.dill'
),
trackWidgetCreation:
buildInfo
.
trackWidgetCreation
,
nullSafetyMode:
buildInfo
.
nullSafetyMode
,
);
// Build assets and perform initial compilation.
await
BundleBuilder
().
build
(
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
4c511fbd
...
...
@@ -2397,40 +2397,6 @@ void main() {
expect
(
await
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'build'
,
'cache.dill.track.dill'
)).
readAsString
(),
'ABC'
);
}));
testUsingContext
(
'HotRunner copies compiled app.dill to cache during startup with --sound-null-safety'
,
()
=>
testbed
.
run
(()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[
listViews
,
listViews
,
setAssetBundlePath
,
]);
setWsAddress
(
testUri
,
fakeVmServiceHost
.
vmService
);
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'lib'
,
'main.dart'
)).
createSync
(
recursive:
true
);
residentRunner
=
HotRunner
(
<
FlutterDevice
>[
mockFlutterDevice
,
],
stayResident:
false
,
debuggingOptions:
DebuggingOptions
.
enabled
(
const
BuildInfo
(
BuildMode
.
debug
,
''
,
treeShakeIcons:
false
,
trackWidgetCreation:
true
,
nullSafetyMode:
NullSafetyMode
.
sound
,
)),
);
residentRunner
.
artifactDirectory
.
childFile
(
'app.dill'
).
writeAsStringSync
(
'ABC'
);
when
(
mockFlutterDevice
.
runHot
(
hotRunner:
anyNamed
(
'hotRunner'
),
route:
anyNamed
(
'route'
),
)).
thenAnswer
((
Invocation
invocation
)
async
{
return
0
;
});
await
residentRunner
.
run
();
expect
(
await
globals
.
fs
.
file
(
globals
.
fs
.
path
.
join
(
'build'
,
'cache.dill.sound.track.dill'
)).
readAsString
(),
'ABC'
);
}));
testUsingContext
(
'HotRunner unforwards device ports'
,
()
=>
testbed
.
run
(()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[
listViews
,
...
...
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