mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Remove NetworkClient from visibleServices in multiple snapshot test files
This commit is contained in:
parent
76e4bc4f25
commit
5298664bad
23 changed files with 43 additions and 38 deletions
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ syncSourceOnly: true
|
||||||
visibleServices:
|
visibleServices:
|
||||||
- Lighting
|
- Lighting
|
||||||
- MaterialService
|
- MaterialService
|
||||||
- NetworkClient
|
|
||||||
- ReplicatedFirst
|
- ReplicatedFirst
|
||||||
- ReplicatedStorage
|
- ReplicatedStorage
|
||||||
- ServerScriptService
|
- ServerScriptService
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,13 @@ fn middleware_for_script(inst: &Instance) -> Middleware {
|
||||||
.and_then(|db| db.enums.get("RunContext"))
|
.and_then(|db| db.enums.get("RunContext"))
|
||||||
.map(|e| &e.items);
|
.map(|e| &e.items);
|
||||||
|
|
||||||
let run_context_value = inst.properties.get(&ustr("RunContext")).and_then(|v| match v {
|
let run_context_value = inst
|
||||||
Variant::Enum(e) => Some(e.to_u32()),
|
.properties
|
||||||
_ => None,
|
.get(&ustr("RunContext"))
|
||||||
});
|
.and_then(|v| match v {
|
||||||
|
Variant::Enum(e) => Some(e.to_u32()),
|
||||||
|
_ => None,
|
||||||
|
});
|
||||||
|
|
||||||
if let (Some(enums), Some(value)) = (run_context_enums, run_context_value) {
|
if let (Some(enums), Some(value)) = (run_context_enums, run_context_value) {
|
||||||
for (name, &enum_value) in enums {
|
for (name, &enum_value) in enums {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,11 @@ pub fn syncback_rbxm<'sync>(
|
||||||
/// Clones a subtree from the source WeakDom, filtering out instances that match
|
/// Clones a subtree from the source WeakDom, filtering out instances that match
|
||||||
/// the provided ignoreTrees glob patterns.
|
/// the provided ignoreTrees glob patterns.
|
||||||
/// Each entry contains both the compiled Glob and the original pattern string.
|
/// Each entry contains both the compiled Glob and the original pattern string.
|
||||||
pub fn clone_tree_filtered(source: &WeakDom, root_ref: Ref, ignore_globs: &[(Glob, String)]) -> WeakDom {
|
pub fn clone_tree_filtered(
|
||||||
|
source: &WeakDom,
|
||||||
|
root_ref: Ref,
|
||||||
|
ignore_globs: &[(Glob, String)],
|
||||||
|
) -> WeakDom {
|
||||||
let root_inst = source.get_by_ref(root_ref).expect("root ref should exist");
|
let root_inst = source.get_by_ref(root_ref).expect("root ref should exist");
|
||||||
|
|
||||||
// Create a new tree with the root instance
|
// Create a new tree with the root instance
|
||||||
|
|
@ -104,7 +108,9 @@ fn add_children_filtered(
|
||||||
let child_path = inst_path(source, child_ref);
|
let child_path = inst_path(source, child_ref);
|
||||||
|
|
||||||
// Check if this child should be ignored
|
// Check if this child should be ignored
|
||||||
let should_ignore = ignore_globs.iter().any(|(glob, _)| glob.is_match(&child_path));
|
let should_ignore = ignore_globs
|
||||||
|
.iter()
|
||||||
|
.any(|(glob, _)| glob.is_match(&child_path));
|
||||||
|
|
||||||
if should_ignore {
|
if should_ignore {
|
||||||
log::debug!("Filtering out {child_path} from rbxm due to ignoreTrees pattern");
|
log::debug!("Filtering out {child_path} from rbxm due to ignoreTrees pattern");
|
||||||
|
|
|
||||||
|
|
@ -342,9 +342,11 @@ pub fn syncback_loop_with_stats(
|
||||||
let path = source.path();
|
let path = source.path();
|
||||||
if !path.to_string_lossy().ends_with(".project.json5")
|
if !path.to_string_lossy().ends_with(".project.json5")
|
||||||
&& !path.to_string_lossy().ends_with(".project.json")
|
&& !path.to_string_lossy().ends_with(".project.json")
|
||||||
&& path.exists() && !dirs_to_scan.contains(&path.to_path_buf()) {
|
&& path.exists()
|
||||||
dirs_to_scan.push(path.to_path_buf());
|
&& !dirs_to_scan.contains(&path.to_path_buf())
|
||||||
}
|
{
|
||||||
|
dirs_to_scan.push(path.to_path_buf());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -412,10 +414,7 @@ pub fn syncback_loop_with_stats(
|
||||||
if !is_valid_path(&ignore_patterns, project_path, file) {
|
if !is_valid_path(&ignore_patterns, project_path, file) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
log::trace!(
|
log::trace!("Adding alternate file to orphan check: {}", file.display());
|
||||||
"Adding alternate file to orphan check: {}",
|
|
||||||
file.display()
|
|
||||||
);
|
|
||||||
paths.insert(file.clone());
|
paths.insert(file.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -687,10 +686,22 @@ pub fn syncback_loop_with_stats(
|
||||||
} else {
|
} else {
|
||||||
format!("{}/{}", instance_path, name)
|
format!("{}/{}", instance_path, name)
|
||||||
};
|
};
|
||||||
collect_all_path_refs_and_mappings(child, base_path, &child_inst_path, protected, mappings);
|
collect_all_path_refs_and_mappings(
|
||||||
|
child,
|
||||||
|
base_path,
|
||||||
|
&child_inst_path,
|
||||||
|
protected,
|
||||||
|
mappings,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
collect_all_path_refs_and_mappings(&project.tree, project_path, "", &mut protected_paths, &mut path_to_instance_prefix);
|
collect_all_path_refs_and_mappings(
|
||||||
|
&project.tree,
|
||||||
|
project_path,
|
||||||
|
"",
|
||||||
|
&mut protected_paths,
|
||||||
|
&mut path_to_instance_prefix,
|
||||||
|
);
|
||||||
log::trace!("Protected $path references: {:?}", protected_paths);
|
log::trace!("Protected $path references: {:?}", protected_paths);
|
||||||
log::trace!("Path to instance mappings: {:?}", path_to_instance_prefix);
|
log::trace!("Path to instance mappings: {:?}", path_to_instance_prefix);
|
||||||
|
|
||||||
|
|
@ -757,7 +768,8 @@ pub fn syncback_loop_with_stats(
|
||||||
if !pattern_str.contains('*') && !pattern_str.contains('?') {
|
if !pattern_str.contains('*') && !pattern_str.contains('?') {
|
||||||
if pattern_str.starts_with(&inst_path_str)
|
if pattern_str.starts_with(&inst_path_str)
|
||||||
&& pattern_str.len() > inst_path_str.len()
|
&& pattern_str.len() > inst_path_str.len()
|
||||||
&& pattern_str.as_bytes().get(inst_path_str.len()) == Some(&b'/')
|
&& pattern_str.as_bytes().get(inst_path_str.len())
|
||||||
|
== Some(&b'/')
|
||||||
{
|
{
|
||||||
log::trace!(
|
log::trace!(
|
||||||
"Skipping {} (ancestor of literal ignoreTrees path, inst_path: {})",
|
"Skipping {} (ancestor of literal ignoreTrees path, inst_path: {})",
|
||||||
|
|
@ -773,11 +785,15 @@ pub fn syncback_loop_with_stats(
|
||||||
// that are inside this directory.
|
// that are inside this directory.
|
||||||
let dir_contains_match = existing_paths.iter().any(|child_path| {
|
let dir_contains_match = existing_paths.iter().any(|child_path| {
|
||||||
// Only check children of this directory
|
// Only check children of this directory
|
||||||
if !child_path.starts_with(&old_path_norm) || child_path == &old_path_norm {
|
if !child_path.starts_with(&old_path_norm)
|
||||||
|
|| child_path == &old_path_norm
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Convert child path to instance path and check glob match
|
// Convert child path to instance path and check glob match
|
||||||
if let Some(child_inst_path) = fs_path_to_instance_path(child_path) {
|
if let Some(child_inst_path) =
|
||||||
|
fs_path_to_instance_path(child_path)
|
||||||
|
{
|
||||||
if glob.is_match(&child_inst_path) {
|
if glob.is_match(&child_inst_path) {
|
||||||
log::trace!(
|
log::trace!(
|
||||||
"Directory {} contains ignored file {} (inst: {})",
|
"Directory {} contains ignored file {} (inst: {})",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue