Removed generated files, added cache clearing in debug

This commit is contained in:
elvis
2025-10-21 10:04:35 +02:00
parent f1ace24797
commit c3a8941baf
7 changed files with 52 additions and 1813 deletions

1
.gitignore vendored
View File

@ -96,3 +96,4 @@ Network Trash Folder
Network Trash Folder
Temporary Items
.apdisk

View File

@ -20,11 +20,18 @@ getrandom = "0.3" # dependency that has to be specified correctly for wasm
layout-rs = "0.1"
rfd = "*" # for file selection
ron = "*" # for serialization
rsprocess = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
assert = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
execution = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
bisimilarity = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
grammar_separated = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
# rsprocess = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
# assert = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
# execution = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
# bisimilarity = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
# grammar_separated = { version = "*", git = "https://tautocrono.it/elvis/ReactionSystems.git" }
rsprocess = { version = "*", path = "../../ReactionSystems/rsprocess/" }
assert = { version = "*", path = "../../ReactionSystems/assert/" }
execution = { version = "*", path = "../../ReactionSystems/execution/" }
bisimilarity = { version = "*", path = "../../ReactionSystems/bisimilarity/" }
grammar_separated = { version = "*", path = "../../ReactionSystems/grammar_separated/" }
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
wasm-bindgen = "0.2"

2
reaction_systems_gui/docs/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
reaction_systems_gui.js
reaction_systems_gui_bg.wasm

File diff suppressed because it is too large Load Diff

View File

@ -649,6 +649,12 @@ impl OutputsCache {
self.invalidate_cache(&output_id);
}
}
#[allow(dead_code)]
pub fn reset_cache(&mut self) {
let mut internals = self.internals.write().unwrap();
*internals = CacheInternals::default();
}
}
/// The graph 'global' state.
@ -1255,6 +1261,30 @@ impl eframe::App for AppHandle {
}
});
}
#[cfg(debug_assertions)]
{
use eframe::egui::{PopupCloseBehavior, RectAlign};
let response = egui::Frame::group(ui.style())
.show(ui, |ui| {
ui.set_max_height(20.);
ui.set_max_width(40.);
ui.vertical_centered(|ui| ui.button("Cache")).inner
})
.inner;
egui::Popup::menu(&response)
.align(RectAlign::BOTTOM_END)
.gap(4.)
.close_behavior(PopupCloseBehavior::CloseOnClickOutside)
.id(egui::Id::new("cache"))
.show(|ui| {
if ui.button("Clear").clicked() {
self.user_state.cache.reset_cache();
ui.close();
}
});
}
});
});

View File

@ -27,6 +27,13 @@ pub fn evaluate_node(
let mut to_ret = None;
#[cfg(debug_assertions)]
{
if !to_evaluate.is_empty() {
println!("evaluating nodes {:?}", to_evaluate);
}
}
// for each node to evaluate (in the correct order) finds the output and
// populates the cache
for node_id in to_evaluate {