Share scanned source storage across native publications
This commit is contained in:
1 parent
c09d545da6
commit
d6ab5a025f
6 files changed
+46
-10
No files matched your search
@@ -56,8 +56,8 @@ impl RevisionExecution {
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(id, source)| {
|
||||
// The previous result was built by this session. Match the
|
||||
// scanned bytes, including generated and stream input.
|
||||
// A shared source keeps its exact bytes across revisions.
|
||||
// Independently loaded sources can also have identical content.
|
||||
previous
|
||||
.and_then(|old| {
|
||||
old.execution
|
||||
@@ -65,7 +65,7 @@ impl RevisionExecution {
|
||||
.get(id)
|
||||
.zip(old.source_versions.get(id))
|
||||
})
|
||||
.filter(|(old_source, _)| *old_source == source)
|
||||
.filter(|(old_source, _)| Arc::ptr_eq(old_source, source) || old_source.as_ref() == source.as_ref())
|
||||
.map_or_else(
|
||||
|| SourceVersion {
|
||||
sha256: format!("{:x}", Sha256::digest(&source.data)),
|
||||
|
||||
Reference in new issue
Block a user