Bind native format inputs after moving a project tree

This commit is contained in:
gloamxun committed 2026-11-28 01:29:28 +08:00
1 parent c2e1e64a60
commit 1ad9c4db82
8 files changed
+509 -23

No files matched your search

+5
View File
@@ -615,6 +615,7 @@ struct PrefixInputGuard {
immutable: BTreeSet<PathBuf>,
generated: BTreeSet<PathBuf>,
lookups: Vec<ResourceLookup>,
format_input_bindings: BTreeMap<PathBuf, PathBuf>,
clock_environment: Option<[Option<OsString>; 3]>,
}
@@ -696,6 +697,7 @@ impl PrefixInputGuard {
immutable,
generated,
lookups: trace.lookups.clone(),
format_input_bindings: trace.format_input_bindings.clone(),
clock_environment: (!trace.file_modifications.is_empty()).then(date_environment),
})
}
@@ -765,6 +767,9 @@ impl PrefixInputGuard {
preparation: &HostPreparation,
) -> Result<(), String> {
let current = self.verify_project(request)?;
if self.format_input_bindings != world.trace().format_input_bindings {
return Err("checkpoint format input bindings changed".into());
}
if world.trace().reads.first() != current.file(&self.entry).map(|file| &file.version) {
return Err("checkpoint entry resolved to a different path".into());
}