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
542feb47
Unverified
Commit
542feb47
authored
Mar 18, 2020
by
Jonah Williams
Committed by
GitHub
Mar 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] remove unused Snapshot.dart artifact and associated code (#52821)
parent
da0788a1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
25 deletions
+11
-25
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+1
-10
flutter_command_runner.dart
.../flutter_tools/lib/src/runner/flutter_command_runner.dart
+1
-1
artifacts_test.dart
...ages/flutter_tools/test/general.shard/artifacts_test.dart
+2
-2
build_test.dart
...ges/flutter_tools/test/general.shard/base/build_test.dart
+0
-5
build_aot_test.dart
...ter_tools/test/general.shard/commands/build_aot_test.dart
+7
-7
No files found.
packages/flutter_tools/lib/src/artifacts.dart
View file @
542feb47
...
@@ -18,7 +18,6 @@ enum Artifact {
...
@@ -18,7 +18,6 @@ enum Artifact {
genSnapshot
,
genSnapshot
,
/// The flutter tester binary.
/// The flutter tester binary.
flutterTester
,
flutterTester
,
snapshotDart
,
flutterFramework
,
flutterFramework
,
/// The framework directory of the macOS desktop.
/// The framework directory of the macOS desktop.
flutterMacOSFramework
,
flutterMacOSFramework
,
...
@@ -73,8 +72,6 @@ String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMo
...
@@ -73,8 +72,6 @@ String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMo
return
'gen_snapshot'
;
return
'gen_snapshot'
;
case
Artifact
.
flutterTester
:
case
Artifact
.
flutterTester
:
return
'flutter_tester
$exe
'
;
return
'flutter_tester
$exe
'
;
case
Artifact
.
snapshotDart
:
return
'snapshot.dart'
;
case
Artifact
.
flutterFramework
:
case
Artifact
.
flutterFramework
:
return
'Flutter.framework'
;
return
'Flutter.framework'
;
case
Artifact
.
flutterMacOSFramework
:
case
Artifact
.
flutterMacOSFramework
:
...
@@ -155,9 +152,8 @@ class EngineBuildPaths {
...
@@ -155,9 +152,8 @@ class EngineBuildPaths {
// Manages the engine artifacts of Flutter.
// Manages the engine artifacts of Flutter.
abstract
class
Artifacts
{
abstract
class
Artifacts
{
static
LocalEngineArtifacts
getLocalEngine
(
String
engineSrcPath
,
EngineBuildPaths
engineBuildPaths
)
{
static
LocalEngineArtifacts
getLocalEngine
(
EngineBuildPaths
engineBuildPaths
)
{
return
LocalEngineArtifacts
(
return
LocalEngineArtifacts
(
engineSrcPath
,
engineBuildPaths
.
targetEngine
,
engineBuildPaths
.
targetEngine
,
engineBuildPaths
.
hostEngine
,
engineBuildPaths
.
hostEngine
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
...
@@ -247,7 +243,6 @@ class CachedArtifacts extends Artifacts {
...
@@ -247,7 +243,6 @@ class CachedArtifacts extends Artifacts {
String
_getIosArtifactPath
(
Artifact
artifact
,
TargetPlatform
platform
,
BuildMode
mode
)
{
String
_getIosArtifactPath
(
Artifact
artifact
,
TargetPlatform
platform
,
BuildMode
mode
)
{
switch
(
artifact
)
{
switch
(
artifact
)
{
case
Artifact
.
genSnapshot
:
case
Artifact
.
genSnapshot
:
case
Artifact
.
snapshotDart
:
case
Artifact
.
flutterFramework
:
case
Artifact
.
flutterFramework
:
case
Artifact
.
frontendServerSnapshotForEngineDartSdk
:
case
Artifact
.
frontendServerSnapshotForEngineDartSdk
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
...
@@ -441,7 +436,6 @@ HostPlatform _currentHostPlatformAsHost(Platform platform) {
...
@@ -441,7 +436,6 @@ HostPlatform _currentHostPlatformAsHost(Platform platform) {
/// Manages the artifacts of a locally built engine.
/// Manages the artifacts of a locally built engine.
class
LocalEngineArtifacts
extends
Artifacts
{
class
LocalEngineArtifacts
extends
Artifacts
{
LocalEngineArtifacts
(
LocalEngineArtifacts
(
this
.
_engineSrcPath
,
this
.
engineOutPath
,
this
.
engineOutPath
,
this
.
_hostEngineOutPath
,
{
this
.
_hostEngineOutPath
,
{
@required
FileSystem
fileSystem
,
@required
FileSystem
fileSystem
,
...
@@ -453,7 +447,6 @@ class LocalEngineArtifacts extends Artifacts {
...
@@ -453,7 +447,6 @@ class LocalEngineArtifacts extends Artifacts {
_processManager
=
processManager
,
_processManager
=
processManager
,
_platform
=
platform
;
_platform
=
platform
;
final
String
_engineSrcPath
;
final
String
engineOutPath
;
// TODO(goderbauer): This should be private.
final
String
engineOutPath
;
// TODO(goderbauer): This should be private.
final
String
_hostEngineOutPath
;
final
String
_hostEngineOutPath
;
final
FileSystem
_fileSystem
;
final
FileSystem
_fileSystem
;
...
@@ -466,8 +459,6 @@ class LocalEngineArtifacts extends Artifacts {
...
@@ -466,8 +459,6 @@ class LocalEngineArtifacts extends Artifacts {
platform
??=
_currentHostPlatform
(
_platform
);
platform
??=
_currentHostPlatform
(
_platform
);
final
String
artifactFileName
=
_artifactToFileName
(
artifact
,
platform
,
mode
);
final
String
artifactFileName
=
_artifactToFileName
(
artifact
,
platform
,
mode
);
switch
(
artifact
)
{
switch
(
artifact
)
{
case
Artifact
.
snapshotDart
:
return
_fileSystem
.
path
.
join
(
_engineSrcPath
,
'flutter'
,
'lib'
,
'snapshot'
,
artifactFileName
);
case
Artifact
.
genSnapshot
:
case
Artifact
.
genSnapshot
:
return
_genSnapshotPath
();
return
_genSnapshotPath
();
case
Artifact
.
flutterTester
:
case
Artifact
.
flutterTester
:
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
542feb47
...
@@ -281,7 +281,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
...
@@ -281,7 +281,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
final
String
enginePath
=
_findEnginePath
(
topLevelResults
);
final
String
enginePath
=
_findEnginePath
(
topLevelResults
);
if
(
enginePath
!=
null
)
{
if
(
enginePath
!=
null
)
{
contextOverrides
.
addAll
(<
Type
,
dynamic
>{
contextOverrides
.
addAll
(<
Type
,
dynamic
>{
Artifacts:
Artifacts
.
getLocalEngine
(
enginePath
,
_findEngineBuildPath
(
topLevelResults
,
enginePath
)),
Artifacts:
Artifacts
.
getLocalEngine
(
_findEngineBuildPath
(
topLevelResults
,
enginePath
)),
});
});
}
}
...
...
packages/flutter_tools/test/general.shard/artifacts_test.dart
View file @
542feb47
...
@@ -87,7 +87,7 @@ void main() {
...
@@ -87,7 +87,7 @@ void main() {
logger:
BufferLogger
.
test
(),
logger:
BufferLogger
.
test
(),
osUtils:
MockOperatingSystemUtils
(),
osUtils:
MockOperatingSystemUtils
(),
);
);
artifacts
=
LocalEngineArtifacts
(
fileSystem
.
currentDirectory
.
path
,
artifacts
=
LocalEngineArtifacts
(
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'android_debug_unopt'
),
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'android_debug_unopt'
),
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'host_debug_unopt'
),
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'host_debug_unopt'
),
cache:
cache
,
cache:
cache
,
...
@@ -128,7 +128,7 @@ void main() {
...
@@ -128,7 +128,7 @@ void main() {
});
});
testWithoutContext
(
'Looks up dart.exe on windows platforms'
,
()
async
{
testWithoutContext
(
'Looks up dart.exe on windows platforms'
,
()
async
{
artifacts
=
LocalEngineArtifacts
(
fileSystem
.
currentDirectory
.
path
,
artifacts
=
LocalEngineArtifacts
(
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'android_debug_unopt'
),
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'android_debug_unopt'
),
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'host_debug_unopt'
),
fileSystem
.
path
.
join
(
fileSystem
.
currentDirectory
.
path
,
'out'
,
'host_debug_unopt'
),
cache:
cache
,
cache:
cache
,
...
...
packages/flutter_tools/test/general.shard/base/build_test.dart
View file @
542feb47
...
@@ -241,11 +241,6 @@ void main() {
...
@@ -241,11 +241,6 @@ void main() {
mockArtifacts
=
MockArtifacts
();
mockArtifacts
=
MockArtifacts
();
mockXcode
=
MockXcode
();
mockXcode
=
MockXcode
();
when
(
mockXcode
.
sdkLocation
(
any
)).
thenAnswer
((
_
)
=>
Future
<
String
>.
value
(
kSDKPath
));
when
(
mockXcode
.
sdkLocation
(
any
)).
thenAnswer
((
_
)
=>
Future
<
String
>.
value
(
kSDKPath
));
for
(
final
BuildMode
mode
in
BuildMode
.
values
)
{
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
snapshotDart
,
platform:
anyNamed
(
'platform'
),
mode:
mode
)).
thenReturn
(
kSnapshotDart
);
}
});
});
final
Map
<
Type
,
Generator
>
contextOverrides
=
<
Type
,
Generator
>{
final
Map
<
Type
,
Generator
>
contextOverrides
=
<
Type
,
Generator
>{
...
...
packages/flutter_tools/test/general.shard/commands/build_aot_test.dart
View file @
542feb47
...
@@ -37,7 +37,7 @@ void main() {
...
@@ -37,7 +37,7 @@ void main() {
equals
(
'Flutter.framework not found at ios_profile/Flutter.framework'
),
equals
(
'Flutter.framework not found at ios_profile/Flutter.framework'
),
);
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
LocalEngineArtifacts
(
'
/engine'
,
'
ios_profile'
,
'host_profile'
,
Artifacts:
()
=>
LocalEngineArtifacts
(
'ios_profile'
,
'host_profile'
,
fileSystem:
memoryFileSystem
,
fileSystem:
memoryFileSystem
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
platform:
globals
.
platform
,
...
@@ -66,7 +66,7 @@ void main() {
...
@@ -66,7 +66,7 @@ void main() {
'Expected a string like "Apple (LLVM|clang) #.#.# (clang-####.#.##.#)".'
),
'Expected a string like "Apple (LLVM|clang) #.#.# (clang-####.#.##.#)".'
),
);
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
LocalEngineArtifacts
(
'
/engine'
,
'
ios_profile'
,
'host_profile'
,
Artifacts:
()
=>
LocalEngineArtifacts
(
'ios_profile'
,
'host_profile'
,
fileSystem:
memoryFileSystem
,
fileSystem:
memoryFileSystem
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
platform:
globals
.
platform
,
...
@@ -94,7 +94,7 @@ void main() {
...
@@ -94,7 +94,7 @@ void main() {
await
validateBitcode
(
BuildMode
.
profile
,
TargetPlatform
.
ios
);
await
validateBitcode
(
BuildMode
.
profile
,
TargetPlatform
.
ios
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
LocalEngineArtifacts
(
'
/engine'
,
'
ios_profile'
,
'host_profile'
,
Artifacts:
()
=>
LocalEngineArtifacts
(
'ios_profile'
,
'host_profile'
,
fileSystem:
memoryFileSystem
,
fileSystem:
memoryFileSystem
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
platform:
globals
.
platform
,
...
@@ -121,7 +121,7 @@ void main() {
...
@@ -121,7 +121,7 @@ void main() {
await
validateBitcode
(
BuildMode
.
profile
,
TargetPlatform
.
ios
);
await
validateBitcode
(
BuildMode
.
profile
,
TargetPlatform
.
ios
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
LocalEngineArtifacts
(
'
/engine'
,
'
ios_profile'
,
'host_profile'
,
Artifacts:
()
=>
LocalEngineArtifacts
(
'ios_profile'
,
'host_profile'
,
fileSystem:
memoryFileSystem
,
fileSystem:
memoryFileSystem
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
platform:
globals
.
platform
,
...
@@ -154,7 +154,7 @@ void main() {
...
@@ -154,7 +154,7 @@ void main() {
'of Xcode to at least 10.0.1.'
),
'of Xcode to at least 10.0.1.'
),
);
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
LocalEngineArtifacts
(
'
/engine'
,
'
ios_profile'
,
'host_profile'
,
Artifacts:
()
=>
LocalEngineArtifacts
(
'ios_profile'
,
'host_profile'
,
fileSystem:
memoryFileSystem
,
fileSystem:
memoryFileSystem
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
platform:
globals
.
platform
,
...
@@ -183,7 +183,7 @@ void main() {
...
@@ -183,7 +183,7 @@ void main() {
expect
(
testLogger
.
statusText
,
''
);
expect
(
testLogger
.
statusText
,
''
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
LocalEngineArtifacts
(
'
/engine'
,
'
ios_profile'
,
'host_profile'
,
Artifacts:
()
=>
LocalEngineArtifacts
(
'ios_profile'
,
'host_profile'
,
fileSystem:
memoryFileSystem
,
fileSystem:
memoryFileSystem
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
platform:
globals
.
platform
,
...
@@ -212,7 +212,7 @@ void main() {
...
@@ -212,7 +212,7 @@ void main() {
expect
(
testLogger
.
statusText
,
''
);
expect
(
testLogger
.
statusText
,
''
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
LocalEngineArtifacts
(
'
/engine'
,
'
ios_profile'
,
'host_profile'
,
Artifacts:
()
=>
LocalEngineArtifacts
(
'ios_profile'
,
'host_profile'
,
fileSystem:
memoryFileSystem
,
fileSystem:
memoryFileSystem
,
cache:
globals
.
cache
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
platform:
globals
.
platform
,
...
...
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