Rewrite Project, remove SourceProject (#274)

* Rewrite project file to have relative paths and drop SourceProject

* Redo project error types

* Tidy up and document Project type

* Strip out init command
This commit is contained in:
Lucien Greathouse
2019-12-12 14:45:15 -08:00
committed by GitHub
parent 47c7f63d75
commit 1f7f2b22e7
16 changed files with 233 additions and 539 deletions

View File

@@ -178,15 +178,20 @@ fn update_affected_instances<F: VfsFetcher>(
}
}
}
InstigatingSource::ProjectNode(instance_name, project_node) => {
InstigatingSource::ProjectNode(project_path, instance_name, project_node) => {
// This instance is the direct subject of a project node. Since
// there might be information associated with our instance from
// the project file, we snapshot the entire project node again.
let snapshot =
snapshot_project_node(&metadata.context, instance_name, project_node, &vfs)
.expect("snapshot failed")
.expect("snapshot did not return an instance");
let snapshot = snapshot_project_node(
&metadata.context,
&project_path,
instance_name,
project_node,
&vfs,
)
.expect("snapshot failed")
.expect("snapshot did not return an instance");
let patch_set = compute_patch_set(&snapshot, &tree, id);
apply_patch_set(tree, patch_set)