* Change so that operations are stored per module
* Refactor so that all modeling commands go through ExecState
* Remove unneeded PartialOrd implementations
* Remove artifact_commands from KclError since it was only for debugging
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Move last uses of untypeed arg getters
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Rename _typed functions
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
We've changed the unnamed field of `KclError` variants to a named called `details`.
To clarify: previously KCL errors looked like this:
```rust
pub enum KclError {
Lexical(KclErrorDetails),
Syntax(KclErrorDetails),
```
Now they look like this:
```rust
pub enum KclError {
Lexical { details: KclErrorDetails },
Syntax { details: KclErrorDetails },
}
```
This lets us more easily add fields to the errors. For example, in the UndefinedValue case, adding a field for what the undefined name was. This PR refactors the code to make my PR in https://github.com/KittyCAD/modeling-app/pull/7309 much easier.
Pure refactor, should not change any behaviour.
* Replace uses of get_unlabeled_kw_arg with _typed version
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Remove more untyped arg getters
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add backtrace to errors
* Add display of backtraces with hints
* Change pane badge to only show count of errors
* Fix property name to not collide with Error superclass
* Increase min stack again
* Add e2e test that checks that the diagnostics are created in CodeMirror
* Remove unneeded code
* Change to the new hotness
* Declare chamfer in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Ignore more in the simulation tests
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Declare fillet in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Move shell and hollow to KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Turn on uom checks
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Convert all lengths to mm for engine calls
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* More units of measure work
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Update CSG output since engine change
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
* parse union and fancy array types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* type aliases
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Treat Helix and Face as primitive types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* code motion: factor our execution::types module
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Tests for type coercion and subtyping
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add Point2D/3D to std
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Rebasing and fixes
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Parse [T] instead of T[] for array types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* homogenous arrays, type coercion, remove solid set and sketch set, etc
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Fixes https://github.com/KittyCAD/modeling-app/issues/4307
Now if you try to fillet the same edge twice in a single fillet command,
the error message is clearer, and the source range will highlight
the specific edges in the array which are duplicated.
Same goes for chamfer.
Note: although the Rust KCL interpreter sends back an array of SourceRange
for each KCL error, the frontend only puts the first one into CodeMirror
diagnostics. We should fix that: https://github.com/KittyCAD/modeling-app/issues/5754