mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-06-12 23:00:26 +00:00
Implement Syncback to support converting Roblox files to a Rojo project (#937)
This is a very large commit. Consider checking the linked PR for more information.
This commit is contained in:
@@ -183,7 +183,7 @@ impl JobThreadContext {
|
||||
if let Some(instigating_source) = &instance.metadata().instigating_source {
|
||||
match instigating_source {
|
||||
InstigatingSource::Path(path) => fs::remove_file(path).unwrap(),
|
||||
InstigatingSource::ProjectNode(_, _, _, _) => {
|
||||
InstigatingSource::ProjectNode { .. } => {
|
||||
log::warn!(
|
||||
"Cannot remove instance {:?}, it's from a project file",
|
||||
id
|
||||
@@ -231,7 +231,7 @@ impl JobThreadContext {
|
||||
log::warn!("Cannot change Source to non-string value.");
|
||||
}
|
||||
}
|
||||
InstigatingSource::ProjectNode(_, _, _, _) => {
|
||||
InstigatingSource::ProjectNode { .. } => {
|
||||
log::warn!(
|
||||
"Cannot remove instance {:?}, it's from a project file",
|
||||
id
|
||||
@@ -317,16 +317,21 @@ fn compute_and_apply_changes(tree: &mut RojoTree, vfs: &Vfs, id: Ref) -> Option<
|
||||
}
|
||||
},
|
||||
|
||||
InstigatingSource::ProjectNode(project_path, instance_name, project_node, parent_class) => {
|
||||
InstigatingSource::ProjectNode {
|
||||
path,
|
||||
name,
|
||||
node,
|
||||
parent_class,
|
||||
} => {
|
||||
// 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_result = snapshot_project_node(
|
||||
&metadata.context,
|
||||
project_path,
|
||||
instance_name,
|
||||
project_node,
|
||||
path,
|
||||
name,
|
||||
node,
|
||||
vfs,
|
||||
parent_class.as_ref().map(|name| name.as_str()),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user