fix storing of build deps in pack
This commit is contained in:
parent
910f5c1a01
commit
8e63a943a5
|
@ -1072,18 +1072,18 @@ class PackFileCacheStrategy {
|
|||
return promise.then(() => {
|
||||
if (reportProgress) reportProgress(0.8, "serialize pack");
|
||||
this.logger.time(`store pack`);
|
||||
const updatedBuildDependencies = new Set(this.buildDependencies);
|
||||
for (const dep of newBuildDependencies) {
|
||||
updatedBuildDependencies.add(dep);
|
||||
}
|
||||
const content = new PackContainer(
|
||||
pack,
|
||||
this.version,
|
||||
this.buildSnapshot,
|
||||
this.buildDependencies,
|
||||
updatedBuildDependencies,
|
||||
this.resolveResults,
|
||||
this.resolveBuildDependenciesSnapshot
|
||||
);
|
||||
// You might think this breaks all access to the existing pack
|
||||
// which are still referenced, but serializing the pack memorizes
|
||||
// all data in the pack and makes it no longer need the backing file
|
||||
// So it's safe to replace the pack file
|
||||
return this.fileSerializer
|
||||
.serialize(content, {
|
||||
filename: `${this.cacheLocation}/index.pack`,
|
||||
|
|
Loading…
Reference in New Issue