re-ad deep_clone

the helper we were calling was pushing a new call, which was hanging
out. we can skip the middleman since we already have something properly
prepared, just without a stdlib in some cases.
This commit is contained in:
Paul Tagliamonte
2025-04-08 14:12:52 -04:00
parent 5f903b5817
commit 3594e7ded2

View File

@ -723,7 +723,9 @@ impl ExecutorContext {
preserve_mem: bool,
) -> Result<(EnvironmentRef, Option<ModelingSessionData>), KclErrorWithOutputs> {
exec_state.add_root_module_contents(program);
self.prepare_mem(exec_state).await?;
self.eval_prelude(exec_state, SourceRange::synthetic())
.await
.map_err(KclErrorWithOutputs::no_outputs)?;
let mut universe = std::collections::HashMap::new();
@ -932,12 +934,11 @@ impl ExecutorContext {
)
})?;
// TODO: fix this
/* if !self.is_mock() {
if !self.is_mock() {
let mut mem = exec_state.stack().deep_clone();
mem.restore_env(env_ref);
cache::write_old_memory((mem, exec_state.global.module_infos.clone())).await;
}*/
}
let session_data = self.engine.get_session_data().await;
Ok((env_ref, session_data))
}