Return modeling commands from KCL execution (#4912)
* Add Rust side artifacts for startSketchOn face or plane * Add Rust-generated artifacts to ExecOutcome * Add output of artifact commands * Add new output files * Wire the artifact commands to the artifact graph creation * Fix to use real PartialEq implemented in modeling commands * Fix modeling commands with zero fields to work * Fix missing artifactCommands field in errors * Change artifact graph to be built from artifact commands * Wire up ExecState artifacts, but not using them yet Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> * Remove unneeded local var * Fix test to fail with a helpful error message when command isn't found * Rename and deprecate orderedCommands * Update comment about borrowing * Move ArtifactCommand tracking to the EngineManager trait * Update artifact commands since tracking in the engine * Upgrade kittycad-modeling-cmds from 0.2.85 to 0.2.86 * Remove unneeded JsonSchema derive to speed up build * Fix to not fail on floating point differences in CI * Update artifact commands output since truncating floating point numbers * Fix to ensure artifact commands get cleared after a clear scene * Update artifact commands snapshot after clearing them on clear scene * Remove all remnants of OrderedCommands * Update output for new simulation tests --------- Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
This commit is contained in:
@ -37,7 +37,7 @@ mod test_examples_someFn {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "someFn", 0usize),
|
||||
kcl_source: "someFn()".to_string(),
|
||||
}));
|
||||
|
@ -37,7 +37,7 @@ mod test_examples_someFn {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "someFn", 0usize),
|
||||
kcl_source: "someFn()".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_show {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "show", 0usize),
|
||||
kcl_source: "This is another code block.\nyes sirrr.\nshow".to_string(),
|
||||
}));
|
||||
@ -92,7 +92,7 @@ mod test_examples_show {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "show", 1usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nshow".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_show {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "show", 0usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nshow".to_string(),
|
||||
}));
|
||||
|
@ -39,7 +39,7 @@ mod test_examples_my_func {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "my_func", 0usize),
|
||||
kcl_source: "This is another code block.\nyes sirrr.\nmyFunc".to_string(),
|
||||
}));
|
||||
@ -93,7 +93,7 @@ mod test_examples_my_func {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "my_func", 1usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nmyFunc".to_string(),
|
||||
}));
|
||||
|
@ -39,7 +39,7 @@ mod test_examples_line_to {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "line_to", 0usize),
|
||||
kcl_source: "This is another code block.\nyes sirrr.\nlineTo".to_string(),
|
||||
}));
|
||||
@ -93,7 +93,7 @@ mod test_examples_line_to {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "line_to", 1usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nlineTo".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_min {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "min", 0usize),
|
||||
kcl_source: "This is another code block.\nyes sirrr.\nmin".to_string(),
|
||||
}));
|
||||
@ -92,7 +92,7 @@ mod test_examples_min {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "min", 1usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nmin".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_show {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "show", 0usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nshow".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_import {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "import", 0usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nimport".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_import {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "import", 0usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nimport".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_import {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "import", 0usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nimport".to_string(),
|
||||
}));
|
||||
|
@ -38,7 +38,7 @@ mod test_examples_show {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "show", 0usize),
|
||||
kcl_source: "This is code.\nIt does other shit.\nshow".to_string(),
|
||||
}));
|
||||
|
@ -37,7 +37,7 @@ mod test_examples_some_function {
|
||||
{
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
error: e.error,
|
||||
filename: format!("{}{}", "some_function", 0usize),
|
||||
kcl_source: "someFunction()".to_string(),
|
||||
}));
|
||||
|
Reference in New Issue
Block a user