mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor TODO list and improve error handling in RojoTree
- Removed outdated tasks related to scripts-only mode from the TODO list to streamline focus on current issues. - Enhanced the remove method in RojoTree to prevent unnecessary operations when an ID does not exist. - Improved error handling in the remove_metadata function to gracefully handle missing metadata. These changes aim to optimize task management and enhance the robustness of the RojoTree implementation.
This commit is contained in:
parent
9d387d2a52
commit
9d6b48a53e
2 changed files with 7 additions and 4 deletions
3
TODO.txt
3
TODO.txt
|
|
@ -345,9 +345,6 @@ we should support right-click to unselect the bubble (atlas/studio/skip)
|
||||||
[auto select issue]
|
[auto select issue]
|
||||||
when you commit changes on git, it's considered unchanged. we should send like the last git hash too, like prior to head, too.
|
when you commit changes on git, it's considered unchanged. we should send like the last git hash too, like prior to head, too.
|
||||||
|
|
||||||
[scripts only mode]
|
|
||||||
when in scripts only mode, try to avoid the entire tree where scripts dont exist to make syncing from the Roblox plugin faster. prune non-script leaves.
|
|
||||||
|
|
||||||
[yielding after sync]
|
[yielding after sync]
|
||||||
there is some process that is making disconnecting after a one-shot sync completes take FOREVER if the server is yielding (usually from the reconciler)
|
there is some process that is making disconnecting after a one-shot sync completes take FOREVER if the server is yielding (usually from the reconciler)
|
||||||
- once the one-shot sync completes, it should not be waiting for additional things to come from the server. it just needs to kill the connection immediately. and go back to the main page.
|
- once the one-shot sync completes, it should not be waiting for additional things to come from the server. it just needs to kill the connection immediately. and go back to the main page.
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,10 @@ impl RojoTree {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn remove(&mut self, id: Ref) {
|
pub fn remove(&mut self, id: Ref) {
|
||||||
|
if self.inner.get_by_ref(id).is_none() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let mut to_move = VecDeque::new();
|
let mut to_move = VecDeque::new();
|
||||||
to_move.push_back(id);
|
to_move.push_back(id);
|
||||||
|
|
||||||
|
|
@ -468,7 +472,9 @@ impl RojoTree {
|
||||||
/// Moves the Rojo metadata from the instance with the given ID from this
|
/// Moves the Rojo metadata from the instance with the given ID from this
|
||||||
/// tree into some loose maps.
|
/// tree into some loose maps.
|
||||||
fn remove_metadata(&mut self, id: Ref) {
|
fn remove_metadata(&mut self, id: Ref) {
|
||||||
let metadata = self.metadata_map.remove(&id).unwrap();
|
let Some(metadata) = self.metadata_map.remove(&id) else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
if let Some(specified) = metadata.specified_id {
|
if let Some(specified) = metadata.specified_id {
|
||||||
self.specified_id_to_refs.remove(&specified, id);
|
self.specified_id_to_refs.remove(&specified, id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue