Rename 'contributing paths' to 'relevant paths'

This commit is contained in:
Lucien Greathouse
2019-10-04 17:36:26 -07:00
parent 052ca52cc3
commit 530a7aa834
34 changed files with 73 additions and 73 deletions

View File

@@ -23,7 +23,7 @@ pub struct InstanceMetadata {
/// even if they don't exist, since the presence of a file can change the
/// outcome of a snapshot function.
///
/// For example, a file named foo.lua might have these contributing paths:
/// For example, a file named foo.lua might have these relevant paths:
/// - foo.lua
/// - foo.meta.json (even if this file doesn't exist!)
///
@@ -39,7 +39,7 @@ pub struct InstanceMetadata {
/// that may need updates.
// TODO: Change this to be a SmallVec for performance in common cases?
#[serde(serialize_with = "path_serializer::serialize_vec_absolute")]
pub contributing_paths: Vec<PathBuf>,
pub relevant_paths: Vec<PathBuf>,
}
impl Default for InstanceMetadata {
@@ -47,7 +47,7 @@ impl Default for InstanceMetadata {
InstanceMetadata {
ignore_unknown_instances: false,
instigating_source: None,
contributing_paths: Vec::new(),
relevant_paths: Vec::new(),
}
}
}

View File

@@ -11,5 +11,5 @@ properties:
Value: Value of Foo
metadata:
ignore_unknown_instances: false
contributing_paths: []
children: []
relevant_paths: []
children: []

View File

@@ -8,5 +8,5 @@ class_name: ROOT
properties: {}
metadata:
ignore_unknown_instances: false
contributing_paths: []
children: []
relevant_paths: []
children: []

View File

@@ -11,5 +11,5 @@ properties:
Value: Should be removed
metadata:
ignore_unknown_instances: false
contributing_paths: []
children: []
relevant_paths: []
children: []

View File

@@ -8,5 +8,5 @@ class_name: Folder
properties: {}
metadata:
ignore_unknown_instances: false
contributing_paths: []
children: []
relevant_paths: []
children: []

View File

@@ -9,9 +9,9 @@ added_instances:
snapshot_id: ~
metadata:
ignore_unknown_instances: false
contributing_paths: []
relevant_paths: []
name: New
class_name: Folder
properties: {}
children: []
updated_instances: []
updated_instances: []

View File

@@ -113,12 +113,12 @@ impl RojoTree {
// If this instance's source path changed, we need to update our
// path associations so that file changes will trigger updates
// to this instance correctly.
if existing_metadata.contributing_paths != metadata.contributing_paths {
for existing_path in &existing_metadata.contributing_paths {
if existing_metadata.relevant_paths != metadata.relevant_paths {
for existing_path in &existing_metadata.relevant_paths {
self.path_to_ids.remove(existing_path, id);
}
for new_path in &metadata.contributing_paths {
for new_path in &metadata.relevant_paths {
self.path_to_ids.insert(new_path.clone(), id);
}
}
@@ -147,7 +147,7 @@ impl RojoTree {
}
fn insert_metadata(&mut self, id: RbxId, metadata: InstanceMetadata) {
for path in &metadata.contributing_paths {
for path in &metadata.relevant_paths {
self.path_to_ids.insert(path.clone(), id);
}
@@ -164,7 +164,7 @@ impl RojoTree {
) {
let metadata = self.metadata_map.remove(&id).unwrap();
for path in &metadata.contributing_paths {
for path in &metadata.relevant_paths {
self.path_to_ids.remove(path, id);
path_to_ids.insert(path.clone(), id);
}