KCEP's memory model stores 'values', which can be either numbers or strings. But we'll need to support storing complex objects like points, lines, sketchgroups, etc in memory too.
This PR adds a trait for KCEP composite types, which are laid out in KCEP memory as a consecutive series of values, one for each field.
Part of https://github.com/KittyCAD/modeling-app/issues/993
We want to be able to extract the execution plan (EP) from a KCL program, copy it, and paste it into an engine unit test. Therefore they must be de/serializable.
* update select logic for axis
* add abs Y and X constraints
* make selection tests much more thorough including axis selections
* fmt
* tweak
* tweak
* add snap to XY constraints
* side just for screenshot diffs
* update angle constraint to allow axis seleciton
* fix bux in absY constraint
* add sorting to constraintns
* add issue to TODO
* Revert "side just for screenshot diffs"
This reverts commit aae7874859.
* fix number because something must have updated in the engine
* typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Revert "add sorting to constraintns"
This reverts commit 36054a4069.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* triggre CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* more e2e export fixes
* fixes
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* WIP: Add tauri e2e test for auth on Linux
Fixes#968
* WIP
* WIP
* Working of through /tmp file for user code sharing
* rust int
* User code only in /tmp, fixes
* Longer timeout for github actions
* Remove timeout
* Fmt
* Fmt, 30sec timeout
* Test BUILD_RELEASE true
* Revert "Test BUILD_RELEASE true"
This reverts commit d3b59d4a6c.
* Disable concurrency limit for faster iterations on this PR
* Add logs for responses
* Test manual tauri build before e2e
* WIP
* Catch error on tauri::api:🐚:open
* Clean up
* Clean up
* timeout
* Force BUILD_RELEASE: true
* Back to debug, longer timeout
* Print if url opens ok too
* Check default browser in actions
* Remote shell call on linux (aka e2e for now)
* Fix fmt
* Move to data-testid, clean up
* Add log out section
* Clean up
* Fix typo
* Fix text detection
* Test AppImage
* Revert "Test AppImage"
This reverts commit cf126b1aa6.
* Add comments
* Change to env var
* Clean up
* Fmt fix
* Better package json name
* Add import @wdio/globals
* Back to require
* Update wdio, fix globals
* Move to typescript
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix ply and stl exports
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* explanation comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* selections e2e test
* .only
* adde test
* make invalid kcl test pass on macos runner
* further attempt to solve invalid code test on macos
* add comment
* initial playwright setup and test
* try verbose logging
* double check resolution
* double check token
* remove logs
* try running on ubuntu and macos
* move e2e tests
* vitest ignores playwright tests
* add a series of tests
* tweak yarn setup
* typo
* update fmt
* action typo
* rust toolchain?
* remove .only from playwright test
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* add pan and zoom back
* try puting os in commit message
* A snapshot a day keeps the bugs away! 📷🐛 .os
* A snapshot a day keeps the bugs away! 📷🐛 .os
* fix commit message
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-latest)
* add command logs to UI for axis tests
* typo
* fmt
* remove .only
* add auto complete test
* remove .only
* update queries to be more playwright recommended
* move test utils
* remove waits from first test
* remove old snapshots
* re-arrange files and tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* trigger CI
* refactor plane test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* remove .only
* try longer wait
* try snap shoting
* fmt
* better CI names
* fix
* fix linux
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* try make executes on load a bit more robust
* fix
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* stabilise snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-latest)
* make tests run linearly
* update naming
* tidy
* .only
* update readme
* trigger CI
* add set tool
* util clean up
* update readme
* readme tweaks
* self-review clean up
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* tweak
* update readme
* Ensure Vite preview server is running before running any Playwright tests (#1114)
* Ensure that Vite is serving before tests run
* Don't break secrets if developer has extra blank line in env file
* @mxschmitt's suggestions
* fix
* add wait-on types
* tsconfig fix
* update readme
* code template for sktech on each plane test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Part of https://github.com/KittyCAD/modeling-app/issues/1006#issuecomment-1816978586
This adds support for optional parameters to the AST. They are declared with a ? suffix, e.g. `(x, tag?) => {...}`.
This PR does not actually _use_ these optional parameters anywhere. In particular, it does not change the KCL stdlib or any existing function definitions. That will happen in a follow-up PR.
This is purely cosmetic right now, but I want to try and make it easier
to tell when the browser is unable to communicate with the ICE server
by writing it to the console.
I want to add some Sentry logging in the future, but for now, when we
see a stream failing to start, we can at least see what I suspect is the
most common trigger in the console.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
Macro for parsing KCL at Rust compile-time
This adds a new `parse_kcl!` macro which takes a string as input. It parses the string into KCL source code _at compile-time_. Invalid KCL will make your Rust project fail to compile.
Fixes https://github.com/KittyCAD/modeling-app/issues/1018
Databake doesn't have any derive for HashMap, so for NonCodeMeta I decided to skip serializing the non_code_nodes. This should be OK for now.
See <https://github.com/unicode-org/icu4x/issues/4266> for the Databake hashmap issue.
Allows stdlib functions to be written as KCL, not as Rust.
Rust stdlib functions will hereafter be referred to as "core" not "std".
Right now the only stdlib function I implemented is a circle function (it's a wrapper around the core arc function which sets the arc's start/end to 0 and 360 respectively). I know I want to change this function as soon as KCL has enums, which is my next task. So, I don't want users to start using this right away. To that end, I've named this function "unstable_stdlib_circle" not "circle". Once the function is ready to be stabilized, I can rename it to just "circle".
Note that this PR modifies the existing "sketch and extrude a cylinder" KCL test so that instead of using a user-defined circle function, it uses the unstable_stdlib_circle function now. And the twenty-twenty tests pass, so we know my stdlib is working.
https://github.com/KittyCAD/modeling-app/issues/922
* AST function nodes no longer have stdlib function members
IMO the AST should not need an actual pointer to a stdlib function -- that is a completely separate concern from the AST.
Instead, the AST nodes can just store function names, and the executor will have a stdlib which it can look up those names in.
* Fix tests
* Update snapshot tests