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
f1f53460
Commit
f1f53460
authored
Feb 08, 2017
by
Devon Carew
Committed by
GitHub
Feb 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove sdk summaries (#7957)
parent
e742b901
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
76 deletions
+0
-76
cache.dart
packages/flutter_tools/lib/src/cache.dart
+0
-30
summary.dart
packages/flutter_tools/lib/src/dart/summary.dart
+0
-46
No files found.
packages/flutter_tools/lib/src/cache.dart
View file @
f1f53460
...
...
@@ -4,8 +4,6 @@
import
'dart:async'
;
import
'package:flutter_tools/src/dart/pub.dart'
;
import
'package:flutter_tools/src/dart/summary.dart'
;
import
'package:path/path.dart'
as
path
;
import
'base/context.dart'
;
...
...
@@ -247,8 +245,6 @@ class FlutterEngine {
static
const
String
kName
=
'engine'
;
static
const
String
kSkyEngine
=
'sky_engine'
;
static
const
String
kSdkBundleSpec
=
'spec.sum'
;
static
const
String
kSdkBundleStrong
=
'strong.sum'
;
final
Cache
cache
;
...
...
@@ -316,19 +312,10 @@ class FlutterEngine {
Directory
pkgDir
=
cache
.
getCacheDir
(
'pkg'
);
for
(
String
pkgName
in
_getPackageDirs
())
{
String
pkgPath
=
path
.
join
(
pkgDir
.
path
,
pkgName
);
String
dotPackagesPath
=
path
.
join
(
pkgPath
,
'.packages'
);
if
(!
fs
.
directory
(
pkgPath
).
existsSync
())
return
false
;
if
(!
fs
.
file
(
dotPackagesPath
).
existsSync
())
return
false
;
}
if
(!
fs
.
file
(
path
.
join
(
pkgDir
.
path
,
kSkyEngine
,
kSdkBundleSpec
)).
existsSync
())
return
false
;
if
(!
fs
.
file
(
path
.
join
(
pkgDir
.
path
,
kSkyEngine
,
kSdkBundleStrong
)).
existsSync
())
return
false
;
Directory
engineDir
=
cache
.
getArtifactDirectory
(
kName
);
for
(
List
<
String
>
toolsDir
in
_getBinaryDirs
())
{
Directory
dir
=
fs
.
directory
(
path
.
join
(
engineDir
.
path
,
toolsDir
[
0
]));
...
...
@@ -350,23 +337,6 @@ class FlutterEngine {
if
(
dir
.
existsSync
())
dir
.
deleteSync
(
recursive:
true
);
await
_downloadItem
(
'Downloading package
$pkgName
...'
,
url
+
pkgName
+
'.zip'
,
pkgDir
);
await
pubGet
(
directory:
pkgPath
);
}
Status
summarySpecStatus
=
logger
.
startProgress
(
'Building Dart SDK spec summary...'
);
try
{
String
skyEnginePath
=
path
.
join
(
pkgDir
.
path
,
kSkyEngine
);
buildSkyEngineSdkSummary
(
skyEnginePath
,
kSdkBundleSpec
,
false
);
}
finally
{
summarySpecStatus
.
stop
();
}
Status
summaryStrongStatus
=
logger
.
startProgress
(
'Building Dart SDK strong summary...'
);
try
{
String
skyEnginePath
=
path
.
join
(
pkgDir
.
path
,
kSkyEngine
);
buildSkyEngineSdkSummary
(
skyEnginePath
,
kSdkBundleStrong
,
true
);
}
finally
{
summaryStrongStatus
.
stop
();
}
Directory
engineDir
=
cache
.
getArtifactDirectory
(
kName
);
...
...
packages/flutter_tools/lib/src/dart/summary.dart
deleted
100644 → 0
View file @
e742b901
import
'package:analyzer/file_system/file_system.dart'
;
import
'package:analyzer/file_system/physical_file_system.dart'
;
import
'package:analyzer/src/context/builder.dart'
;
// ignore: implementation_imports
import
'package:analyzer/src/dart/sdk/sdk.dart'
;
// ignore: implementation_imports
import
'package:analyzer/src/generated/engine.dart'
;
// ignore: implementation_imports
import
'package:analyzer/src/generated/source.dart'
;
// ignore: implementation_imports
import
'package:analyzer/src/summary/summary_file_builder.dart'
;
// ignore: implementation_imports
import
'package:flutter_tools/src/globals.dart'
;
import
'package:path/path.dart'
as
pathos
;
import
'package:yaml/src/yaml_node.dart'
;
// ignore: implementation_imports
import
'../base/file_system.dart'
as
file
;
/// Given the [skyEnginePath], locate corresponding `_embedder.yaml` and compose
/// the full embedded Dart SDK, and build the [outBundleName] file with its
/// linked [strong] or spec summary.
void
buildSkyEngineSdkSummary
(
String
skyEnginePath
,
String
outBundleName
,
bool
strong
)
{
ResourceProvider
resourceProvider
=
PhysicalResourceProvider
.
INSTANCE
;
Map
<
String
,
List
<
Folder
>>
packageMap
=
<
String
,
List
<
Folder
>>{
'sky_engine'
:
<
Folder
>[
resourceProvider
.
getFolder
(
pathos
.
join
(
skyEnginePath
,
'lib'
))
]
};
// Read the `_embedder.yaml` file.
EmbedderYamlLocator
yamlLocator
=
new
EmbedderYamlLocator
(
packageMap
);
Map
<
Folder
,
YamlMap
>
embedderYamls
=
yamlLocator
.
embedderYamls
;
if
(
embedderYamls
.
length
!=
1
)
{
printError
(
'Exactly one _embedder.yaml was expected in
$packageMap
, '
'but
$embedderYamls
found.'
);
return
;
}
// Create the EmbedderSdk instance.
EmbedderSdk
sdk
=
new
EmbedderSdk
(
resourceProvider
,
embedderYamls
);
sdk
.
analysisOptions
=
new
AnalysisOptionsImpl
()..
strongMode
=
true
;
// Gather sources.
List
<
Source
>
sources
=
sdk
.
uris
.
map
(
sdk
.
mapDartUri
).
toList
();
// Build.
List
<
int
>
bytes
=
new
SummaryBuilder
(
sources
,
sdk
.
context
,
strong
).
build
();
String
outputPath
=
pathos
.
join
(
skyEnginePath
,
outBundleName
);
file
.
fs
.
file
(
outputPath
).
writeAsBytesSync
(
bytes
);
}
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