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
700020fc
Unverified
Commit
700020fc
authored
Aug 20, 2019
by
Jonah Williams
Committed by
GitHub
Aug 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
per file caching (#38869)
parent
bbcfdea1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
file_hash_store.dart
...s/flutter_tools/lib/src/build_system/file_hash_store.dart
+1
-1
filecache_test.dart
...tools/test/general.shard/build_system/filecache_test.dart
+6
-3
No files found.
packages/flutter_tools/lib/src/build_system/file_hash_store.dart
View file @
700020fc
...
...
@@ -107,5 +107,5 @@ class FileHashStore {
return
dirty
;
}
File
get
_cacheFile
=>
environment
.
rootB
uildDir
.
childFile
(
_kFileCache
);
File
get
_cacheFile
=>
environment
.
b
uildDir
.
childFile
(
_kFileCache
);
}
packages/flutter_tools/test/general.shard/build_system/filecache_test.dart
View file @
700020fc
...
...
@@ -20,6 +20,7 @@ void main() {
environment
=
Environment
(
projectDir:
fs
.
currentDirectory
,
);
environment
.
buildDir
.
createSync
(
recursive:
true
);
});
});
...
...
@@ -28,9 +29,10 @@ void main() {
fileCache
.
initialize
();
fileCache
.
persist
();
expect
(
fs
.
file
(
fs
.
path
.
join
(
'build'
,
'.filecache'
)).
existsSync
(),
true
);
expect
(
fs
.
file
(
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'.filecache'
)).
existsSync
(),
true
);
final
List
<
int
>
buffer
=
fs
.
file
(
fs
.
path
.
join
(
'build'
,
'.filecache'
)).
readAsBytesSync
();
final
List
<
int
>
buffer
=
fs
.
file
(
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'.filecache'
))
.
readAsBytesSync
();
final
pb
.
FileStorage
fileStorage
=
pb
.
FileStorage
.
fromBuffer
(
buffer
);
expect
(
fileStorage
.
files
,
isEmpty
);
...
...
@@ -46,7 +48,8 @@ void main() {
fileCache
.
hashFiles
(<
File
>[
file
]);
fileCache
.
persist
();
final
String
currentHash
=
fileCache
.
currentHashes
[
file
.
resolveSymbolicLinksSync
()];
final
List
<
int
>
buffer
=
fs
.
file
(
fs
.
path
.
join
(
'build'
,
'.filecache'
)).
readAsBytesSync
();
final
List
<
int
>
buffer
=
fs
.
file
(
fs
.
path
.
join
(
environment
.
buildDir
.
path
,
'.filecache'
))
.
readAsBytesSync
();
pb
.
FileStorage
fileStorage
=
pb
.
FileStorage
.
fromBuffer
(
buffer
);
expect
(
fileStorage
.
files
.
single
.
hash
,
currentHash
);
...
...
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