Removed generated files, added cache clearing in debug
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -96,3 +96,4 @@ Network Trash Folder
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
|
||||
@ -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
2
reaction_systems_gui/docs/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
reaction_systems_gui.js
|
||||
reaction_systems_gui_bg.wasm
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user