From 219bc4c8a37c40a3d4573bca124635247f269062 Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Fri, 7 Mar 2025 18:04:36 -0500 Subject: [PATCH] Add comment about mock engine --- rust/kcl-lib/src/engine/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust/kcl-lib/src/engine/mod.rs b/rust/kcl-lib/src/engine/mod.rs index 2964a2a79..51784b1c4 100644 --- a/rust/kcl-lib/src/engine/mod.rs +++ b/rust/kcl-lib/src/engine/mod.rs @@ -228,6 +228,10 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static { cmd: &ModelingCmd, ) -> Result<(), crate::errors::KclError> { // In isolated mode, we don't send the command to the engine. + // + // Note: It's important to allow commands through for the mock engine + // because it needs the commands to build the artifact graph in sketch + // mode. if self.execution_kind().await.is_isolated() { return Ok(()); } @@ -253,6 +257,10 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static { cmd: &ModelingCmd, ) -> Result<(), crate::errors::KclError> { // In isolated mode, we don't send the command to the engine. + // + // Note: It's important to allow commands through for the mock engine + // because it needs the commands to build the artifact graph in sketch + // mode. if self.execution_kind().await.is_isolated() { return Ok(()); }