2025-03-20 11:06:27 +13:00
use std ::{
panic ::{ catch_unwind , AssertUnwindSafe } ,
path ::{ Path , PathBuf } ,
} ;
2024-12-07 07:16:04 +13:00
2025-06-10 21:30:48 -04:00
use indexmap ::IndexMap ;
2024-11-18 16:20:32 -06:00
2025-06-10 21:30:48 -04:00
use crate ::{
errors ::KclError ,
execution ::{ EnvironmentRef , ModuleArtifactState } ,
ExecOutcome , ExecState , ExecutorContext , ModuleId ,
} ;
2025-04-26 21:21:26 -07:00
#[ cfg(feature = " artifact-graph " ) ]
2024-10-30 16:52:17 -04:00
use crate ::{
2025-06-16 13:55:24 -04:00
execution ::ArtifactGraph ,
2025-06-10 21:30:48 -04:00
modules ::{ ModulePath , ModuleRepr } ,
2024-10-30 16:52:17 -04:00
} ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
2025-03-06 18:01:24 -05:00
mod kcl_samples ;
/// A simulation test.
#[ derive(Debug, Clone) ]
struct Test {
/// The name of the test.
name : String ,
2025-06-10 21:30:48 -04:00
/// The KCL file that's the entry point, e.g. "main.kcl", in the `input_dir`.
2025-05-16 15:38:55 -04:00
entry_point : PathBuf ,
2025-03-06 18:01:24 -05:00
/// Input KCL files are in this directory.
input_dir : PathBuf ,
/// Expected snapshot output files are in this directory.
output_dir : PathBuf ,
2025-05-21 10:51:31 -04:00
/// True to skip asserting the artifact graph and only write it. The default
/// is false and to assert it.
#[ cfg_attr(not(feature = " artifact-graph " ), expect(dead_code)) ]
skip_assert_artifact_graph : bool ,
2025-03-06 18:01:24 -05:00
}
2025-03-07 18:45:33 -08:00
pub ( crate ) const RENDERED_MODEL_NAME : & str = " rendered_model.png " ;
2025-06-10 21:30:48 -04:00
#[ cfg(feature = " artifact-graph " ) ]
const REPO_ROOT : & str = " ../.. " ;
2025-03-06 18:01:24 -05:00
impl Test {
fn new ( name : & str ) -> Self {
Self {
name : name . to_owned ( ) ,
2025-05-16 15:38:55 -04:00
entry_point : Path ::new ( " tests " ) . join ( name ) . join ( " input.kcl " ) ,
2025-03-06 18:01:24 -05:00
input_dir : Path ::new ( " tests " ) . join ( name ) ,
output_dir : Path ::new ( " tests " ) . join ( name ) ,
2025-05-21 10:51:31 -04:00
skip_assert_artifact_graph : false ,
2025-03-06 18:01:24 -05:00
}
}
2025-05-16 13:56:19 -07:00
/// Read in the entry point file and return its contents as a string.
pub fn read ( & self ) -> String {
2025-05-18 19:28:59 -04:00
std ::fs ::read_to_string ( & self . entry_point )
. unwrap_or_else ( | e | panic! ( " Failed to read file: {:?} due to {e} " , self . entry_point ) )
2025-05-16 13:56:19 -07:00
}
2025-03-06 18:01:24 -05:00
}
2025-06-10 21:30:48 -04:00
impl ExecState {
/// Same as [`Self::into_exec_outcome`], but also returns the module state.
async fn into_test_exec_outcome (
self ,
main_ref : EnvironmentRef ,
ctx : & ExecutorContext ,
project_directory : & Path ,
) -> ( ExecOutcome , IndexMap < String , ModuleArtifactState > ) {
let module_state = self . to_module_state ( project_directory ) ;
let outcome = self . into_exec_outcome ( main_ref , ctx ) . await ;
( outcome , module_state )
}
#[ cfg(not(feature = " artifact-graph " )) ]
fn to_module_state ( & self , _project_directory : & Path ) -> IndexMap < String , ModuleArtifactState > {
Default ::default ( )
}
/// The keys of the map are the module paths. Can't use `ModulePath` since
/// it needs to be converted to a string to be a JSON object key. The paths
/// need to be relative so that generating locally works in CI.
#[ cfg(feature = " artifact-graph " ) ]
fn to_module_state ( & self , _project_directory : & Path ) -> IndexMap < String , ModuleArtifactState > {
let project_directory = std ::path ::Path ::new ( REPO_ROOT )
. canonicalize ( )
. unwrap_or_else ( | _ | panic! ( " Failed to canonicalize project directory: {REPO_ROOT} " ) ) ;
let mut module_state = IndexMap ::new ( ) ;
for info in self . modules ( ) . values ( ) {
let relative_path = relative_module_path ( & info . path , & project_directory ) . unwrap_or_else ( | err | {
panic! (
" Failed to get relative module path for {:?} in {:?}; caused by {err:?} " ,
& info . path , project_directory
)
} ) ;
match & info . repr {
ModuleRepr ::Root = > {
module_state . insert ( relative_path , self . root_module_artifact_state ( ) . clone ( ) ) ;
}
ModuleRepr ::Kcl ( _ , None ) = > {
module_state . insert ( relative_path , Default ::default ( ) ) ;
}
ModuleRepr ::Kcl ( _ , Some ( ( _ , _ , _ , module_artifacts ) ) ) = > {
module_state . insert ( relative_path , module_artifacts . clone ( ) ) ;
}
ModuleRepr ::Foreign ( _ , Some ( ( _ , module_artifacts ) ) ) = > {
module_state . insert ( relative_path , module_artifacts . clone ( ) ) ;
}
ModuleRepr ::Foreign ( _ , None ) | ModuleRepr ::Dummy = > { }
}
}
module_state
}
}
#[ cfg(feature = " artifact-graph " ) ]
fn relative_module_path ( module_path : & ModulePath , abs_project_directory : & Path ) -> Result < String , std ::io ::Error > {
match module_path {
ModulePath ::Main = > Ok ( " main " . to_owned ( ) ) ,
ModulePath ::Local { value : path } = > {
let abs_path = path . canonicalize ( ) ? ;
abs_path
. strip_prefix ( abs_project_directory )
. map ( | p | p . to_string_lossy ( ) )
. map_err ( | _ | std ::io ::Error ::other ( format! ( " Failed to strip prefix from module path {abs_path:?} " ) ) )
}
ModulePath ::Std { value } = > Ok ( format! ( " std:: {value} " ) ) ,
}
}
2025-03-06 18:01:24 -05:00
fn assert_snapshot < F , R > ( test : & Test , operation : & str , f : F )
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
where
F : FnOnce ( ) -> R ,
{
let mut settings = insta ::Settings ::clone_current ( ) ;
// These make the snapshots more readable and match our dir structure.
settings . set_omit_expression ( true ) ;
2025-03-06 18:01:24 -05:00
settings . set_snapshot_path ( Path ::new ( " .. " ) . join ( & test . output_dir ) ) ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
settings . set_prepend_module_to_snapshot ( false ) ;
2025-03-06 18:01:24 -05:00
settings . set_description ( format! ( " {operation} {} .kcl " , & test . name ) ) ;
2025-04-29 06:38:52 -07:00
// We don't do it on the flowchart
if operation ! = " Artifact graph flowchart " {
// Sorting maps makes them easier to diff.
settings . set_sort_maps ( true ) ;
}
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
// Replace UUIDs with the string "[uuid]", because otherwise the tests would constantly
// be changing the UUID. This is a stopgap measure until we make the engine more deterministic.
settings . add_filter (
r "\b[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}\b" ,
" [uuid] " ,
) ;
// Run `f` (the closure that was passed in) with these settings.
settings . bind ( f ) ;
}
fn parse ( test_name : & str ) {
2025-03-06 18:01:24 -05:00
parse_test ( & Test ::new ( test_name ) ) ;
}
fn parse_test ( test : & Test ) {
2025-05-16 13:56:19 -07:00
let input = test . read ( ) ;
2024-12-10 14:26:53 +13:00
let tokens = crate ::parsing ::token ::lex ( & input , ModuleId ::default ( ) ) . unwrap ( ) ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
// Parse the tokens into an AST.
2024-12-05 17:56:49 +13:00
let parse_res = Result ::< _ , KclError > ::Ok ( crate ::parsing ::parse_tokens ( tokens ) . unwrap ( ) ) ;
2025-03-06 18:01:24 -05:00
assert_snapshot ( test , " Result of parsing " , | | {
2025-03-20 11:06:27 +13:00
insta ::assert_json_snapshot! ( " ast " , parse_res , {
" .**.start " = > 0 ,
" .**.end " = > 0 ,
2025-04-07 17:42:15 +12:00
" .**.commentStart " = > 0 ,
2025-03-20 11:06:27 +13:00
} ) ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
} ) ;
}
2025-03-17 15:55:25 -07:00
async fn unparse ( test_name : & str ) {
unparse_test ( & Test ::new ( test_name ) ) . await ;
2025-03-06 18:01:24 -05:00
}
2025-03-17 15:55:25 -07:00
async fn unparse_test ( test : & Test ) {
2025-03-20 11:06:27 +13:00
// Parse into an AST
2025-05-16 13:56:19 -07:00
let input = test . read ( ) ;
2025-03-20 11:06:27 +13:00
let tokens = crate ::parsing ::token ::lex ( & input , ModuleId ::default ( ) ) . unwrap ( ) ;
let ast = crate ::parsing ::parse_tokens ( tokens ) . unwrap ( ) ;
// Check recasting.
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
let actual = ast . recast ( & Default ::default ( ) , 0 ) ;
2025-03-20 11:06:27 +13:00
let input_result = catch_unwind ( AssertUnwindSafe ( | | {
assert_snapshot ( test , " Result of unparsing " , | | {
insta ::assert_snapshot! ( " unparsed " , actual ) ;
} )
} ) ) ;
2025-03-17 15:55:25 -07:00
// Check all the rest of the files in the directory.
let kcl_files = crate ::unparser ::walk_dir ( & test . input_dir ) . await . unwrap ( ) ;
// Filter out the entry point file.
2025-05-16 15:38:55 -04:00
let kcl_files = kcl_files . into_iter ( ) . filter ( | f | f ! = & test . entry_point ) ;
2025-03-17 15:55:25 -07:00
let futures = kcl_files
. into_iter ( )
2025-03-29 19:26:20 -07:00
. filter ( | file | file . extension ( ) . is_some_and ( | ext | ext = = " kcl " ) ) // We only care about kcl
// files here.
2025-03-17 15:55:25 -07:00
. map ( | file | {
2025-03-20 11:06:27 +13:00
let snap_path = Path ::new ( " .. " ) . join ( & test . output_dir ) ;
2025-03-17 15:55:25 -07:00
tokio ::spawn ( async move {
2025-03-20 11:06:27 +13:00
let contents = tokio ::fs ::read_to_string ( & file ) . await . unwrap ( ) ;
let program = crate ::Program ::parse_no_errs ( & contents ) . unwrap ( ) ;
2025-03-17 15:55:25 -07:00
let recast = program . recast_with_options ( & Default ::default ( ) ) ;
2025-03-20 11:06:27 +13:00
catch_unwind ( AssertUnwindSafe ( | | {
let mut settings = insta ::Settings ::clone_current ( ) ;
settings . set_omit_expression ( true ) ;
settings . set_snapshot_path ( snap_path ) ;
settings . set_prepend_module_to_snapshot ( false ) ;
settings . set_snapshot_suffix ( file . file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ) ;
settings . set_description ( format! ( " Result of unparsing {} " , file . display ( ) ) ) ;
// Run `f` (the closure that was passed in) with these settings.
settings . bind ( | | {
insta ::assert_snapshot! ( " unparsed " , recast ) ;
} )
} ) )
2025-03-17 15:55:25 -07:00
} )
} )
. collect ::< Vec < _ > > ( ) ;
// Join all futures and await their completion.
for future in futures {
future . await . unwrap ( ) . unwrap ( ) ;
}
2025-03-20 11:06:27 +13:00
input_result . unwrap ( ) ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
}
2024-10-31 11:43:14 -05:00
async fn execute ( test_name : & str , render_to_png : bool ) {
2025-03-07 18:45:33 -08:00
execute_test ( & Test ::new ( test_name ) , render_to_png , false ) . await
2025-03-06 18:01:24 -05:00
}
2025-03-07 18:45:33 -08:00
async fn execute_test ( test : & Test , render_to_png : bool , export_step : bool ) {
2025-05-16 13:56:19 -07:00
let input = test . read ( ) ;
2025-03-20 11:06:27 +13:00
let ast = crate ::Program ::parse_no_errs ( & input ) . unwrap ( ) ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
// Run the program.
2025-05-16 15:38:55 -04:00
let exec_res = crate ::test_server ::execute_and_snapshot_ast ( ast , Some ( test . entry_point . clone ( ) ) , export_step ) . await ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
match exec_res {
2025-06-05 15:56:43 +12:00
Ok ( ( exec_state , ctx , env_ref , png , step ) ) = > {
2025-03-06 18:01:24 -05:00
let fail_path = test . output_dir . join ( " execution_error.snap " ) ;
if std ::fs ::exists ( & fail_path ) . unwrap ( ) {
panic! ( " This test case is expected to fail, but it passed. If this is intended, and the test should actually be passing now, please delete kcl-lib/ {} " , fail_path . to_string_lossy ( ) )
KCL: Use keyword arguments for line, lineTo, extrude and close (#5249)
Part of #4600.
PR: https://github.com/KittyCAD/modeling-app/pull/4826
# Changes to KCL stdlib
- `line(point, sketch, tag)` and `lineTo(point, sketch, tag)` are combined into `line(@sketch, end?, endAbsolute?, tag?)`
- `close(sketch, tag?)` is now `close(@sketch, tag?)`
- `extrude(length, sketch)` is now `extrude(@sketch, length)`
Note that if a parameter starts with `@` like `@sketch`, it doesn't have any label when called, so you call it like this:
```
sketch = startSketchAt([0, 0])
line(sketch, end = [3, 3], tag = $hi)
```
Note also that if you're using a `|>` pipeline, you can omit the `@` argument and it will be assumed to be the LHS of the `|>`. So the above could be written as
```
sketch = startSketchAt([0, 0])
|> line(end = [3, 3], tag = $hi)
```
Also changes frontend tests to use KittyCAD/kcl-samples#139 instead of its main
The regex find-and-replace I use for migrating code (note these don't work with multi-line expressions) are:
```
line\(([^=]*), %\)
line(end = $1)
line\((.*), %, (.*)\)
line(end = $1, tag = $2)
lineTo\((.*), %\)
line(endAbsolute = $1)
lineTo\((.*), %, (.*)\)
line(endAbsolute = $1, tag = $2)
extrude\((.*), %\)
extrude(length = $1)
extrude\(([^=]*), ([a-zA-Z0-9]+)\)
extrude($2, length = $1)
close\(%, (.*)\)
close(tag = $1)
```
# Selected notes from commits before I squash them all
* Fix test 'yRelative to horizontal distance'
Fixes:
- Make a lineTo helper
- Fix pathToNode to go through the labeled arg .arg property
* Fix test by changing lookups into transformMap
Parts of the code assumed that `line` is always a relative call. But
actually now it might be absolute, if it's got an `endAbsolute` parameter.
So, change whether to look up `line` or `lineTo` and the relevant absolute
or relative line types based on that parameter.
* Stop asserting on exact source ranges
When I changed line to kwargs, all the source ranges we assert on became
slightly different. I find these assertions to be very very low value.
So I'm removing them.
* Fix more tests: getConstraintType calls weren't checking if the
'line' fn was absolute or relative.
* Fixed another queryAst test
There were 2 problems:
- Test was looking for the old style of `line` call to choose an offset
for pathToNode
- Test assumed that the `tag` param was always the third one, but in
a kwarg call, you have to look it up by label
* Fix test: traverse was not handling CallExpressionKw
* Fix another test, addTagKw
addTag helper was not aware of kw args.
* Convert close from positional to kwargs
If the close() call has 0 args, or a single unlabeled arg, the parser
interprets it as a CallExpression (positional) not a CallExpressionKw.
But then if a codemod wants to add a tag to it, it tries adding a kwarg
called 'tag', which fails because the CallExpression doesn't need
kwargs inserted into it.
The fix is: change the node from CallExpression to CallExpressionKw, and
update getNodeFromPath to take a 'replacement' arg, so we can replace
the old node with the new node in the AST.
* Fix the last test
Test was looking for `lineTo` as a substring of the input KCL program.
But there's no more lineTo function, so I changed it to look for
line() with an endAbsolute arg, which is the new equivalent.
Also changed the getConstraintInfo code to look up the lineTo if using
line with endAbsolute.
* Fix many bad regex find-replaces
I wrote a regex find-and-replace which converted `line` calls from
positional to keyword calls. But it was accidentally applied to more
places than it should be, for example, angledLine, xLine and yLine calls.
Fixes this.
* Fixes test 'Basic sketch › code pane closed at start'
Problem was, the getNodeFromPath call might not actually find a callExpressionKw,
it might find a callExpression. So the `giveSketchFnCallTag` thought
it was modifying a kwargs call, but it was actually modifying a positional
call.
This meant it tried to push a labeled argument in, rather than a normal
arg, and a lot of other problems. Fixed by doing runtime typechecking.
* Fix: Optional args given with wrong type were silently ignored
Optional args don't have to be given. But if the user gives them, they
should be the right type.
Bug: if the KCL interpreter found an optional arg, which was given, but
was the wrong type, it would ignore it and pretend the arg was never
given at all. This was confusing for users.
Fix: Now if you give an optional arg, but it's the wrong type, KCL will
emit a type error just like it would for a mandatory argument.
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2025-02-04 08:31:43 -06:00
}
2024-10-31 11:43:14 -05:00
if render_to_png {
2025-03-07 18:45:33 -08:00
twenty_twenty ::assert_image ( test . output_dir . join ( RENDERED_MODEL_NAME ) , & png , 0.99 ) ;
}
2025-03-19 16:43:10 -07:00
// Ensure the step has data.
if export_step {
let Some ( step_contents ) = step else {
panic! ( " Step data was not generated " ) ;
} ;
if step_contents . is_empty ( ) {
panic! ( " Step data was empty " ) ;
}
2024-10-31 11:43:14 -05:00
}
2025-06-10 21:30:48 -04:00
let ( outcome , module_state ) = exec_state . into_test_exec_outcome ( env_ref , & ctx , & test . input_dir ) . await ;
2025-03-20 11:06:27 +13:00
let mem_result = catch_unwind ( AssertUnwindSafe ( | | {
assert_snapshot ( test , " Variables in memory after executing " , | | {
insta ::assert_json_snapshot! ( " program_memory " , outcome . variables , {
2025-05-28 11:25:27 +12:00
" .**.sourceRange " = > Vec ::new ( ) ,
2025-03-20 11:06:27 +13:00
} )
} )
} ) ) ;
2025-06-10 21:30:48 -04:00
#[ cfg(not(feature = " artifact-graph " )) ]
drop ( module_state ) ;
2025-04-26 21:21:26 -07:00
#[ cfg(feature = " artifact-graph " ) ]
2025-06-16 13:55:24 -04:00
assert_artifact_snapshots ( test , module_state , outcome . artifact_graph ) ;
2025-03-20 11:06:27 +13:00
mem_result . unwrap ( ) ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
}
Err ( e ) = > {
2025-03-06 18:01:24 -05:00
let ok_path = test . output_dir . join ( " program_memory.snap " ) ;
let previously_passed = std ::fs ::exists ( & ok_path ) . unwrap ( ) ;
2024-12-16 13:10:31 -05:00
match e . error {
2024-11-25 17:28:57 -06:00
crate ::errors ::ExecError ::Kcl ( error ) = > {
// Snapshot the KCL error with a fancy graphical report.
// This looks like a Cargo compile error, with arrows pointing
// to source code, underlines, etc.
2025-02-26 19:29:59 -08:00
miette ::set_hook ( Box ::new ( | _ | {
Box ::new ( miette ::MietteHandlerOpts ::new ( ) . show_related_errors_as_nested ( ) . build ( ) )
} ) )
. unwrap ( ) ;
2025-03-07 18:45:33 -08:00
let report = error . clone ( ) . into_miette_report_with_outputs ( & input ) . unwrap ( ) ;
2024-11-25 17:28:57 -06:00
let report = miette ::Report ::new ( report ) ;
KCL: Use keyword arguments for line, lineTo, extrude and close (#5249)
Part of #4600.
PR: https://github.com/KittyCAD/modeling-app/pull/4826
# Changes to KCL stdlib
- `line(point, sketch, tag)` and `lineTo(point, sketch, tag)` are combined into `line(@sketch, end?, endAbsolute?, tag?)`
- `close(sketch, tag?)` is now `close(@sketch, tag?)`
- `extrude(length, sketch)` is now `extrude(@sketch, length)`
Note that if a parameter starts with `@` like `@sketch`, it doesn't have any label when called, so you call it like this:
```
sketch = startSketchAt([0, 0])
line(sketch, end = [3, 3], tag = $hi)
```
Note also that if you're using a `|>` pipeline, you can omit the `@` argument and it will be assumed to be the LHS of the `|>`. So the above could be written as
```
sketch = startSketchAt([0, 0])
|> line(end = [3, 3], tag = $hi)
```
Also changes frontend tests to use KittyCAD/kcl-samples#139 instead of its main
The regex find-and-replace I use for migrating code (note these don't work with multi-line expressions) are:
```
line\(([^=]*), %\)
line(end = $1)
line\((.*), %, (.*)\)
line(end = $1, tag = $2)
lineTo\((.*), %\)
line(endAbsolute = $1)
lineTo\((.*), %, (.*)\)
line(endAbsolute = $1, tag = $2)
extrude\((.*), %\)
extrude(length = $1)
extrude\(([^=]*), ([a-zA-Z0-9]+)\)
extrude($2, length = $1)
close\(%, (.*)\)
close(tag = $1)
```
# Selected notes from commits before I squash them all
* Fix test 'yRelative to horizontal distance'
Fixes:
- Make a lineTo helper
- Fix pathToNode to go through the labeled arg .arg property
* Fix test by changing lookups into transformMap
Parts of the code assumed that `line` is always a relative call. But
actually now it might be absolute, if it's got an `endAbsolute` parameter.
So, change whether to look up `line` or `lineTo` and the relevant absolute
or relative line types based on that parameter.
* Stop asserting on exact source ranges
When I changed line to kwargs, all the source ranges we assert on became
slightly different. I find these assertions to be very very low value.
So I'm removing them.
* Fix more tests: getConstraintType calls weren't checking if the
'line' fn was absolute or relative.
* Fixed another queryAst test
There were 2 problems:
- Test was looking for the old style of `line` call to choose an offset
for pathToNode
- Test assumed that the `tag` param was always the third one, but in
a kwarg call, you have to look it up by label
* Fix test: traverse was not handling CallExpressionKw
* Fix another test, addTagKw
addTag helper was not aware of kw args.
* Convert close from positional to kwargs
If the close() call has 0 args, or a single unlabeled arg, the parser
interprets it as a CallExpression (positional) not a CallExpressionKw.
But then if a codemod wants to add a tag to it, it tries adding a kwarg
called 'tag', which fails because the CallExpression doesn't need
kwargs inserted into it.
The fix is: change the node from CallExpression to CallExpressionKw, and
update getNodeFromPath to take a 'replacement' arg, so we can replace
the old node with the new node in the AST.
* Fix the last test
Test was looking for `lineTo` as a substring of the input KCL program.
But there's no more lineTo function, so I changed it to look for
line() with an endAbsolute arg, which is the new equivalent.
Also changed the getConstraintInfo code to look up the lineTo if using
line with endAbsolute.
* Fix many bad regex find-replaces
I wrote a regex find-and-replace which converted `line` calls from
positional to keyword calls. But it was accidentally applied to more
places than it should be, for example, angledLine, xLine and yLine calls.
Fixes this.
* Fixes test 'Basic sketch › code pane closed at start'
Problem was, the getNodeFromPath call might not actually find a callExpressionKw,
it might find a callExpression. So the `giveSketchFnCallTag` thought
it was modifying a kwargs call, but it was actually modifying a positional
call.
This meant it tried to push a labeled argument in, rather than a normal
arg, and a lot of other problems. Fixed by doing runtime typechecking.
* Fix: Optional args given with wrong type were silently ignored
Optional args don't have to be given. But if the user gives them, they
should be the right type.
Bug: if the KCL interpreter found an optional arg, which was given, but
was the wrong type, it would ignore it and pretend the arg was never
given at all. This was confusing for users.
Fix: Now if you give an optional arg, but it's the wrong type, KCL will
emit a type error just like it would for a mandatory argument.
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2025-02-04 08:31:43 -06:00
if previously_passed {
2025-03-06 18:01:24 -05:00
eprintln! ( " This test case failed, but it previously passed. If this is intended, and the test should actually be failing now, please delete kcl-lib/ {} and other associated passing artifacts " , ok_path . to_string_lossy ( ) ) ;
KCL: Use keyword arguments for line, lineTo, extrude and close (#5249)
Part of #4600.
PR: https://github.com/KittyCAD/modeling-app/pull/4826
# Changes to KCL stdlib
- `line(point, sketch, tag)` and `lineTo(point, sketch, tag)` are combined into `line(@sketch, end?, endAbsolute?, tag?)`
- `close(sketch, tag?)` is now `close(@sketch, tag?)`
- `extrude(length, sketch)` is now `extrude(@sketch, length)`
Note that if a parameter starts with `@` like `@sketch`, it doesn't have any label when called, so you call it like this:
```
sketch = startSketchAt([0, 0])
line(sketch, end = [3, 3], tag = $hi)
```
Note also that if you're using a `|>` pipeline, you can omit the `@` argument and it will be assumed to be the LHS of the `|>`. So the above could be written as
```
sketch = startSketchAt([0, 0])
|> line(end = [3, 3], tag = $hi)
```
Also changes frontend tests to use KittyCAD/kcl-samples#139 instead of its main
The regex find-and-replace I use for migrating code (note these don't work with multi-line expressions) are:
```
line\(([^=]*), %\)
line(end = $1)
line\((.*), %, (.*)\)
line(end = $1, tag = $2)
lineTo\((.*), %\)
line(endAbsolute = $1)
lineTo\((.*), %, (.*)\)
line(endAbsolute = $1, tag = $2)
extrude\((.*), %\)
extrude(length = $1)
extrude\(([^=]*), ([a-zA-Z0-9]+)\)
extrude($2, length = $1)
close\(%, (.*)\)
close(tag = $1)
```
# Selected notes from commits before I squash them all
* Fix test 'yRelative to horizontal distance'
Fixes:
- Make a lineTo helper
- Fix pathToNode to go through the labeled arg .arg property
* Fix test by changing lookups into transformMap
Parts of the code assumed that `line` is always a relative call. But
actually now it might be absolute, if it's got an `endAbsolute` parameter.
So, change whether to look up `line` or `lineTo` and the relevant absolute
or relative line types based on that parameter.
* Stop asserting on exact source ranges
When I changed line to kwargs, all the source ranges we assert on became
slightly different. I find these assertions to be very very low value.
So I'm removing them.
* Fix more tests: getConstraintType calls weren't checking if the
'line' fn was absolute or relative.
* Fixed another queryAst test
There were 2 problems:
- Test was looking for the old style of `line` call to choose an offset
for pathToNode
- Test assumed that the `tag` param was always the third one, but in
a kwarg call, you have to look it up by label
* Fix test: traverse was not handling CallExpressionKw
* Fix another test, addTagKw
addTag helper was not aware of kw args.
* Convert close from positional to kwargs
If the close() call has 0 args, or a single unlabeled arg, the parser
interprets it as a CallExpression (positional) not a CallExpressionKw.
But then if a codemod wants to add a tag to it, it tries adding a kwarg
called 'tag', which fails because the CallExpression doesn't need
kwargs inserted into it.
The fix is: change the node from CallExpression to CallExpressionKw, and
update getNodeFromPath to take a 'replacement' arg, so we can replace
the old node with the new node in the AST.
* Fix the last test
Test was looking for `lineTo` as a substring of the input KCL program.
But there's no more lineTo function, so I changed it to look for
line() with an endAbsolute arg, which is the new equivalent.
Also changed the getConstraintInfo code to look up the lineTo if using
line with endAbsolute.
* Fix many bad regex find-replaces
I wrote a regex find-and-replace which converted `line` calls from
positional to keyword calls. But it was accidentally applied to more
places than it should be, for example, angledLine, xLine and yLine calls.
Fixes this.
* Fixes test 'Basic sketch › code pane closed at start'
Problem was, the getNodeFromPath call might not actually find a callExpressionKw,
it might find a callExpression. So the `giveSketchFnCallTag` thought
it was modifying a kwargs call, but it was actually modifying a positional
call.
This meant it tried to push a labeled argument in, rather than a normal
arg, and a lot of other problems. Fixed by doing runtime typechecking.
* Fix: Optional args given with wrong type were silently ignored
Optional args don't have to be given. But if the user gives them, they
should be the right type.
Bug: if the KCL interpreter found an optional arg, which was given, but
was the wrong type, it would ignore it and pretend the arg was never
given at all. This was confusing for users.
Fix: Now if you give an optional arg, but it's the wrong type, KCL will
emit a type error just like it would for a mandatory argument.
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2025-02-04 08:31:43 -06:00
panic! ( " {report:?} " ) ;
}
2024-11-25 17:28:57 -06:00
let report = format! ( " {:?} " , report ) ;
2025-03-20 11:06:27 +13:00
let err_result = catch_unwind ( AssertUnwindSafe ( | | {
assert_snapshot ( test , " Error from executing " , | | {
insta ::assert_snapshot! ( " execution_error " , report ) ;
} )
} ) ) ;
2024-12-16 13:10:31 -05:00
2025-04-26 21:21:26 -07:00
#[ cfg(feature = " artifact-graph " ) ]
2025-06-10 21:30:48 -04:00
{
let module_state = e
. exec_state
. map ( | e | e . to_module_state ( & test . input_dir ) )
. unwrap_or_default ( ) ;
2025-06-16 13:55:24 -04:00
assert_artifact_snapshots ( test , module_state , error . artifact_graph ) ;
2025-06-10 21:30:48 -04:00
}
2025-03-20 11:06:27 +13:00
err_result . unwrap ( ) ;
2024-11-25 17:28:57 -06:00
}
e = > {
// These kinds of errors aren't expected to occur. We don't
// snapshot them because they indicate there's something wrong
// with the Rust test, not with the KCL code being tested.
panic! ( " {e} " )
}
} ;
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
}
}
}
2025-06-10 21:30:48 -04:00
/// Assert snapshots for artifacts that should happen both when KCL execution
/// succeeds and when it results in an error.
2025-04-26 21:21:26 -07:00
#[ cfg(feature = " artifact-graph " ) ]
2025-06-10 21:30:48 -04:00
fn assert_artifact_snapshots (
2025-03-06 18:01:24 -05:00
test : & Test ,
2025-06-10 21:30:48 -04:00
module_state : IndexMap < String , ModuleArtifactState > ,
2025-01-31 18:32:30 -05:00
artifact_graph : ArtifactGraph ,
) {
2025-06-10 21:30:48 -04:00
let module_operations = module_state
. iter ( )
. map ( | ( path , s ) | ( path , & s . operations ) )
. collect ::< IndexMap < _ , _ > > ( ) ;
2025-03-20 11:06:27 +13:00
let result1 = catch_unwind ( AssertUnwindSafe ( | | {
assert_snapshot ( test , " Operations executed " , | | {
2025-06-10 21:30:48 -04:00
insta ::assert_json_snapshot! ( " ops " , module_operations , {
2025-03-20 11:06:27 +13:00
" .**.sourceRange " = > Vec ::new ( ) ,
2025-04-28 14:20:38 +12:00
" .**.functionSourceRange " = > Vec ::new ( ) ,
" .**.moduleId " = > 0 ,
2025-03-20 11:06:27 +13:00
} ) ;
} )
} ) ) ;
2025-06-10 21:30:48 -04:00
let module_commands = module_state
. iter ( )
. map ( | ( path , s ) | ( path , & s . commands ) )
. collect ::< IndexMap < _ , _ > > ( ) ;
2025-03-20 11:06:27 +13:00
let result2 = catch_unwind ( AssertUnwindSafe ( | | {
assert_snapshot ( test , " Artifact commands " , | | {
2025-06-10 21:30:48 -04:00
insta ::assert_json_snapshot! ( " artifact_commands " , module_commands , {
2025-03-20 11:06:27 +13:00
" .**.range " = > Vec ::new ( ) ,
} ) ;
} )
} ) ) ;
let result3 = catch_unwind ( AssertUnwindSafe ( | | {
2025-05-21 10:51:31 -04:00
// If the user is explicitly writing, we always want to run so that they
// can save new expected output. There's no way to reliably determine
// if insta will write, as far as I can tell, so we use our own
// environment variable.
let is_writing = matches! ( std ::env ::var ( " ZOO_SIM_UPDATE " ) . as_deref ( ) , Ok ( " always " ) ) ;
if ! test . skip_assert_artifact_graph | | is_writing {
assert_snapshot ( test , " Artifact graph flowchart " , | | {
let flowchart = artifact_graph
. to_mermaid_flowchart ( )
. unwrap_or_else ( | e | format! ( " Failed to convert artifact graph to flowchart: {e} " ) ) ;
// Change the snapshot suffix so that it is rendered as a Markdown file
// in GitHub.
2025-06-16 13:55:24 -04:00
insta ::assert_binary_snapshot! ( " artifact_graph_flowchart.md " , flowchart . as_bytes ( ) . to_owned ( ) ) ;
2025-05-21 10:51:31 -04:00
} )
}
2025-03-20 11:06:27 +13:00
} ) ) ;
result1 . unwrap ( ) ;
result2 . unwrap ( ) ;
result3 . unwrap ( ) ;
2025-01-31 18:32:30 -05:00
}
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
mod cube {
const TEST_NAME : & str = " cube " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-31 18:32:30 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod cube_with_error {
const TEST_NAME : & str = " cube_with_error " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-17 14:34:36 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-11 23:57:31 -04:00
mod any_type {
const TEST_NAME : & str = " any_type " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-06-10 20:24:48 -04:00
mod coerce_from_trig_to_point {
const TEST_NAME : & str = " coerce_from_trig_to_point " ;
2025-05-20 20:50:24 -04:00
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-01-17 14:34:36 -05:00
mod artifact_graph_example_code1 {
const TEST_NAME : & str = " artifact_graph_example_code1 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-17 14:34:36 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod artifact_graph_example_code_no_3d {
const TEST_NAME : & str = " artifact_graph_example_code_no_3d " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-17 14:34:36 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod artifact_graph_example_code_offset_planes {
const TEST_NAME : & str = " artifact_graph_example_code_offset_planes " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-17 14:34:36 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod artifact_graph_sketch_on_face_etc {
const TEST_NAME : & str = " artifact_graph_sketch_on_face_etc " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
2024-10-31 11:43:14 -05:00
super ::execute ( TEST_NAME , true ) . await
}
}
mod helix_ccw {
const TEST_NAME : & str = " helix_ccw " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-10-31 11:43:14 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod double_map_fn {
const TEST_NAME : & str = " double_map_fn " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-10-31 11:43:14 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
KCL: New simulation test pipeline (#4351)
The idea behind this is to test all the various stages of executing KCL
separately, i.e.
- Start with a program
- Tokenize it
- Parse those tokens into an AST
- Recast the AST
- Execute the AST, outputting
- a PNG of the rendered model
- serialized program memory
Each of these steps reads some input and writes some output to disk.
The output of one step becomes the input to the next step. These
intermediate artifacts are also snapshotted (like expectorate or 2020)
to ensure we're aware of any changes to how KCL works. A change could
be a bug, or it could be harmless, or deliberate, but keeping it checked
into the repo means we can easily track changes.
Note: UUIDs sent back by the engine are currently nondeterministic, so
they would break all the snapshot tests. So, the snapshots use a regex
filter and replace anything that looks like a uuid with [uuid] when
writing program memory to a snapshot. In the future I hope our UUIDs will
be seedable and easy to make deterministic. At that point, we can stop
filtering the UUIDs.
We run this pipeline on many different KCL programs. Each keeps its
inputs (KCL programs), outputs (PNG, program memory snapshot) and
intermediate artifacts (AST, token lists, etc) in that directory.
I also added a new `just` command to easily generate these tests.
You can run `just new-sim-test gear $(cat gear.kcl)` to set up a new
gear test directory and generate all the intermediate artifacts for the
first time. This doesn't need any macros, it just appends some new lines
of normal Rust source code to `tests.rs`, so it's easy to see exactly
what the code is doing.
This uses `cargo insta` for convenient snapshot testing of artifacts
as JSON, and `twenty-twenty` for snapshotting PNGs.
This was heavily inspired by Predrag Gruevski's talk at EuroRust 2024
about deterministic simulation testing, and how it can both reduce bugs
and also reduce testing/CI time. Very grateful to him for chatting with
me about this over the last couple of weeks.
2024-10-30 12:14:17 -05:00
}
}
2024-11-04 20:34:22 -06:00
mod index_of_array {
const TEST_NAME : & str = " index_of_array " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod comparisons {
const TEST_NAME : & str = " comparisons " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_range_expr {
const TEST_NAME : & str = " array_range_expr " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_range_negative_expr {
const TEST_NAME : & str = " array_range_negative_expr " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
2025-05-12 01:30:33 -04:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_range_with_units {
const TEST_NAME : & str = " array_range_with_units " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_range_mismatch_units {
const TEST_NAME : & str = " array_range_mismatch_units " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
2024-11-04 20:34:22 -06:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod sketch_in_object {
const TEST_NAME : & str = " sketch_in_object " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod if_else {
const TEST_NAME : & str = " if_else " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod add_lots {
const TEST_NAME : & str = " add_lots " ;
2024-11-21 13:10:03 -05:00
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 13:10:03 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod argument_error {
//! The argument error points to the problematic argument in the call site,
//! not the function definition that the variable points to.
const TEST_NAME : & str = " argument_error " ;
2024-11-04 20:34:22 -06:00
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_elem_push {
const TEST_NAME : & str = " array_elem_push " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-04 20:34:22 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2024-11-18 16:20:32 -06:00
mod invalid_index_str {
const TEST_NAME : & str = " invalid_index_str " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod invalid_index_negative {
const TEST_NAME : & str = " invalid_index_negative " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod invalid_index_fractional {
const TEST_NAME : & str = " invalid_index_fractional " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod invalid_member_object {
const TEST_NAME : & str = " invalid_member_object " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod invalid_member_object_prop {
const TEST_NAME : & str = " invalid_member_object_prop " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-04-28 12:08:47 -04:00
mod invalid_member_object_using_string {
const TEST_NAME : & str = " invalid_member_object_using_string " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2024-11-18 16:20:32 -06:00
mod non_string_key_of_object {
const TEST_NAME : & str = " non_string_key_of_object " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_index_oob {
const TEST_NAME : & str = " array_index_oob " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod object_prop_not_found {
const TEST_NAME : & str = " object_prop_not_found " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod pipe_substitution_inside_function_called_from_pipeline {
const TEST_NAME : & str = " pipe_substitution_inside_function_called_from_pipeline " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod comparisons_multiple {
const TEST_NAME : & str = " comparisons_multiple " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod import_cycle1 {
const TEST_NAME : & str = " import_cycle1 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
2025-05-20 11:43:48 -04:00
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod import_only_at_top_level {
const TEST_NAME : & str = " import_only_at_top_level " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
2025-03-17 15:55:25 -07:00
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-01-29 16:26:49 -08:00
mod import_function_not_sketch {
const TEST_NAME : & str = " import_function_not_sketch " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-29 16:26:49 -08:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2024-11-18 16:20:32 -06:00
mod import_constant {
const TEST_NAME : & str = " import_constant " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2024-12-07 07:16:04 +13:00
mod import_export {
const TEST_NAME : & str = " import_export " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-07 07:16:04 +13:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod import_glob {
const TEST_NAME : & str = " import_glob " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-07 07:16:04 +13:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-04-30 12:26:46 -04:00
mod import_whole_simple {
const TEST_NAME : & str = " import_whole_simple " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod import_whole_transitive_import {
const TEST_NAME : & str = " import_whole_transitive_import " ;
2024-12-17 09:38:32 +13:00
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-17 09:38:32 +13:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2024-11-18 16:20:32 -06:00
mod import_side_effect {
const TEST_NAME : & str = " import_side_effect " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-01-29 08:28:32 +13:00
mod import_foreign {
const TEST_NAME : & str = " import_foreign " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-29 08:28:32 +13:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-05-20 12:43:11 -04:00
mod export_var_only_at_top_level {
const TEST_NAME : & str = " export_var_only_at_top_level " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-02-19 00:11:11 -05:00
mod assembly_non_default_units {
const TEST_NAME : & str = " assembly_non_default_units " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-02-19 00:11:11 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2024-11-18 16:20:32 -06:00
mod array_elem_push_fail {
const TEST_NAME : & str = " array_elem_push_fail " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
2025-05-11 23:57:31 -04:00
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_push_item_wrong_type {
const TEST_NAME : & str = " array_push_item_wrong_type " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
2025-03-17 15:55:25 -07:00
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod sketch_on_face {
const TEST_NAME : & str = " sketch_on_face " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-02-25 23:04:10 -05:00
mod revolve_about_edge {
const TEST_NAME : & str = " revolve_about_edge " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-02-25 23:04:10 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2024-11-18 16:20:32 -06:00
mod poop_chute {
const TEST_NAME : & str = " poop_chute " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod neg_xz_plane {
const TEST_NAME : & str = " neg_xz_plane " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod xz_plane {
const TEST_NAME : & str = " xz_plane " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod sketch_on_face_after_fillets_referencing_face {
const TEST_NAME : & str = " sketch_on_face_after_fillets_referencing_face " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod circular_pattern3d_a_pattern {
const TEST_NAME : & str = " circular_pattern3d_a_pattern " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod linear_pattern3d_a_pattern {
const TEST_NAME : & str = " linear_pattern3d_a_pattern " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
2025-03-31 19:46:29 -04:00
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod pattern_circular_in_module {
const TEST_NAME : & str = " pattern_circular_in_module " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod pattern_linear_in_module {
const TEST_NAME : & str = " pattern_linear_in_module " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
2025-03-17 15:55:25 -07:00
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod tangential_arc {
const TEST_NAME : & str = " tangential_arc " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod sketch_on_face_circle_tagged {
const TEST_NAME : & str = " sketch_on_face_circle_tagged " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod basic_fillet_cube_start {
const TEST_NAME : & str = " basic_fillet_cube_start " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod basic_fillet_cube_next_adjacent {
const TEST_NAME : & str = " basic_fillet_cube_next_adjacent " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod basic_fillet_cube_previous_adjacent {
const TEST_NAME : & str = " basic_fillet_cube_previous_adjacent " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod basic_fillet_cube_end {
const TEST_NAME : & str = " basic_fillet_cube_end " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod basic_fillet_cube_close_opposite {
const TEST_NAME : & str = " basic_fillet_cube_close_opposite " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod sketch_on_face_end {
const TEST_NAME : & str = " sketch_on_face_end " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod sketch_on_face_start {
const TEST_NAME : & str = " sketch_on_face_start " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod sketch_on_face_end_negative_extrude {
const TEST_NAME : & str = " sketch_on_face_end_negative_extrude " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod mike_stress_test {
const TEST_NAME : & str = " mike_stress_test " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod pentagon_fillet_sugar {
const TEST_NAME : & str = " pentagon_fillet_sugar " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod pipe_as_arg {
const TEST_NAME : & str = " pipe_as_arg " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod computed_var {
const TEST_NAME : & str = " computed_var " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod riddle_small {
const TEST_NAME : & str = " riddle_small " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod tan_arc_x_line {
const TEST_NAME : & str = " tan_arc_x_line " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod fillet_and_shell {
const TEST_NAME : & str = " fillet-and-shell " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod sketch_on_chamfer_two_times {
const TEST_NAME : & str = " sketch-on-chamfer-two-times " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod sketch_on_chamfer_two_times_different_order {
const TEST_NAME : & str = " sketch-on-chamfer-two-times-different-order " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-18 16:20:32 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2024-11-21 18:33:02 -06:00
mod parametric_with_tan_arc {
const TEST_NAME : & str = " parametric_with_tan_arc " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 18:33:02 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod parametric {
const TEST_NAME : & str = " parametric " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 18:33:02 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-02-13 16:04:12 -05:00
mod ssi_pattern {
const TEST_NAME : & str = " ssi_pattern " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-02-13 16:04:12 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2024-11-21 18:33:02 -06:00
mod angled_line {
const TEST_NAME : & str = " angled_line " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 18:33:02 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod function_sketch_with_position {
const TEST_NAME : & str = " function_sketch_with_position " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 18:33:02 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod function_sketch {
const TEST_NAME : & str = " function_sketch " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 18:33:02 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod i_shape {
const TEST_NAME : & str = " i_shape " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 18:33:02 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod kittycad_svg {
const TEST_NAME : & str = " kittycad_svg " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-11-21 18:33:02 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2024-12-06 15:44:39 -06:00
mod kw_fn {
const TEST_NAME : & str = " kw_fn " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-06 15:44:39 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2024-12-09 22:11:16 -06:00
mod kw_fn_too_few_args {
const TEST_NAME : & str = " kw_fn_too_few_args " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-09 22:11:16 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
2024-12-10 10:20:51 -06:00
super ::execute ( TEST_NAME , false ) . await
2024-12-09 22:11:16 -06:00
}
}
mod kw_fn_unlabeled_but_has_label {
const TEST_NAME : & str = " kw_fn_unlabeled_but_has_label " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-09 22:11:16 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
2024-12-10 10:20:51 -06:00
super ::execute ( TEST_NAME , false ) . await
}
}
mod kw_fn_with_defaults {
const TEST_NAME : & str = " kw_fn_with_defaults " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-10 10:20:51 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
2024-12-09 22:11:16 -06:00
}
}
2024-12-16 17:33:08 -05:00
mod boolean_logical_and {
const TEST_NAME : & str = " boolean_logical_and " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-16 17:33:08 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod boolean_logical_or {
const TEST_NAME : & str = " boolean_logical_or " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-16 17:33:08 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod boolean_logical_multiple {
const TEST_NAME : & str = " boolean_logical_multiple " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2024-12-16 17:33:08 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-01-04 12:18:29 -05:00
mod circle_three_point {
const TEST_NAME : & str = " circle_three_point " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-01-04 12:18:29 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
implementing array pop (#4806)
* implementing naive array pop
* multi-profile follow up. (#4802)
* multi-profile work
* fix enter sketch on cap
* fix coderef problem for walls and caps
* allow sketch mode entry from circle
* clean up
* update snapshot
* Look at this (photo)Graph *in the voice of Nickelback*
* trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* add test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix how expression index is corrected, to make compatible with offset planes
* another test
* tweak test
* more test tweaks
* break up test to fix it hopfully
* fix onboarding test
* remove bad comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* get ready to bump (kcl-lib and friends) world (#4794)
get ready to bump world
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Revert multi-profile (#4812)
* Revert "multi-profile follow up. (#4802)"
This reverts commit 2b2ed470c10c82ed88b845efdea4abb3f2eb866e.
* Revert "multi profile (#4532)"
This reverts commit 04e586d07bd8004f725335225d8d51df52169c51.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Re-run CI after snapshots
* Re-run CI after snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Re-run CI after snapshots
* Add `fixme` to onboarding test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add tracking of operations for the feature tree (#4746)
* Add operations tracking for the timeline
* Change to only track certain stdlib functions as operations
* Update gen files
* Add operations to simulation snapshot tests
* Add tracking of positional function calls
* Fix generated field names to be camel case in TS
* Fix generated TS field names to match and better docs
* Fix order of ops with patternTransform
* Fix sweep to be included
* Add new expected test outputs
* Add tracking for startSketchOn
* Update ops output to include startSketchOn
* Fix serde field name
* Fix output field name
* Add tracking of operations that fail
* Add snapshots of operations even when there's a KCL execution error
* Add ops output for error executions
* Add operations output to executor error
* Update op source ranges
* Remove tracking of circle() and polygon() since they're not needed
* Update output without circle and polygon
* Fix to track patternCircular3d and patternLinear3d
* Remove tracking for mirror2d
* Update ops output
* Fix to track the correct source range of function definitions
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Change KCL completion to use new object/record syntax (#4815)
* Reserve syntax for units of measure (#4783)
* Allow underscores but only for un-referenced names
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support numeric suffixes for UoM types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* UoM type arguments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* warnings -> non-fatal errors
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* type ascription
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Whole module imports (#4767)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support completions from import statements (#4768)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Implements boolean logical and/or in kcl (#4678)
* redoing bool logic impl on latest main
* adding snapshot tests (removing .new)
* removing accidental change smh:(
* accepting client side scene snapshot
* accepting png snapshot and triggering ci
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png again?
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting grid visibility snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png snapshot
* rerunning simtest creation to get ops.snap files
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Annotations syntax and per-file default units preparatory work (#4822)
* Parse annotations
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Propagate settings from annotations to exec_state
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* KCL: Unlabeled first param defaults to % (#4817)
Part of #4600
KCL functions can declare one special argument that doesn't require a label on its parameter when called.
This PR will default that arg to % (the current pipeline) if not given.
* Deprecate startSketchAt() stdlib function (#4819)
* Deprecate startSketchAt() stdlib function
* Remove uses of startSketchAt() from the doc tests
* Update docs
* Add dry-run validation for Loft (#4820)
* WIP: mess with shell selection validation
Will eventually fix #4711
* Update from main
* WIP: not working yet
* Working loft dry run validator
* Clean up shell (still not working)
* Bump kittycad-modeling-cmds
* Clean up
* Add logging
* Add proper object_id and face_id mapping, still not working for shell
* Fix faceId
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Add dry-run validation to Loft
Checks one box for #4711
* Add extra check for non solid2ds
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Double click label on sketch to dimension (#4816)
* feat: double click segment label to dimension length, POC, need to clean up code!
* fix: cleaning up the PR for review
* fix: cleaning for the PR. Adding more comments and moving some logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: mergining main, auto linter and tsc fixes. Need to make some more
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: tsc errors are resolved
* chore: added test for constraint
* fix: fixing overlay bug since length labels can now be clicked.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* KCL: Show beautiful Miette errors when a KCL example test fails (#4829)
* KCL: Show beautiful Miette errors when a KCL example test fails
Background: KCL example tests are generated from the stdlib KCL examples in the `#[stdlib]` macro in derive-docs.
Problem: When these tests fail, they output a really unhelpful error message like Kcl(Semantic(KclErrorDetails { source_ranges: [156, 160, 0], message: "Expected a sketch but found array" } )).
Solution: Use miette. Now the errors highlight the KCL code that failed and show exactly what went wrong, on which line, presenting nice diagnostics that look like cargo/rustc output.
* Update helix snapshots
* Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Add blank line to discord bot message (#4814)
* Add blank link to discord bot message
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Implement some basic cache program generation (#4840)
Implement some basic cache program generation
A bit ago, @jessfraz added the ability to control reexecution from the
executor. When we did this, it used the digest to determine if there
was a code change rather than a non-code change (whitespace, comment,
etc).
This allows the creation of a new program to be run without clearing the
scene. This, in conjunction with being able to delete Engine objects by
ID will allow us to do some clever stuff when incrementally executing
a program.
I'm still working on something a bit more advanced, but a good first
step to derisk some of the caching behavior here fully is to implement a
basic "changed program" stub.
This process the ast programs (old and new) if it doesn't exactly match.
This would have been a complete refresh before this commit.
1) Check all overlapping top-level statements of the body of the new and
old AST and ensure they all match.
- If this is true, this means that one of the two AST programs has more
elements then the other, and they all otherwise match (addition or
deletion of the end of the program). We continue to #2 in this
case.
- If this is false, we have a meaingful difference in a section of
overlapping code. This will result in a cache miss and rebuild
the scene. We short-cut here and the scene is rebuilt.
2) Check the lengths of the two bodies.
- If they're the same, we shouldn't have even been called. We will
short-cut with a noop cache return (no clear, no program).
- if the old ast is longer, we've removed instructions from the
program. We can't delete things now, so this will result in a cache
miss and rebuild the scene. We short-cut here and the scene is
rebuilt.
- If the new ast is longer, we have an insertion of code at the end.
3) construct a new program using only the new elements from the new
ast, and return a `CacheResult` that *does not clear the scene*.
This means nothing will be rebuilt, and only a new object will polp
onto the scene. This is the first case where we diverge with
existing behavior.
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
* Fix mac issue after electron test migration PR (#4842)
Fix mac issue after electron test migration pR
* Remove guards from modeling commands in the toolbar (#4800)
* Remove guards from modeling commands in the toolbar
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove the deprecated function, update doc comment for the one still in use
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove more selection check functions that are no longer used
* Update E2E tests that assumed the extrude button could be disabled due to selection
* Update a few fillet tests that expected the button to disable based on selection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Prompt to edit (#4830)
* initial plumbing for getting the new option into the cmd-bar
* start of prompt edit
* update AI poll
* add spinner
* more prompt engineering
* add success toast, allowing user's to reject code
* select code that changed in prompt to edit
* selection in scene should not disappear when opening prompt cmd
* tweak
* fmt
* add tests
* some clean up
* clean up
* fix tests
* Yeet telemetry to text to cad endpoint (#4847)
yeet telemetry to text to cad endpoint
* Tweak prompt wording (#4846)
tweak prompt wording
* update discord bot (#4837)
* Re-enable test 'code pane closed at start' after electron migration (#4841)
* Re-enable 'code pane closed at start'
Relates to #4838
* Enable test on current branch
* Revert "Enable test on current branch"
This reverts commit 0d970b9ad6dac4fcc446b227c8e3d99cc9cb6ee8.
* Add 3-point circle tool (#4832)
* Add 3-point circle tool
This adds a 1st pass for the 3-point circle tool.
There is disabled code to drag around the 3 points and redraw the circle and
a triangle created by those points. It will be enabled in a follow-up PR
when we have circle3Point in the stdlib.
For now, all it does is after the 3rd click, will insert circle center-radius
KCL code for users to modify.
* PR comments
* First draft of a feature tree pane (#4782)
* Fix e2e default planes tests to use mask on state indicator (#4849)
* Fix e2e default planes tests to use mask on state indicator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: don't error on failure to fetch privacy settings (#4799)
* fix: dont error on failure to fetch privacy settings
* Add console warning when we ignore it
---------
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
* Match package license to LICENSE file (#4882)
* Remove the old Loft GitHub issue link in the toolbar (#4848)
Now that it's available, it shouldn't be there anymore.
* Fix fuzz crate lints and update deps (#4873)
* Fix fuzz to use new API
* Fix fuzz Cargo.toml lints and update lock
* Use app foreground color for focus outline button color so there's no hue collision (#4894)
Towards #4851
* Add support for float numbers in rem() arguments (#4858)
* Add support for float numbers in rem() arguments
* Update docs
* Rename to prevent name collision in docs
* Update docs after rename to NumberArg
* Fix parameter types to follow naming convention
* Change doc comment description to not refer to floating point
* Update docs after NumberArg doc change
* Change function to be more condensed
* Change to not try to preserve ints
* Update docs to use f64
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add auto-retries to macOS build notarization (#4892)
* Add DEBUG=electron-notarize* to build-apps
* Force IS_RELEASE: true
* Temp: Disable version setting based on tag
* Remove deprecated notarize.teamId and add retry logic
* Revert "Remove deprecated notarize.teamId and add retry logic"
This reverts commit 6ff98d784d77cc29a2b7b5da10327a8d1ff01572.
* Retry only on macOS
* Better retry logic for macOS
* Use nick-fields/retry
* Clean up Temp: commits for PR
* Clean up
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump nanoid from 3.3.7 to 3.3.8 (#4731)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)
---
updated-dependencies:
- dependency-name: nanoid
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Enable enter for autocompletions in the command palette KCL input (#4896)
* Enable enter for autocompletions in the command palette KCL input
* Oops I commented out code for the variable name input
Thanks for the catch @pierremtb
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Bump rollup from 4.21.0 to 4.29.1 (#4888)
* Bump rollup from 4.21.0 to 4.29.1
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.0 to 4.29.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.0...v4.29.1)
---
updated-dependencies:
- dependency-name: rollup
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Louder Windows codesign errors (#4762)
* WIP: Silent failure in signWin.js
Fixes #4582
* Temp: force release build
* Fake throw
* Temp: another test
* Clean up for merge
* Add parsing keyword function calls inside pipelines (#4907)
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Remove draft PR filter on e2e tests (#4908)
* Add three point circle stdlib function (#4893)
* Add parsing keyword function calls inside pipelines
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Add three point circle stdlib function
* Generate new documentation
* Fix 20:20 for the circle three point test
* Convert to using keyword arguments
* Wtf yo
* Remove unused structure
* Use the new simulation tests
* Regenerate documentation
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Move the base CodeMirror KCL support to a local package (#4897)
* Move CodeMirror LRLanguage to new file
This separates the base language support from the LSP and color picker.
* Move the base CodeMirror KCL support to a local package
* Start CodeMirror grammar tests
* Exclude vitest config in tsconfig
* Add KCL path to tsconfig
* Remove stray import
* Drop extension from import
* Use __filename for commonjs compat
* Check exec return before access
* Build ES and CJS to dist
* Format
* Exclude all.test.ts from codespell
This is to work around "fileTests" imported from Lezer. Future codespell versions look
like they'll allow the code to be annotated, which would be nicer.
---------
Co-authored-by: Matt Mundell <matt@mundell.me>
* Fix typo in README (#3843)
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* remove backwards compatibility for snake case in objects (#4920)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* CM KCL: Support `=` in record init (#4933)
Support `=` in record init
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump clap from 4.5.21 to 4.5.23 in /src/wasm-lib (#4928)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.21 to 4.5.23.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.21...clap_complete-v4.5.23)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @kittycad/lib from 2.0.7 to 2.0.12 (#4922)
Bumps [@kittycad/lib](https://github.com/KittyCAD/kittycad.ts) from 2.0.7 to 2.0.12.
- [Release notes](https://github.com/KittyCAD/kittycad.ts/releases)
- [Commits](https://github.com/KittyCAD/kittycad.ts/compare/v2.0.7...v2.0.12)
---
updated-dependencies:
- dependency-name: "@kittycad/lib"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump anyhow from 1.0.94 to 1.0.95 in /src/wasm-lib (#4929)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.94 to 1.0.95.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.94...1.0.95)
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump url from 2.5.3 to 2.5.4 in /src/wasm-lib (#4930)
Bumps [url](https://github.com/servo/rust-url) from 2.5.3 to 2.5.4.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4)
---
updated-dependencies:
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump wasm-streams from 0.4.1 to 0.4.2 in /src/wasm-lib (#4926)
Bumps [wasm-streams](https://github.com/MattiasBuelens/wasm-streams) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/MattiasBuelens/wasm-streams/releases)
- [Changelog](https://github.com/MattiasBuelens/wasm-streams/blob/main/CHANGELOG.md)
- [Commits](https://github.com/MattiasBuelens/wasm-streams/compare/v0.4.1...v0.4.2)
---
updated-dependencies:
- dependency-name: wasm-streams
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @csstools/postcss-oklab-function from 4.0.2 to 4.0.7 (#4923)
Bumps [@csstools/postcss-oklab-function](https://github.com/csstools/postcss-plugins/tree/HEAD/plugins/postcss-oklab-function) from 4.0.2 to 4.0.7.
- [Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-oklab-function/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugins/postcss-oklab-function)
---
updated-dependencies:
- dependency-name: "@csstools/postcss-oklab-function"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: writes to disk when the user accepts the prompt to edit (#4942)
* fix: writes to disk when the user accepts the prompt to edit
* fix: then catch
* Make circle3Point tool an actor (#4906)
* Reduce the amount of data sent to TS and make new fields opt-in (#4913)
* Reduce the amount of data sent back to JS/TS from WASM
* Remove unneeded derives since we shouldn't expose these types
* Alias type to be clearer
* Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.… (#4945)
Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.2.86
* fix out of range error (#4931)
* fix out of range error
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove console logs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add a regression test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Run chrome e2e snapshots only on linux (#4947)
* Run chrome e2e snapshots only on linux
* Wtf is this 1-indexed
* Force 1/1 sharding
* Add TODO
* Nadro/3079/screenshot improvements (#3917)
* chore: swapped screenshot to only use the video stream
* feat: video stream screenshot, native electron screenshot
* fix: auto tsc, fmt, xgen, lint
* fix: fixing tsc errors
* fix: removing debug console.log
* fix: renaming ScreenShot to Screenshot
* fix: deleting console log from debugging
* fix: bug with what source was referenced
* fix: using a productName
* fix: improving usage for native screenshots and detecthing support
* fix: fmt
* chore: updated rust test documentation
* fix: typo in readme
* fix: leaving package.json and yarn.lock the same as main??
* bump
* bump
* bump again
* bump again2
* feat: implemented zoom to fit on code change if previous AST was empty (#3925)
* feat: implemented zoom to fit on code change if previous AST was empty
* feat: implementing selectAll text logic to enable select all and copy and paste and zoom to fit will work
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: clarifying comment in _isAstEmpty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump again
* fix: fixing new type since this branch is old
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Add dependabot group for all serde dependencies (#4944)
* Fix formatting of dependabot.yml
* Add dependabot group for all serde dependencies
* CM KCL: = and => are optional in fn declarations (#4941)
CM KCL: `=` and `=>` are optional in fn declarations
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump ts-rs from 10.0.0 to 10.1.0 (#4949)
* Add toolbar buttons for text-to-cad and prompt-to-edit (#4938)
* Add toolbar buttons for text-to-cad and prompt-to-edit
Resolves #4890
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* `preventDefault` on <kbd>Enter</kbd> with textarea input so buttons aren't clicked as well
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Bump quote from 1.0.37 to 1.0.38 in /src/wasm-lib (#4951)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.37...1.0.38)
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* array pop with unlabled kw arg
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Paul Tagliamonte <paul@zoo.dev>
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com>
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
Co-authored-by: Matt Mundell <32057441+mattmundell@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Mundell <matt@mundell.me>
Co-authored-by: alteous <david@harvey-macaulay.com>
2025-01-07 15:24:24 -05:00
mod array_elem_pop {
const TEST_NAME : & str = " array_elem_pop " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
implementing array pop (#4806)
* implementing naive array pop
* multi-profile follow up. (#4802)
* multi-profile work
* fix enter sketch on cap
* fix coderef problem for walls and caps
* allow sketch mode entry from circle
* clean up
* update snapshot
* Look at this (photo)Graph *in the voice of Nickelback*
* trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* add test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix how expression index is corrected, to make compatible with offset planes
* another test
* tweak test
* more test tweaks
* break up test to fix it hopfully
* fix onboarding test
* remove bad comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* get ready to bump (kcl-lib and friends) world (#4794)
get ready to bump world
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Revert multi-profile (#4812)
* Revert "multi-profile follow up. (#4802)"
This reverts commit 2b2ed470c10c82ed88b845efdea4abb3f2eb866e.
* Revert "multi profile (#4532)"
This reverts commit 04e586d07bd8004f725335225d8d51df52169c51.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Re-run CI after snapshots
* Re-run CI after snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Re-run CI after snapshots
* Add `fixme` to onboarding test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add tracking of operations for the feature tree (#4746)
* Add operations tracking for the timeline
* Change to only track certain stdlib functions as operations
* Update gen files
* Add operations to simulation snapshot tests
* Add tracking of positional function calls
* Fix generated field names to be camel case in TS
* Fix generated TS field names to match and better docs
* Fix order of ops with patternTransform
* Fix sweep to be included
* Add new expected test outputs
* Add tracking for startSketchOn
* Update ops output to include startSketchOn
* Fix serde field name
* Fix output field name
* Add tracking of operations that fail
* Add snapshots of operations even when there's a KCL execution error
* Add ops output for error executions
* Add operations output to executor error
* Update op source ranges
* Remove tracking of circle() and polygon() since they're not needed
* Update output without circle and polygon
* Fix to track patternCircular3d and patternLinear3d
* Remove tracking for mirror2d
* Update ops output
* Fix to track the correct source range of function definitions
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Change KCL completion to use new object/record syntax (#4815)
* Reserve syntax for units of measure (#4783)
* Allow underscores but only for un-referenced names
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support numeric suffixes for UoM types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* UoM type arguments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* warnings -> non-fatal errors
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* type ascription
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Whole module imports (#4767)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support completions from import statements (#4768)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Implements boolean logical and/or in kcl (#4678)
* redoing bool logic impl on latest main
* adding snapshot tests (removing .new)
* removing accidental change smh:(
* accepting client side scene snapshot
* accepting png snapshot and triggering ci
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png again?
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting grid visibility snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png snapshot
* rerunning simtest creation to get ops.snap files
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Annotations syntax and per-file default units preparatory work (#4822)
* Parse annotations
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Propagate settings from annotations to exec_state
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* KCL: Unlabeled first param defaults to % (#4817)
Part of #4600
KCL functions can declare one special argument that doesn't require a label on its parameter when called.
This PR will default that arg to % (the current pipeline) if not given.
* Deprecate startSketchAt() stdlib function (#4819)
* Deprecate startSketchAt() stdlib function
* Remove uses of startSketchAt() from the doc tests
* Update docs
* Add dry-run validation for Loft (#4820)
* WIP: mess with shell selection validation
Will eventually fix #4711
* Update from main
* WIP: not working yet
* Working loft dry run validator
* Clean up shell (still not working)
* Bump kittycad-modeling-cmds
* Clean up
* Add logging
* Add proper object_id and face_id mapping, still not working for shell
* Fix faceId
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Add dry-run validation to Loft
Checks one box for #4711
* Add extra check for non solid2ds
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Double click label on sketch to dimension (#4816)
* feat: double click segment label to dimension length, POC, need to clean up code!
* fix: cleaning up the PR for review
* fix: cleaning for the PR. Adding more comments and moving some logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: mergining main, auto linter and tsc fixes. Need to make some more
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: tsc errors are resolved
* chore: added test for constraint
* fix: fixing overlay bug since length labels can now be clicked.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* KCL: Show beautiful Miette errors when a KCL example test fails (#4829)
* KCL: Show beautiful Miette errors when a KCL example test fails
Background: KCL example tests are generated from the stdlib KCL examples in the `#[stdlib]` macro in derive-docs.
Problem: When these tests fail, they output a really unhelpful error message like Kcl(Semantic(KclErrorDetails { source_ranges: [156, 160, 0], message: "Expected a sketch but found array" } )).
Solution: Use miette. Now the errors highlight the KCL code that failed and show exactly what went wrong, on which line, presenting nice diagnostics that look like cargo/rustc output.
* Update helix snapshots
* Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Add blank line to discord bot message (#4814)
* Add blank link to discord bot message
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Implement some basic cache program generation (#4840)
Implement some basic cache program generation
A bit ago, @jessfraz added the ability to control reexecution from the
executor. When we did this, it used the digest to determine if there
was a code change rather than a non-code change (whitespace, comment,
etc).
This allows the creation of a new program to be run without clearing the
scene. This, in conjunction with being able to delete Engine objects by
ID will allow us to do some clever stuff when incrementally executing
a program.
I'm still working on something a bit more advanced, but a good first
step to derisk some of the caching behavior here fully is to implement a
basic "changed program" stub.
This process the ast programs (old and new) if it doesn't exactly match.
This would have been a complete refresh before this commit.
1) Check all overlapping top-level statements of the body of the new and
old AST and ensure they all match.
- If this is true, this means that one of the two AST programs has more
elements then the other, and they all otherwise match (addition or
deletion of the end of the program). We continue to #2 in this
case.
- If this is false, we have a meaingful difference in a section of
overlapping code. This will result in a cache miss and rebuild
the scene. We short-cut here and the scene is rebuilt.
2) Check the lengths of the two bodies.
- If they're the same, we shouldn't have even been called. We will
short-cut with a noop cache return (no clear, no program).
- if the old ast is longer, we've removed instructions from the
program. We can't delete things now, so this will result in a cache
miss and rebuild the scene. We short-cut here and the scene is
rebuilt.
- If the new ast is longer, we have an insertion of code at the end.
3) construct a new program using only the new elements from the new
ast, and return a `CacheResult` that *does not clear the scene*.
This means nothing will be rebuilt, and only a new object will polp
onto the scene. This is the first case where we diverge with
existing behavior.
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
* Fix mac issue after electron test migration PR (#4842)
Fix mac issue after electron test migration pR
* Remove guards from modeling commands in the toolbar (#4800)
* Remove guards from modeling commands in the toolbar
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove the deprecated function, update doc comment for the one still in use
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove more selection check functions that are no longer used
* Update E2E tests that assumed the extrude button could be disabled due to selection
* Update a few fillet tests that expected the button to disable based on selection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Prompt to edit (#4830)
* initial plumbing for getting the new option into the cmd-bar
* start of prompt edit
* update AI poll
* add spinner
* more prompt engineering
* add success toast, allowing user's to reject code
* select code that changed in prompt to edit
* selection in scene should not disappear when opening prompt cmd
* tweak
* fmt
* add tests
* some clean up
* clean up
* fix tests
* Yeet telemetry to text to cad endpoint (#4847)
yeet telemetry to text to cad endpoint
* Tweak prompt wording (#4846)
tweak prompt wording
* update discord bot (#4837)
* Re-enable test 'code pane closed at start' after electron migration (#4841)
* Re-enable 'code pane closed at start'
Relates to #4838
* Enable test on current branch
* Revert "Enable test on current branch"
This reverts commit 0d970b9ad6dac4fcc446b227c8e3d99cc9cb6ee8.
* Add 3-point circle tool (#4832)
* Add 3-point circle tool
This adds a 1st pass for the 3-point circle tool.
There is disabled code to drag around the 3 points and redraw the circle and
a triangle created by those points. It will be enabled in a follow-up PR
when we have circle3Point in the stdlib.
For now, all it does is after the 3rd click, will insert circle center-radius
KCL code for users to modify.
* PR comments
* First draft of a feature tree pane (#4782)
* Fix e2e default planes tests to use mask on state indicator (#4849)
* Fix e2e default planes tests to use mask on state indicator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: don't error on failure to fetch privacy settings (#4799)
* fix: dont error on failure to fetch privacy settings
* Add console warning when we ignore it
---------
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
* Match package license to LICENSE file (#4882)
* Remove the old Loft GitHub issue link in the toolbar (#4848)
Now that it's available, it shouldn't be there anymore.
* Fix fuzz crate lints and update deps (#4873)
* Fix fuzz to use new API
* Fix fuzz Cargo.toml lints and update lock
* Use app foreground color for focus outline button color so there's no hue collision (#4894)
Towards #4851
* Add support for float numbers in rem() arguments (#4858)
* Add support for float numbers in rem() arguments
* Update docs
* Rename to prevent name collision in docs
* Update docs after rename to NumberArg
* Fix parameter types to follow naming convention
* Change doc comment description to not refer to floating point
* Update docs after NumberArg doc change
* Change function to be more condensed
* Change to not try to preserve ints
* Update docs to use f64
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add auto-retries to macOS build notarization (#4892)
* Add DEBUG=electron-notarize* to build-apps
* Force IS_RELEASE: true
* Temp: Disable version setting based on tag
* Remove deprecated notarize.teamId and add retry logic
* Revert "Remove deprecated notarize.teamId and add retry logic"
This reverts commit 6ff98d784d77cc29a2b7b5da10327a8d1ff01572.
* Retry only on macOS
* Better retry logic for macOS
* Use nick-fields/retry
* Clean up Temp: commits for PR
* Clean up
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump nanoid from 3.3.7 to 3.3.8 (#4731)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)
---
updated-dependencies:
- dependency-name: nanoid
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Enable enter for autocompletions in the command palette KCL input (#4896)
* Enable enter for autocompletions in the command palette KCL input
* Oops I commented out code for the variable name input
Thanks for the catch @pierremtb
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Bump rollup from 4.21.0 to 4.29.1 (#4888)
* Bump rollup from 4.21.0 to 4.29.1
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.0 to 4.29.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.0...v4.29.1)
---
updated-dependencies:
- dependency-name: rollup
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Louder Windows codesign errors (#4762)
* WIP: Silent failure in signWin.js
Fixes #4582
* Temp: force release build
* Fake throw
* Temp: another test
* Clean up for merge
* Add parsing keyword function calls inside pipelines (#4907)
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Remove draft PR filter on e2e tests (#4908)
* Add three point circle stdlib function (#4893)
* Add parsing keyword function calls inside pipelines
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Add three point circle stdlib function
* Generate new documentation
* Fix 20:20 for the circle three point test
* Convert to using keyword arguments
* Wtf yo
* Remove unused structure
* Use the new simulation tests
* Regenerate documentation
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Move the base CodeMirror KCL support to a local package (#4897)
* Move CodeMirror LRLanguage to new file
This separates the base language support from the LSP and color picker.
* Move the base CodeMirror KCL support to a local package
* Start CodeMirror grammar tests
* Exclude vitest config in tsconfig
* Add KCL path to tsconfig
* Remove stray import
* Drop extension from import
* Use __filename for commonjs compat
* Check exec return before access
* Build ES and CJS to dist
* Format
* Exclude all.test.ts from codespell
This is to work around "fileTests" imported from Lezer. Future codespell versions look
like they'll allow the code to be annotated, which would be nicer.
---------
Co-authored-by: Matt Mundell <matt@mundell.me>
* Fix typo in README (#3843)
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* remove backwards compatibility for snake case in objects (#4920)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* CM KCL: Support `=` in record init (#4933)
Support `=` in record init
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump clap from 4.5.21 to 4.5.23 in /src/wasm-lib (#4928)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.21 to 4.5.23.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.21...clap_complete-v4.5.23)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @kittycad/lib from 2.0.7 to 2.0.12 (#4922)
Bumps [@kittycad/lib](https://github.com/KittyCAD/kittycad.ts) from 2.0.7 to 2.0.12.
- [Release notes](https://github.com/KittyCAD/kittycad.ts/releases)
- [Commits](https://github.com/KittyCAD/kittycad.ts/compare/v2.0.7...v2.0.12)
---
updated-dependencies:
- dependency-name: "@kittycad/lib"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump anyhow from 1.0.94 to 1.0.95 in /src/wasm-lib (#4929)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.94 to 1.0.95.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.94...1.0.95)
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump url from 2.5.3 to 2.5.4 in /src/wasm-lib (#4930)
Bumps [url](https://github.com/servo/rust-url) from 2.5.3 to 2.5.4.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4)
---
updated-dependencies:
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump wasm-streams from 0.4.1 to 0.4.2 in /src/wasm-lib (#4926)
Bumps [wasm-streams](https://github.com/MattiasBuelens/wasm-streams) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/MattiasBuelens/wasm-streams/releases)
- [Changelog](https://github.com/MattiasBuelens/wasm-streams/blob/main/CHANGELOG.md)
- [Commits](https://github.com/MattiasBuelens/wasm-streams/compare/v0.4.1...v0.4.2)
---
updated-dependencies:
- dependency-name: wasm-streams
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @csstools/postcss-oklab-function from 4.0.2 to 4.0.7 (#4923)
Bumps [@csstools/postcss-oklab-function](https://github.com/csstools/postcss-plugins/tree/HEAD/plugins/postcss-oklab-function) from 4.0.2 to 4.0.7.
- [Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-oklab-function/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugins/postcss-oklab-function)
---
updated-dependencies:
- dependency-name: "@csstools/postcss-oklab-function"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: writes to disk when the user accepts the prompt to edit (#4942)
* fix: writes to disk when the user accepts the prompt to edit
* fix: then catch
* Make circle3Point tool an actor (#4906)
* Reduce the amount of data sent to TS and make new fields opt-in (#4913)
* Reduce the amount of data sent back to JS/TS from WASM
* Remove unneeded derives since we shouldn't expose these types
* Alias type to be clearer
* Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.… (#4945)
Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.2.86
* fix out of range error (#4931)
* fix out of range error
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove console logs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add a regression test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Run chrome e2e snapshots only on linux (#4947)
* Run chrome e2e snapshots only on linux
* Wtf is this 1-indexed
* Force 1/1 sharding
* Add TODO
* Nadro/3079/screenshot improvements (#3917)
* chore: swapped screenshot to only use the video stream
* feat: video stream screenshot, native electron screenshot
* fix: auto tsc, fmt, xgen, lint
* fix: fixing tsc errors
* fix: removing debug console.log
* fix: renaming ScreenShot to Screenshot
* fix: deleting console log from debugging
* fix: bug with what source was referenced
* fix: using a productName
* fix: improving usage for native screenshots and detecthing support
* fix: fmt
* chore: updated rust test documentation
* fix: typo in readme
* fix: leaving package.json and yarn.lock the same as main??
* bump
* bump
* bump again
* bump again2
* feat: implemented zoom to fit on code change if previous AST was empty (#3925)
* feat: implemented zoom to fit on code change if previous AST was empty
* feat: implementing selectAll text logic to enable select all and copy and paste and zoom to fit will work
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: clarifying comment in _isAstEmpty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump again
* fix: fixing new type since this branch is old
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Add dependabot group for all serde dependencies (#4944)
* Fix formatting of dependabot.yml
* Add dependabot group for all serde dependencies
* CM KCL: = and => are optional in fn declarations (#4941)
CM KCL: `=` and `=>` are optional in fn declarations
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump ts-rs from 10.0.0 to 10.1.0 (#4949)
* Add toolbar buttons for text-to-cad and prompt-to-edit (#4938)
* Add toolbar buttons for text-to-cad and prompt-to-edit
Resolves #4890
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* `preventDefault` on <kbd>Enter</kbd> with textarea input so buttons aren't clicked as well
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Bump quote from 1.0.37 to 1.0.38 in /src/wasm-lib (#4951)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.37...1.0.38)
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* array pop with unlabled kw arg
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Paul Tagliamonte <paul@zoo.dev>
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com>
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
Co-authored-by: Matt Mundell <32057441+mattmundell@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Mundell <matt@mundell.me>
Co-authored-by: alteous <david@harvey-macaulay.com>
2025-01-07 15:24:24 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_elem_pop_empty_fail {
const TEST_NAME : & str = " array_elem_pop_empty_fail " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
implementing array pop (#4806)
* implementing naive array pop
* multi-profile follow up. (#4802)
* multi-profile work
* fix enter sketch on cap
* fix coderef problem for walls and caps
* allow sketch mode entry from circle
* clean up
* update snapshot
* Look at this (photo)Graph *in the voice of Nickelback*
* trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* add test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix how expression index is corrected, to make compatible with offset planes
* another test
* tweak test
* more test tweaks
* break up test to fix it hopfully
* fix onboarding test
* remove bad comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* get ready to bump (kcl-lib and friends) world (#4794)
get ready to bump world
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Revert multi-profile (#4812)
* Revert "multi-profile follow up. (#4802)"
This reverts commit 2b2ed470c10c82ed88b845efdea4abb3f2eb866e.
* Revert "multi profile (#4532)"
This reverts commit 04e586d07bd8004f725335225d8d51df52169c51.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Re-run CI after snapshots
* Re-run CI after snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Re-run CI after snapshots
* Add `fixme` to onboarding test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add tracking of operations for the feature tree (#4746)
* Add operations tracking for the timeline
* Change to only track certain stdlib functions as operations
* Update gen files
* Add operations to simulation snapshot tests
* Add tracking of positional function calls
* Fix generated field names to be camel case in TS
* Fix generated TS field names to match and better docs
* Fix order of ops with patternTransform
* Fix sweep to be included
* Add new expected test outputs
* Add tracking for startSketchOn
* Update ops output to include startSketchOn
* Fix serde field name
* Fix output field name
* Add tracking of operations that fail
* Add snapshots of operations even when there's a KCL execution error
* Add ops output for error executions
* Add operations output to executor error
* Update op source ranges
* Remove tracking of circle() and polygon() since they're not needed
* Update output without circle and polygon
* Fix to track patternCircular3d and patternLinear3d
* Remove tracking for mirror2d
* Update ops output
* Fix to track the correct source range of function definitions
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Change KCL completion to use new object/record syntax (#4815)
* Reserve syntax for units of measure (#4783)
* Allow underscores but only for un-referenced names
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support numeric suffixes for UoM types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* UoM type arguments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* warnings -> non-fatal errors
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* type ascription
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Whole module imports (#4767)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support completions from import statements (#4768)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Implements boolean logical and/or in kcl (#4678)
* redoing bool logic impl on latest main
* adding snapshot tests (removing .new)
* removing accidental change smh:(
* accepting client side scene snapshot
* accepting png snapshot and triggering ci
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png again?
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting grid visibility snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png snapshot
* rerunning simtest creation to get ops.snap files
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Annotations syntax and per-file default units preparatory work (#4822)
* Parse annotations
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Propagate settings from annotations to exec_state
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* KCL: Unlabeled first param defaults to % (#4817)
Part of #4600
KCL functions can declare one special argument that doesn't require a label on its parameter when called.
This PR will default that arg to % (the current pipeline) if not given.
* Deprecate startSketchAt() stdlib function (#4819)
* Deprecate startSketchAt() stdlib function
* Remove uses of startSketchAt() from the doc tests
* Update docs
* Add dry-run validation for Loft (#4820)
* WIP: mess with shell selection validation
Will eventually fix #4711
* Update from main
* WIP: not working yet
* Working loft dry run validator
* Clean up shell (still not working)
* Bump kittycad-modeling-cmds
* Clean up
* Add logging
* Add proper object_id and face_id mapping, still not working for shell
* Fix faceId
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Add dry-run validation to Loft
Checks one box for #4711
* Add extra check for non solid2ds
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Double click label on sketch to dimension (#4816)
* feat: double click segment label to dimension length, POC, need to clean up code!
* fix: cleaning up the PR for review
* fix: cleaning for the PR. Adding more comments and moving some logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: mergining main, auto linter and tsc fixes. Need to make some more
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: tsc errors are resolved
* chore: added test for constraint
* fix: fixing overlay bug since length labels can now be clicked.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* KCL: Show beautiful Miette errors when a KCL example test fails (#4829)
* KCL: Show beautiful Miette errors when a KCL example test fails
Background: KCL example tests are generated from the stdlib KCL examples in the `#[stdlib]` macro in derive-docs.
Problem: When these tests fail, they output a really unhelpful error message like Kcl(Semantic(KclErrorDetails { source_ranges: [156, 160, 0], message: "Expected a sketch but found array" } )).
Solution: Use miette. Now the errors highlight the KCL code that failed and show exactly what went wrong, on which line, presenting nice diagnostics that look like cargo/rustc output.
* Update helix snapshots
* Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Add blank line to discord bot message (#4814)
* Add blank link to discord bot message
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Implement some basic cache program generation (#4840)
Implement some basic cache program generation
A bit ago, @jessfraz added the ability to control reexecution from the
executor. When we did this, it used the digest to determine if there
was a code change rather than a non-code change (whitespace, comment,
etc).
This allows the creation of a new program to be run without clearing the
scene. This, in conjunction with being able to delete Engine objects by
ID will allow us to do some clever stuff when incrementally executing
a program.
I'm still working on something a bit more advanced, but a good first
step to derisk some of the caching behavior here fully is to implement a
basic "changed program" stub.
This process the ast programs (old and new) if it doesn't exactly match.
This would have been a complete refresh before this commit.
1) Check all overlapping top-level statements of the body of the new and
old AST and ensure they all match.
- If this is true, this means that one of the two AST programs has more
elements then the other, and they all otherwise match (addition or
deletion of the end of the program). We continue to #2 in this
case.
- If this is false, we have a meaingful difference in a section of
overlapping code. This will result in a cache miss and rebuild
the scene. We short-cut here and the scene is rebuilt.
2) Check the lengths of the two bodies.
- If they're the same, we shouldn't have even been called. We will
short-cut with a noop cache return (no clear, no program).
- if the old ast is longer, we've removed instructions from the
program. We can't delete things now, so this will result in a cache
miss and rebuild the scene. We short-cut here and the scene is
rebuilt.
- If the new ast is longer, we have an insertion of code at the end.
3) construct a new program using only the new elements from the new
ast, and return a `CacheResult` that *does not clear the scene*.
This means nothing will be rebuilt, and only a new object will polp
onto the scene. This is the first case where we diverge with
existing behavior.
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
* Fix mac issue after electron test migration PR (#4842)
Fix mac issue after electron test migration pR
* Remove guards from modeling commands in the toolbar (#4800)
* Remove guards from modeling commands in the toolbar
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove the deprecated function, update doc comment for the one still in use
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove more selection check functions that are no longer used
* Update E2E tests that assumed the extrude button could be disabled due to selection
* Update a few fillet tests that expected the button to disable based on selection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Prompt to edit (#4830)
* initial plumbing for getting the new option into the cmd-bar
* start of prompt edit
* update AI poll
* add spinner
* more prompt engineering
* add success toast, allowing user's to reject code
* select code that changed in prompt to edit
* selection in scene should not disappear when opening prompt cmd
* tweak
* fmt
* add tests
* some clean up
* clean up
* fix tests
* Yeet telemetry to text to cad endpoint (#4847)
yeet telemetry to text to cad endpoint
* Tweak prompt wording (#4846)
tweak prompt wording
* update discord bot (#4837)
* Re-enable test 'code pane closed at start' after electron migration (#4841)
* Re-enable 'code pane closed at start'
Relates to #4838
* Enable test on current branch
* Revert "Enable test on current branch"
This reverts commit 0d970b9ad6dac4fcc446b227c8e3d99cc9cb6ee8.
* Add 3-point circle tool (#4832)
* Add 3-point circle tool
This adds a 1st pass for the 3-point circle tool.
There is disabled code to drag around the 3 points and redraw the circle and
a triangle created by those points. It will be enabled in a follow-up PR
when we have circle3Point in the stdlib.
For now, all it does is after the 3rd click, will insert circle center-radius
KCL code for users to modify.
* PR comments
* First draft of a feature tree pane (#4782)
* Fix e2e default planes tests to use mask on state indicator (#4849)
* Fix e2e default planes tests to use mask on state indicator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: don't error on failure to fetch privacy settings (#4799)
* fix: dont error on failure to fetch privacy settings
* Add console warning when we ignore it
---------
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
* Match package license to LICENSE file (#4882)
* Remove the old Loft GitHub issue link in the toolbar (#4848)
Now that it's available, it shouldn't be there anymore.
* Fix fuzz crate lints and update deps (#4873)
* Fix fuzz to use new API
* Fix fuzz Cargo.toml lints and update lock
* Use app foreground color for focus outline button color so there's no hue collision (#4894)
Towards #4851
* Add support for float numbers in rem() arguments (#4858)
* Add support for float numbers in rem() arguments
* Update docs
* Rename to prevent name collision in docs
* Update docs after rename to NumberArg
* Fix parameter types to follow naming convention
* Change doc comment description to not refer to floating point
* Update docs after NumberArg doc change
* Change function to be more condensed
* Change to not try to preserve ints
* Update docs to use f64
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add auto-retries to macOS build notarization (#4892)
* Add DEBUG=electron-notarize* to build-apps
* Force IS_RELEASE: true
* Temp: Disable version setting based on tag
* Remove deprecated notarize.teamId and add retry logic
* Revert "Remove deprecated notarize.teamId and add retry logic"
This reverts commit 6ff98d784d77cc29a2b7b5da10327a8d1ff01572.
* Retry only on macOS
* Better retry logic for macOS
* Use nick-fields/retry
* Clean up Temp: commits for PR
* Clean up
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump nanoid from 3.3.7 to 3.3.8 (#4731)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)
---
updated-dependencies:
- dependency-name: nanoid
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Enable enter for autocompletions in the command palette KCL input (#4896)
* Enable enter for autocompletions in the command palette KCL input
* Oops I commented out code for the variable name input
Thanks for the catch @pierremtb
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Bump rollup from 4.21.0 to 4.29.1 (#4888)
* Bump rollup from 4.21.0 to 4.29.1
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.0 to 4.29.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.0...v4.29.1)
---
updated-dependencies:
- dependency-name: rollup
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Louder Windows codesign errors (#4762)
* WIP: Silent failure in signWin.js
Fixes #4582
* Temp: force release build
* Fake throw
* Temp: another test
* Clean up for merge
* Add parsing keyword function calls inside pipelines (#4907)
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Remove draft PR filter on e2e tests (#4908)
* Add three point circle stdlib function (#4893)
* Add parsing keyword function calls inside pipelines
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Add three point circle stdlib function
* Generate new documentation
* Fix 20:20 for the circle three point test
* Convert to using keyword arguments
* Wtf yo
* Remove unused structure
* Use the new simulation tests
* Regenerate documentation
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Move the base CodeMirror KCL support to a local package (#4897)
* Move CodeMirror LRLanguage to new file
This separates the base language support from the LSP and color picker.
* Move the base CodeMirror KCL support to a local package
* Start CodeMirror grammar tests
* Exclude vitest config in tsconfig
* Add KCL path to tsconfig
* Remove stray import
* Drop extension from import
* Use __filename for commonjs compat
* Check exec return before access
* Build ES and CJS to dist
* Format
* Exclude all.test.ts from codespell
This is to work around "fileTests" imported from Lezer. Future codespell versions look
like they'll allow the code to be annotated, which would be nicer.
---------
Co-authored-by: Matt Mundell <matt@mundell.me>
* Fix typo in README (#3843)
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* remove backwards compatibility for snake case in objects (#4920)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* CM KCL: Support `=` in record init (#4933)
Support `=` in record init
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump clap from 4.5.21 to 4.5.23 in /src/wasm-lib (#4928)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.21 to 4.5.23.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.21...clap_complete-v4.5.23)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @kittycad/lib from 2.0.7 to 2.0.12 (#4922)
Bumps [@kittycad/lib](https://github.com/KittyCAD/kittycad.ts) from 2.0.7 to 2.0.12.
- [Release notes](https://github.com/KittyCAD/kittycad.ts/releases)
- [Commits](https://github.com/KittyCAD/kittycad.ts/compare/v2.0.7...v2.0.12)
---
updated-dependencies:
- dependency-name: "@kittycad/lib"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump anyhow from 1.0.94 to 1.0.95 in /src/wasm-lib (#4929)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.94 to 1.0.95.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.94...1.0.95)
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump url from 2.5.3 to 2.5.4 in /src/wasm-lib (#4930)
Bumps [url](https://github.com/servo/rust-url) from 2.5.3 to 2.5.4.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4)
---
updated-dependencies:
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump wasm-streams from 0.4.1 to 0.4.2 in /src/wasm-lib (#4926)
Bumps [wasm-streams](https://github.com/MattiasBuelens/wasm-streams) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/MattiasBuelens/wasm-streams/releases)
- [Changelog](https://github.com/MattiasBuelens/wasm-streams/blob/main/CHANGELOG.md)
- [Commits](https://github.com/MattiasBuelens/wasm-streams/compare/v0.4.1...v0.4.2)
---
updated-dependencies:
- dependency-name: wasm-streams
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @csstools/postcss-oklab-function from 4.0.2 to 4.0.7 (#4923)
Bumps [@csstools/postcss-oklab-function](https://github.com/csstools/postcss-plugins/tree/HEAD/plugins/postcss-oklab-function) from 4.0.2 to 4.0.7.
- [Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-oklab-function/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugins/postcss-oklab-function)
---
updated-dependencies:
- dependency-name: "@csstools/postcss-oklab-function"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: writes to disk when the user accepts the prompt to edit (#4942)
* fix: writes to disk when the user accepts the prompt to edit
* fix: then catch
* Make circle3Point tool an actor (#4906)
* Reduce the amount of data sent to TS and make new fields opt-in (#4913)
* Reduce the amount of data sent back to JS/TS from WASM
* Remove unneeded derives since we shouldn't expose these types
* Alias type to be clearer
* Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.… (#4945)
Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.2.86
* fix out of range error (#4931)
* fix out of range error
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove console logs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add a regression test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Run chrome e2e snapshots only on linux (#4947)
* Run chrome e2e snapshots only on linux
* Wtf is this 1-indexed
* Force 1/1 sharding
* Add TODO
* Nadro/3079/screenshot improvements (#3917)
* chore: swapped screenshot to only use the video stream
* feat: video stream screenshot, native electron screenshot
* fix: auto tsc, fmt, xgen, lint
* fix: fixing tsc errors
* fix: removing debug console.log
* fix: renaming ScreenShot to Screenshot
* fix: deleting console log from debugging
* fix: bug with what source was referenced
* fix: using a productName
* fix: improving usage for native screenshots and detecthing support
* fix: fmt
* chore: updated rust test documentation
* fix: typo in readme
* fix: leaving package.json and yarn.lock the same as main??
* bump
* bump
* bump again
* bump again2
* feat: implemented zoom to fit on code change if previous AST was empty (#3925)
* feat: implemented zoom to fit on code change if previous AST was empty
* feat: implementing selectAll text logic to enable select all and copy and paste and zoom to fit will work
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: clarifying comment in _isAstEmpty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump again
* fix: fixing new type since this branch is old
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Add dependabot group for all serde dependencies (#4944)
* Fix formatting of dependabot.yml
* Add dependabot group for all serde dependencies
* CM KCL: = and => are optional in fn declarations (#4941)
CM KCL: `=` and `=>` are optional in fn declarations
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump ts-rs from 10.0.0 to 10.1.0 (#4949)
* Add toolbar buttons for text-to-cad and prompt-to-edit (#4938)
* Add toolbar buttons for text-to-cad and prompt-to-edit
Resolves #4890
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* `preventDefault` on <kbd>Enter</kbd> with textarea input so buttons aren't clicked as well
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Bump quote from 1.0.37 to 1.0.38 in /src/wasm-lib (#4951)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.37...1.0.38)
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* array pop with unlabled kw arg
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Paul Tagliamonte <paul@zoo.dev>
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com>
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
Co-authored-by: Matt Mundell <32057441+mattmundell@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Mundell <matt@mundell.me>
Co-authored-by: alteous <david@harvey-macaulay.com>
2025-01-07 15:24:24 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
mod array_elem_pop_fail {
const TEST_NAME : & str = " array_elem_pop_fail " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
implementing array pop (#4806)
* implementing naive array pop
* multi-profile follow up. (#4802)
* multi-profile work
* fix enter sketch on cap
* fix coderef problem for walls and caps
* allow sketch mode entry from circle
* clean up
* update snapshot
* Look at this (photo)Graph *in the voice of Nickelback*
* trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* add test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix how expression index is corrected, to make compatible with offset planes
* another test
* tweak test
* more test tweaks
* break up test to fix it hopfully
* fix onboarding test
* remove bad comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* get ready to bump (kcl-lib and friends) world (#4794)
get ready to bump world
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Revert multi-profile (#4812)
* Revert "multi-profile follow up. (#4802)"
This reverts commit 2b2ed470c10c82ed88b845efdea4abb3f2eb866e.
* Revert "multi profile (#4532)"
This reverts commit 04e586d07bd8004f725335225d8d51df52169c51.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Re-run CI after snapshots
* Re-run CI after snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Re-run CI after snapshots
* Add `fixme` to onboarding test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add tracking of operations for the feature tree (#4746)
* Add operations tracking for the timeline
* Change to only track certain stdlib functions as operations
* Update gen files
* Add operations to simulation snapshot tests
* Add tracking of positional function calls
* Fix generated field names to be camel case in TS
* Fix generated TS field names to match and better docs
* Fix order of ops with patternTransform
* Fix sweep to be included
* Add new expected test outputs
* Add tracking for startSketchOn
* Update ops output to include startSketchOn
* Fix serde field name
* Fix output field name
* Add tracking of operations that fail
* Add snapshots of operations even when there's a KCL execution error
* Add ops output for error executions
* Add operations output to executor error
* Update op source ranges
* Remove tracking of circle() and polygon() since they're not needed
* Update output without circle and polygon
* Fix to track patternCircular3d and patternLinear3d
* Remove tracking for mirror2d
* Update ops output
* Fix to track the correct source range of function definitions
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Change KCL completion to use new object/record syntax (#4815)
* Reserve syntax for units of measure (#4783)
* Allow underscores but only for un-referenced names
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support numeric suffixes for UoM types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* UoM type arguments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* warnings -> non-fatal errors
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* type ascription
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Whole module imports (#4767)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support completions from import statements (#4768)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Implements boolean logical and/or in kcl (#4678)
* redoing bool logic impl on latest main
* adding snapshot tests (removing .new)
* removing accidental change smh:(
* accepting client side scene snapshot
* accepting png snapshot and triggering ci
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png again?
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting grid visibility snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* accepting png snapshot
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* accepting png snapshot
* rerunning simtest creation to get ops.snap files
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Annotations syntax and per-file default units preparatory work (#4822)
* Parse annotations
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Propagate settings from annotations to exec_state
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* KCL: Unlabeled first param defaults to % (#4817)
Part of #4600
KCL functions can declare one special argument that doesn't require a label on its parameter when called.
This PR will default that arg to % (the current pipeline) if not given.
* Deprecate startSketchAt() stdlib function (#4819)
* Deprecate startSketchAt() stdlib function
* Remove uses of startSketchAt() from the doc tests
* Update docs
* Add dry-run validation for Loft (#4820)
* WIP: mess with shell selection validation
Will eventually fix #4711
* Update from main
* WIP: not working yet
* Working loft dry run validator
* Clean up shell (still not working)
* Bump kittycad-modeling-cmds
* Clean up
* Add logging
* Add proper object_id and face_id mapping, still not working for shell
* Fix faceId
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Add dry-run validation to Loft
Checks one box for #4711
* Add extra check for non solid2ds
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Double click label on sketch to dimension (#4816)
* feat: double click segment label to dimension length, POC, need to clean up code!
* fix: cleaning up the PR for review
* fix: cleaning for the PR. Adding more comments and moving some logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: mergining main, auto linter and tsc fixes. Need to make some more
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* fix: tsc errors are resolved
* chore: added test for constraint
* fix: fixing overlay bug since length labels can now be clicked.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* KCL: Show beautiful Miette errors when a KCL example test fails (#4829)
* KCL: Show beautiful Miette errors when a KCL example test fails
Background: KCL example tests are generated from the stdlib KCL examples in the `#[stdlib]` macro in derive-docs.
Problem: When these tests fail, they output a really unhelpful error message like Kcl(Semantic(KclErrorDetails { source_ranges: [156, 160, 0], message: "Expected a sketch but found array" } )).
Solution: Use miette. Now the errors highlight the KCL code that failed and show exactly what went wrong, on which line, presenting nice diagnostics that look like cargo/rustc output.
* Update helix snapshots
* Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Add blank line to discord bot message (#4814)
* Add blank link to discord bot message
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Implement some basic cache program generation (#4840)
Implement some basic cache program generation
A bit ago, @jessfraz added the ability to control reexecution from the
executor. When we did this, it used the digest to determine if there
was a code change rather than a non-code change (whitespace, comment,
etc).
This allows the creation of a new program to be run without clearing the
scene. This, in conjunction with being able to delete Engine objects by
ID will allow us to do some clever stuff when incrementally executing
a program.
I'm still working on something a bit more advanced, but a good first
step to derisk some of the caching behavior here fully is to implement a
basic "changed program" stub.
This process the ast programs (old and new) if it doesn't exactly match.
This would have been a complete refresh before this commit.
1) Check all overlapping top-level statements of the body of the new and
old AST and ensure they all match.
- If this is true, this means that one of the two AST programs has more
elements then the other, and they all otherwise match (addition or
deletion of the end of the program). We continue to #2 in this
case.
- If this is false, we have a meaingful difference in a section of
overlapping code. This will result in a cache miss and rebuild
the scene. We short-cut here and the scene is rebuilt.
2) Check the lengths of the two bodies.
- If they're the same, we shouldn't have even been called. We will
short-cut with a noop cache return (no clear, no program).
- if the old ast is longer, we've removed instructions from the
program. We can't delete things now, so this will result in a cache
miss and rebuild the scene. We short-cut here and the scene is
rebuilt.
- If the new ast is longer, we have an insertion of code at the end.
3) construct a new program using only the new elements from the new
ast, and return a `CacheResult` that *does not clear the scene*.
This means nothing will be rebuilt, and only a new object will polp
onto the scene. This is the first case where we diverge with
existing behavior.
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
* Fix mac issue after electron test migration PR (#4842)
Fix mac issue after electron test migration pR
* Remove guards from modeling commands in the toolbar (#4800)
* Remove guards from modeling commands in the toolbar
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove the deprecated function, update doc comment for the one still in use
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Remove more selection check functions that are no longer used
* Update E2E tests that assumed the extrude button could be disabled due to selection
* Update a few fillet tests that expected the button to disable based on selection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Prompt to edit (#4830)
* initial plumbing for getting the new option into the cmd-bar
* start of prompt edit
* update AI poll
* add spinner
* more prompt engineering
* add success toast, allowing user's to reject code
* select code that changed in prompt to edit
* selection in scene should not disappear when opening prompt cmd
* tweak
* fmt
* add tests
* some clean up
* clean up
* fix tests
* Yeet telemetry to text to cad endpoint (#4847)
yeet telemetry to text to cad endpoint
* Tweak prompt wording (#4846)
tweak prompt wording
* update discord bot (#4837)
* Re-enable test 'code pane closed at start' after electron migration (#4841)
* Re-enable 'code pane closed at start'
Relates to #4838
* Enable test on current branch
* Revert "Enable test on current branch"
This reverts commit 0d970b9ad6dac4fcc446b227c8e3d99cc9cb6ee8.
* Add 3-point circle tool (#4832)
* Add 3-point circle tool
This adds a 1st pass for the 3-point circle tool.
There is disabled code to drag around the 3 points and redraw the circle and
a triangle created by those points. It will be enabled in a follow-up PR
when we have circle3Point in the stdlib.
For now, all it does is after the 3rd click, will insert circle center-radius
KCL code for users to modify.
* PR comments
* First draft of a feature tree pane (#4782)
* Fix e2e default planes tests to use mask on state indicator (#4849)
* Fix e2e default planes tests to use mask on state indicator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: don't error on failure to fetch privacy settings (#4799)
* fix: dont error on failure to fetch privacy settings
* Add console warning when we ignore it
---------
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
* Match package license to LICENSE file (#4882)
* Remove the old Loft GitHub issue link in the toolbar (#4848)
Now that it's available, it shouldn't be there anymore.
* Fix fuzz crate lints and update deps (#4873)
* Fix fuzz to use new API
* Fix fuzz Cargo.toml lints and update lock
* Use app foreground color for focus outline button color so there's no hue collision (#4894)
Towards #4851
* Add support for float numbers in rem() arguments (#4858)
* Add support for float numbers in rem() arguments
* Update docs
* Rename to prevent name collision in docs
* Update docs after rename to NumberArg
* Fix parameter types to follow naming convention
* Change doc comment description to not refer to floating point
* Update docs after NumberArg doc change
* Change function to be more condensed
* Change to not try to preserve ints
* Update docs to use f64
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add auto-retries to macOS build notarization (#4892)
* Add DEBUG=electron-notarize* to build-apps
* Force IS_RELEASE: true
* Temp: Disable version setting based on tag
* Remove deprecated notarize.teamId and add retry logic
* Revert "Remove deprecated notarize.teamId and add retry logic"
This reverts commit 6ff98d784d77cc29a2b7b5da10327a8d1ff01572.
* Retry only on macOS
* Better retry logic for macOS
* Use nick-fields/retry
* Clean up Temp: commits for PR
* Clean up
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump nanoid from 3.3.7 to 3.3.8 (#4731)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)
---
updated-dependencies:
- dependency-name: nanoid
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Enable enter for autocompletions in the command palette KCL input (#4896)
* Enable enter for autocompletions in the command palette KCL input
* Oops I commented out code for the variable name input
Thanks for the catch @pierremtb
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Bump rollup from 4.21.0 to 4.29.1 (#4888)
* Bump rollup from 4.21.0 to 4.29.1
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.0 to 4.29.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.0...v4.29.1)
---
updated-dependencies:
- dependency-name: rollup
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Louder Windows codesign errors (#4762)
* WIP: Silent failure in signWin.js
Fixes #4582
* Temp: force release build
* Fake throw
* Temp: another test
* Clean up for merge
* Add parsing keyword function calls inside pipelines (#4907)
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Remove draft PR filter on e2e tests (#4908)
* Add three point circle stdlib function (#4893)
* Add parsing keyword function calls inside pipelines
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Add three point circle stdlib function
* Generate new documentation
* Fix 20:20 for the circle three point test
* Convert to using keyword arguments
* Wtf yo
* Remove unused structure
* Use the new simulation tests
* Regenerate documentation
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Move the base CodeMirror KCL support to a local package (#4897)
* Move CodeMirror LRLanguage to new file
This separates the base language support from the LSP and color picker.
* Move the base CodeMirror KCL support to a local package
* Start CodeMirror grammar tests
* Exclude vitest config in tsconfig
* Add KCL path to tsconfig
* Remove stray import
* Drop extension from import
* Use __filename for commonjs compat
* Check exec return before access
* Build ES and CJS to dist
* Format
* Exclude all.test.ts from codespell
This is to work around "fileTests" imported from Lezer. Future codespell versions look
like they'll allow the code to be annotated, which would be nicer.
---------
Co-authored-by: Matt Mundell <matt@mundell.me>
* Fix typo in README (#3843)
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* remove backwards compatibility for snake case in objects (#4920)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* CM KCL: Support `=` in record init (#4933)
Support `=` in record init
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump clap from 4.5.21 to 4.5.23 in /src/wasm-lib (#4928)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.21 to 4.5.23.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.21...clap_complete-v4.5.23)
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @kittycad/lib from 2.0.7 to 2.0.12 (#4922)
Bumps [@kittycad/lib](https://github.com/KittyCAD/kittycad.ts) from 2.0.7 to 2.0.12.
- [Release notes](https://github.com/KittyCAD/kittycad.ts/releases)
- [Commits](https://github.com/KittyCAD/kittycad.ts/compare/v2.0.7...v2.0.12)
---
updated-dependencies:
- dependency-name: "@kittycad/lib"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump anyhow from 1.0.94 to 1.0.95 in /src/wasm-lib (#4929)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.94 to 1.0.95.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.94...1.0.95)
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump url from 2.5.3 to 2.5.4 in /src/wasm-lib (#4930)
Bumps [url](https://github.com/servo/rust-url) from 2.5.3 to 2.5.4.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4)
---
updated-dependencies:
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump wasm-streams from 0.4.1 to 0.4.2 in /src/wasm-lib (#4926)
Bumps [wasm-streams](https://github.com/MattiasBuelens/wasm-streams) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/MattiasBuelens/wasm-streams/releases)
- [Changelog](https://github.com/MattiasBuelens/wasm-streams/blob/main/CHANGELOG.md)
- [Commits](https://github.com/MattiasBuelens/wasm-streams/compare/v0.4.1...v0.4.2)
---
updated-dependencies:
- dependency-name: wasm-streams
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @csstools/postcss-oklab-function from 4.0.2 to 4.0.7 (#4923)
Bumps [@csstools/postcss-oklab-function](https://github.com/csstools/postcss-plugins/tree/HEAD/plugins/postcss-oklab-function) from 4.0.2 to 4.0.7.
- [Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-oklab-function/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugins/postcss-oklab-function)
---
updated-dependencies:
- dependency-name: "@csstools/postcss-oklab-function"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: writes to disk when the user accepts the prompt to edit (#4942)
* fix: writes to disk when the user accepts the prompt to edit
* fix: then catch
* Make circle3Point tool an actor (#4906)
* Reduce the amount of data sent to TS and make new fields opt-in (#4913)
* Reduce the amount of data sent back to JS/TS from WASM
* Remove unneeded derives since we shouldn't expose these types
* Alias type to be clearer
* Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.… (#4945)
Bump syn from 2.0.87 to 2.0.95 to be compatible with modeling-cmds 0.2.86
* fix out of range error (#4931)
* fix out of range error
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove console logs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add a regression test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Run chrome e2e snapshots only on linux (#4947)
* Run chrome e2e snapshots only on linux
* Wtf is this 1-indexed
* Force 1/1 sharding
* Add TODO
* Nadro/3079/screenshot improvements (#3917)
* chore: swapped screenshot to only use the video stream
* feat: video stream screenshot, native electron screenshot
* fix: auto tsc, fmt, xgen, lint
* fix: fixing tsc errors
* fix: removing debug console.log
* fix: renaming ScreenShot to Screenshot
* fix: deleting console log from debugging
* fix: bug with what source was referenced
* fix: using a productName
* fix: improving usage for native screenshots and detecthing support
* fix: fmt
* chore: updated rust test documentation
* fix: typo in readme
* fix: leaving package.json and yarn.lock the same as main??
* bump
* bump
* bump again
* bump again2
* feat: implemented zoom to fit on code change if previous AST was empty (#3925)
* feat: implemented zoom to fit on code change if previous AST was empty
* feat: implementing selectAll text logic to enable select all and copy and paste and zoom to fit will work
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: clarifying comment in _isAstEmpty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump again
* fix: fixing new type since this branch is old
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Add dependabot group for all serde dependencies (#4944)
* Fix formatting of dependabot.yml
* Add dependabot group for all serde dependencies
* CM KCL: = and => are optional in fn declarations (#4941)
CM KCL: `=` and `=>` are optional in fn declarations
Co-authored-by: Matt Mundell <matt@mundell.me>
* Bump ts-rs from 10.0.0 to 10.1.0 (#4949)
* Add toolbar buttons for text-to-cad and prompt-to-edit (#4938)
* Add toolbar buttons for text-to-cad and prompt-to-edit
Resolves #4890
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* `preventDefault` on <kbd>Enter</kbd> with textarea input so buttons aren't clicked as well
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Bump quote from 1.0.37 to 1.0.38 in /src/wasm-lib (#4951)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.37...1.0.38)
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* array pop with unlabled kw arg
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Paul Tagliamonte <paul@zoo.dev>
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com>
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
Co-authored-by: Matt Mundell <32057441+mattmundell@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Mundell <matt@mundell.me>
Co-authored-by: alteous <david@harvey-macaulay.com>
2025-01-07 15:24:24 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-02-10 14:24:00 -05:00
mod helix_simple {
const TEST_NAME : & str = " helix_simple " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
2025-02-25 11:51:54 -06:00
super ::parse ( TEST_NAME ) ;
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-02-25 11:51:54 -06:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-02-26 19:29:59 -08:00
mod import_file_not_exist_error {
const TEST_NAME : & str = " import_file_not_exist_error " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME ) ;
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-02-26 19:29:59 -08:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-02-25 11:51:54 -06:00
mod import_file_parse_error {
const TEST_NAME : & str = " import_file_parse_error " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME ) ;
2025-02-10 14:24:00 -05:00
}
#[ test ]
fn unparse ( ) {
2025-03-17 15:55:25 -07:00
// Do nothing since we want to keep the parse error for the test.
2025-02-10 14:24:00 -05:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-02-28 11:52:14 -08:00
mod flush_batch_on_end {
const TEST_NAME : & str = " flush_batch_on_end " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME ) ;
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-02-28 11:52:14 -08:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-03-11 18:23:21 -07:00
2025-03-13 11:13:33 -07:00
mod multi_transform {
const TEST_NAME : & str = " multi_transform " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME ) ;
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-03-13 11:13:33 -07:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-25 17:55:54 -04:00
mod module_return_using_var {
const TEST_NAME : & str = " module_return_using_var " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-03-11 18:23:21 -07:00
mod import_transform {
const TEST_NAME : & str = " import_transform " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME ) ;
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-03-11 18:23:21 -07:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-03-13 21:59:39 -07:00
mod out_of_band_sketches {
const TEST_NAME : & str = " out_of_band_sketches " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME ) ;
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-03-13 21:59:39 -07:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod crazy_multi_profile {
const TEST_NAME : & str = " crazy_multi_profile " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME ) ;
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-03-13 21:59:39 -07:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-03-17 11:26:56 -04:00
mod assembly_mixed_units_cubes {
const TEST_NAME : & str = " assembly_mixed_units_cubes " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-03-17 11:26:56 -04:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-03-17 13:35:49 -07:00
mod bad_units_in_annotation {
const TEST_NAME : & str = " bad_units_in_annotation " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
2025-03-17 15:55:25 -07:00
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
2025-03-17 13:35:49 -07:00
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-03-19 12:28:56 -07:00
mod translate_after_fillet {
const TEST_NAME : & str = " translate_after_fillet " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod scale_after_fillet {
const TEST_NAME : & str = " scale_after_fillet " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod rotate_after_fillet {
const TEST_NAME : & str = " rotate_after_fillet " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-03-27 18:48:55 -04:00
mod union_cubes {
const TEST_NAME : & str = " union_cubes " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_cylinder_from_cube {
const TEST_NAME : & str = " subtract_cylinder_from_cube " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod intersect_cubes {
const TEST_NAME : & str = " intersect_cubes " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-14 23:51:14 +02:00
2025-04-11 19:06:12 -07:00
mod pattern_into_union {
const TEST_NAME : & str = " pattern_into_union " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_doesnt_need_brackets {
const TEST_NAME : & str = " subtract_doesnt_need_brackets " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-14 23:51:14 +02:00
mod tangent_to_3_point_arc {
const TEST_NAME : & str = " tangent_to_3_point_arc " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-17 17:22:19 -07:00
mod import_async {
const TEST_NAME : & str = " import_async " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-23 09:22:52 +12:00
mod loop_tag {
const TEST_NAME : & str = " loop_tag " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-24 20:25:02 -07:00
mod multiple_foreign_imports_all_render {
const TEST_NAME : & str = " multiple-foreign-imports-all-render " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-27 16:54:32 -07:00
mod import_mesh_clone {
const TEST_NAME : & str = " import_mesh_clone " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-04-29 17:57:02 -07:00
mod clone_w_fillets {
const TEST_NAME : & str = " clone_w_fillets " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
2025-05-13 21:07:24 -07:00
#[ ignore ] // turn on when https://github.com/KittyCAD/engine/pull/3380 is merged
2025-05-16 05:51:08 -04:00
// There's also a test in clone.rs you need to turn too
2025-04-29 17:57:02 -07:00
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod clone_w_shell {
const TEST_NAME : & str = " clone_w_shell " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
2025-05-13 21:07:24 -07:00
#[ ignore ] // turn on when https://github.com/KittyCAD/engine/pull/3380 is merged
2025-04-29 17:57:02 -07:00
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-06 14:58:53 +12:00
mod involute_circular_units {
const TEST_NAME : & str = " involute_circular_units " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-10 13:00:14 -07:00
mod panic_repro_cube {
const TEST_NAME : & str = " panic_repro_cube " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-10 13:48:38 -07:00
mod subtract_regression00 {
const TEST_NAME : & str = " subtract_regression00 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_regression01 {
const TEST_NAME : & str = " subtract_regression01 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_regression02 {
const TEST_NAME : & str = " subtract_regression02 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_regression03 {
const TEST_NAME : & str = " subtract_regression03 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-10 16:23:55 -07:00
mod subtract_regression04 {
const TEST_NAME : & str = " subtract_regression04 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_regression05 {
const TEST_NAME : & str = " subtract_regression05 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-13 14:06:10 -07:00
mod subtract_regression06 {
const TEST_NAME : & str = " subtract_regression06 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod fillet_duplicate_tags {
const TEST_NAME : & str = " fillet_duplicate_tags " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod execute_engine_error_return {
const TEST_NAME : & str = " execute_engine_error_return " ;
2025-05-13 21:07:24 -07:00
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod basic_revolve_circle {
const TEST_NAME : & str = " basic_revolve_circle " ;
2025-05-13 14:06:10 -07:00
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-13 18:05:57 -04:00
mod error_inside_fn_also_has_source_range_of_call_site_recursive {
const TEST_NAME : & str = " error_inside_fn_also_has_source_range_of_call_site_recursive " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-14 13:20:46 -07:00
mod error_revolve_on_edge_get_edge {
const TEST_NAME : & str = " error_revolve_on_edge_get_edge " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-16 16:22:50 -07:00
mod subtract_with_pattern {
const TEST_NAME : & str = " subtract_with_pattern " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_with_pattern_cut_thru {
const TEST_NAME : & str = " subtract_with_pattern_cut_thru " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-14 16:25:12 -07:00
mod sketch_on_face_union {
const TEST_NAME : & str = " sketch_on_face_union " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-16 16:22:50 -07:00
mod multi_target_csg {
const TEST_NAME : & str = " multi_target_csg " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-16 23:02:30 +01:00
mod revolve_colinear {
const TEST_NAME : & str = " revolve-colinear " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-16 13:06:56 -07:00
mod subtract_regression07 {
const TEST_NAME : & str = " subtract_regression07 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-18 16:50:51 -07:00
mod subtract_regression08 {
const TEST_NAME : & str = " subtract_regression08 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_regression09 {
const TEST_NAME : & str = " subtract_regression09 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_regression10 {
const TEST_NAME : & str = " subtract_regression10 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-19 19:42:25 -07:00
mod nested_main_kcl {
const TEST_NAME : & str = " nested_main_kcl " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod nested_windows_main_kcl {
const TEST_NAME : & str = " nested_windows_main_kcl " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-20 20:47:32 -04:00
mod nested_assembly {
const TEST_NAME : & str = " nested_assembly " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-20 16:02:44 -07:00
mod subtract_regression11 {
const TEST_NAME : & str = " subtract_regression11 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
mod subtract_regression12 {
const TEST_NAME : & str = " subtract_regression12 " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-05-27 14:44:32 +01:00
mod spheres {
const TEST_NAME : & str = " spheres " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-06-02 17:25:55 -05:00
mod var_ref_in_own_def {
const TEST_NAME : & str = " var_ref_in_own_def " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-06-03 19:05:40 -05:00
mod ascription_unknown_type {
const TEST_NAME : & str = " ascription_unknown_type " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-06-04 23:48:15 -05:00
mod var_ref_in_own_def_decl {
const TEST_NAME : & str = " var_ref_in_own_def_decl " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}
2025-06-12 21:33:46 +10:00
mod user_reported_union_2_bug {
// TODO IF THIS TEST START PASSING, CLOSE THE FOLLOWING ISSUE
// https://github.com/KittyCAD/modeling-app/issues/7310
// and https://github.com/KittyCAD/engine/issues/3539
const TEST_NAME : & str = " user_reported_union_2_bug " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , false ) . await
}
}
2025-06-19 09:10:21 -05:00
mod non_english_identifiers {
const TEST_NAME : & str = " non_english_identifiers " ;
/// Test parsing KCL.
#[ test ]
fn parse ( ) {
super ::parse ( TEST_NAME )
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn unparse ( ) {
super ::unparse ( TEST_NAME ) . await
}
/// Test that KCL is executed correctly.
#[ tokio::test(flavor = " multi_thread " ) ]
async fn kcl_test_execute ( ) {
super ::execute ( TEST_NAME , true ) . await
}
}