* refactor code mod and tests
* tsc
* make lint happy
* remove dumby data
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
KCL functions are a weird edge case, and the `FunctionExpression` field should not be included in its public API. That field is only there for implementation details, it shouldn't be exposed to users.
What's worse is that `FunctionExpression` includes a `Program` so every single AST node wound up being included in our docs.
* fix: only count something as a directory if it has children
* fix: playwright tests
* fix: return 0 if you cant find the projectfolder
* fix: remove folder count from e2e tests since it is unused currently
---------
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
* Implement the functionality
* Another fmt
* Fix handler to not rely on modelingMachine's context,
because that creates an implicit race
* Write an E2E test
* Fix tsc and fmt
* Use artifactGraph helpers for more concise code
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Fix up imports and whatnot from commit 2bfc5f5c
* Make early return more clear with curly braces
* Whoops should have linted
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Make `=` and `=>` optional in function declarations
And requires `:` for return types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Tests
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Format types in function decls
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Require in anon function decls
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add a code mod for offset plane
* Add support for default plane selections to our `otherSelections` object
* Make availableVars work without a selection range
(because default planes don't have one)
* Make default planes selectable in cmdbar even if AST is empty
* Add offset plane command and activate in toolbar
* Avoid unnecessary error when sketching on offset plane by returning early
* Add supporting test features for offset plane E2E test
* Add WIP E2E test for offset plane
Struggling to get local electron test suite running properly
* Typos
* Lints
* Fix test by making it a web-based one:
I couldn't use the cmdBar fixture with an electron test for some reason.
* Update src/lib/commandBarConfigs/modelingCommandConfig.ts
* Update src/machines/modelingMachine.ts
* Revert changes to `homePageFixture`, as they were unused
* @Irev-Dev feedback: convert action to actor, fix machine layout
* Update plane icon to be not dashed, follow conventions closer
* fix selection bugs found by QA-wolf
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* trigger ci
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* AST: Factor shebangs out of non-code metadata and into Progam
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Empty commit to try to unstick CI
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Right now our KCL tests output a debug representation of the KCLError
value. This works OK, but it's difficult to read an error like
"runtime error: SourceRange([44, 48])" because I don't fucking know what
the 44th character in my KCL program is.
In the modeling app, source ranges are turned into nice red squiggly
underlines in the editor. I want nice squiggly underline when I run the
Rust unit tests too, damnit. The JS world should NEVER have fancy toys
that I, a Rust programmer, cannot access. I deserve this. I need this.
So anyway instead of snapshotting debug repr, snapshot a fancy error
via the miette library.
Some clients (e.g. the simulation tests) want to know why a KCL program failed. Was it because of a network error? Or because the client wasn't authorized properly? Or was it a KCL runtime type error?
It's difficult for clients to ask these questions, because the interpreter just returns Anyhow error, basically just a string.
Instead, we should return different variants of an Error enum for different kinds of errors.
This lets us render nice Cargo-style error messages that show the exact KCL line where an error occurred, instead of just printing off a source range. We have that in the CLI, but I'd like it for running normal KCL unit tests.
# Testing
This is a pure refactor, it doesn't change any behaviour, it just stops hiding the specific error types via anyhow. No testing needed. If it compiles, it works.
* Add nightly link in about sectoin
* Add nightly detection
* Lint
* Change APP_NAME to PACKAGE_NAME
* To be improved: working implementation on mac for click to download
* Revert "To be improved: working implementation on mac for click to download"
This reverts commit 7ced32a533.
* Nevermind, will process on the website
* Release KCL, KCL test server and derive-docs
derive-docs 0.1.31
kcl-test-server 0.1.17
kcl-lib 0.2.25
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
KCL stdlib has a function `patternTransform` which works for 3D solids. This adds a similar function `patternTransform2d` which, as you might have guessed, is like `patternTransform` but for 2D. I know. I'm really, really really good at naming things.
This shares almost all of its implementation with 3D patterns via 💖the power of traits💖
This will assist with https://github.com/KittyCAD/modeling-app/issues/4543
* WIP: Improve current nightly implementation
* Add nightly icons
* Clean up script
* Clean up
* Clean up
* Clean up2
* Clean up3
* WIP: Make the release process non-blocking
First commit to fix#4522
* Quick fix
* Test release and updater-test
* Try nightly build
* WIP nightly tag creation
* Change of direction
* Quick fix
* Test nightly
* Better release notes for nightly
* Migrate to artifact@v4 and prepare publish release
* Fix out-yml for artifact@v4
* Progress towards publish-release
* merge-multiple: true
* Add dependency
* Clean up. Change direction again on updater-test (now with RELEASE workflow)
* Clean up and test release builds
* Fix name
* Clean up, add README
* Add release notes override, another release test
* Fake release version & better draft release
* Test nightly
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Clean up and first attempt at publish-release-apps
* Add GH_TOKEN
* Add github-token to download-artifact step
* Add github-token to all download-artifact steps
* Add checkout and node steps
* Clean up
* Remove whitespace
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Quick typo
* Add Kevin's semantic-release.sh script to replace make-release.sh
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix argument error to point to the arg at the call site
* Change MemoryFunction to accept Vec<Arg> instead of Vec<KclValue>
* Rename variable to be clearer
* Fix one more argument error message
* Clean up from PR feedback
* selection stuff
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* trigger CI
* fix bugs
* some edge cut stuff
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* fix sketch mode issues
* fix more tests, selection in sketch related
* more test fixing
* 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
* more sketch mode selection fixes
* fix unit tests
* rename function
* remove .only
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* lint
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* fix bad pathToNode issue
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* fix sketch on face
* migrate a more selections types
* migrate a more selections types
* fix code selection of fillets
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* migrate a more selections types
* fix bad path to node, looks like a race
* migrate a more selections types
* migrate a more selections types
* fix cmd bar selections
* fix cmd bar selections
* fix display issues
* migrate a more selections types
* Revert "migrate a more selections types"
This reverts commit 0d0e453bbb.
* migrate a more selections types
* clean up1
* clean up 2
* fix types after main merge
* review tweaks
* fix wall selection bug
* Update src/lang/std/engineConnection.ts
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* add franks TODO comment
* fix type after main merge, plus a touch of clean up
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
If the key and value in an object literal use the same identifier, allow abbreviating it.
Basically these two are now equivalent:
```
x = 2
obj = { x: x, y: 3}
```
```diff
x = 2
- obj = { x: x, y: 3}
+ obj = { x, y: 3}
```
This syntax is used in JS, Rust and probably elsewhere too.
Here's a more realistic example. Before:
```
radius = 10
startSketchAt([0, 0])
|> circle({center: [0, 0], radius: radius}, %)
```
After:
```diff
radius = 10
startSketchAt([0, 0])
- |> circle({center: [0, 0], radius: radius}, %)
+ |> circle({center: [0, 0], radius}, %)
```
Previously, this was the output of the formatter:
```
fn f = () => {
return () => {
return 1
}
}
```
Now the above will be reformatted as
```
fn f = () => {
return () => {
return 1
}
}
```
Much better!
* Make ast module private
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Make most other modules private
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Expand API to support CLI, Python bindings, and LSP crate
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Pass current file name through to export command
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Oops I needed a couple other things, not just that one line change
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Undo overriding of internal zipped file names
That was liable to cause conflicts and whatnot per @jessfraz feedback
* Update E2E test that was still looking for `output.gltf`
* Missed one other test my bad
* Should've just grepped for output.gltf to begin with
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Paul Tagliamonte <paul@zoo.dev>
* feat: implementing arcTo in standard library, first pass
* feat: computing center and radius for arcto
* fix: updating comment for arcTo
* fix: cargo fmt fix
* fix: bug, the x was used twice!
* fix: Cleaning up some code and adding more comments
* fix: this has to be removed
* fix: resolved merge conflicts with main and updated the codebase to remove the JSON stuff
* fix: addressing cargo clippy issues
* fix: typos
* fix: adding generated docs
* Update doc test snapshots
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Update offset_plane to actually create and show the plane in-engine
* Fix broken ability to use offsetPlanes in startSketchOn
* Make the newly-visible offset planes usable for sketching via UI
* Add a playwright test for sketching on an offset plane via point-and-click
* cargo clippy & cargo fmt
* Make `PlaneData` the first item of `SketchData` so autocomplete continues to work well for `startSketchOn`
* @nadr0 feedback re: `offsetIndex`
* From @jtran: "Need to call the ID generator so that IDs are stable."
* More feedback from @jtran and fix incomplete use of `id_generator` in last commit
* Oops I missed saving `isPathToNodeNumber` earlier 🤦🏻
* Make the distinction between `Plane` and `PlaneOrientationData` more clear per @nadr0 and @lf94's feedback
* Make `newPathToNode` less hardcoded, per @lf94's feedback
* Don't need to unbox and rebox `plane`
* 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)
* Rearranging of enums and structs, but the offsetPlanes are still not used by their sketches
* 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)
* Revert all my little newtype fiddling it's a waste of time.
* Update docs
* cargo fmt
* Remove log
* Print the unexpected diagnostics
* Undo renaming of `PlaneData`
* Remove generated PlaneRientationData docs page
* Redo doc generation after undoing `PlaneData` rename
* Impl FromKclValue for the new plane datatypes
* Clippy lint
* When starting a sketch, only hide the plane if it's a custom plane
* Fix FromKclValue and macro use since merge
* Fix to not convert Plane to PlaneData
* Make sure offset planes are `Custom` type
* SketchData actually doesn't need to be in a certain order
This avoids the autocompletion issue I was having.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* WIP: Fix linux updater 'mv' error
First commit to test the updater-test builds
* Downgrade electron-updater to 6.3.0
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Trigger CI
* Pin to 6.3.0
* Clean up
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: big commit, doing this to save work then do a PR cleanup; center rectangle
* fix: making a center function for each scenario
* fix: reverting the update rectangle code since I have a center rectangle one
* fix: does not allow seletcing circle or rectangle tool while selecting a face
* chore: adding comment to better read the HTML
* fix: cleaning up for PR
* fix: pushing broken code for someone to checkout
* fix: fixed the typescript issues, removed the as keyword for my center rectangle expressions
* fix: removing comment
* fix: removed as for type narrowing checks
* Reapply "Deflake project settings override on desktop (#4370)" (#4450)
This reverts commit b11040c23c.
* Refactor writeToFile and updateCodeEditor to happen at appropriate times
* Turn error into warning about out of date AST.
* Rename setUp to setup
* ONLY reload current file on changes.
* If value is falsey then don't try to executeAst
* Fix up code based selections after constraints
* Correct any last missing code mods
* Update src/clientSideScene/ClientSideSceneComp.tsx
Remove eslint rule no-floating-promises
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Fixups
* Fix FileTree failing
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Rename ::from_mem_item to ::from_kcl_val
The old name is from a dark time lost to human memory,
when we had an enum called MemoryItem.
* Simplify the FromKclValue macros
There's only really need for one macro, not three.
Removes JSON from the KCL object model. Closes https://github.com/KittyCAD/modeling-app/issues/1130 -- it was filed on Nov 27 last year. Hopefully I close it before its one year anniversary.
Changes:
- Removed the UserVal variant from `enum KclValue`. That variant held JSON data.
- Replaced it with several new variants like Number, String, Array (of KCL values), Object (where keys are String and values are KCL values)
- Added a dedicated Sketch variant to KclValue. We used to have a variant like this, but I removed it as an experimental approach to fix this issue. Eventually I decided to undo it and use the approach of this PR instead.
- Removed the `impl_from_arg_via_json` macro, which implemented conversion from KclValue to Rust types by matching the KclValue to its UserVal variant, grabbing the JSON, then deserializing that into the desired Rust type.
- Instead, replaced it with manual conversion from KclValue to Rust types, using some convenience macros like `field!`
* Add on-click snapping behavior
* Fix math error with horizontal/vertical determination
* Move snap constant to where other sketch constants are
* fmt
* Fixing up some of the tests, some still need updating
* A couple other little PW test issues
* 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)
* Fix remaining tests that need updating
* Make `yarn lint` happy
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix description of angleToMatchLengthX
* Update docs
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* update doc regen instructions
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Re-run CI after snapshots
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
* Add final error-less expectation to autocomplete test
* Fix failing test
* tweak to leave function in place
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Internal: Pass through `sweep.subType` in `expandSweep`
* 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)
* implement a simple startSketchOn / offsetPlane lint rule (#4384)
* Bump kittycad-modeling-cmds from 0.2.71 to 0.2.72 in /src/wasm-lib (#4356)
Bumps [kittycad-modeling-cmds](https://github.com/KittyCAD/modeling-api) from 0.2.71 to 0.2.72.
- [Commits](https://github.com/KittyCAD/modeling-api/compare/kittycad-modeling-cmds-0.2.71...kittycad-modeling-cmds-0.2.72)
---
updated-dependencies:
- dependency-name: kittycad-modeling-cmds
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 google-github-actions/upload-cloud-storage from 2.2.0 to 2.2.1 (#4364)
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.2.0...v2.2.1)
---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
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>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Internal fix: make `expandPath` not assume path has associated sweep (#4386)
* Add a test that shows current error within `expandPath`
* Make `expandPath` not assume there is an associated sweep artifact
* Look at this (photo)Graph *in the voice of Nickelback*
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump happy-dom from 14.12.3 to 15.10.1 (#4404)
Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 14.12.3 to 15.10.1.
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](https://github.com/capricorn86/happy-dom/compare/v14.12.3...v15.10.1)
---
updated-dependencies:
- dependency-name: happy-dom
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @electron-forge/maker-zip from 7.4.0 to 7.5.0 (#4394)
Bumps [@electron-forge/maker-zip](https://github.com/electron/forge) from 7.4.0 to 7.5.0.
- [Release notes](https://github.com/electron/forge/releases)
- [Changelog](https://github.com/electron/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/electron/forge/compare/v7.4.0...v7.5.0)
---
updated-dependencies:
- dependency-name: "@electron-forge/maker-zip"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump uuid from 9.0.1 to 11.0.2 (#4393)
Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.1 to 11.0.2.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v9.0.1...v11.0.2)
---
updated-dependencies:
- dependency-name: uuid
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump validator from 0.18.1 to 0.19.0 in /src/wasm-lib (#4396)
Bumps [validator](https://github.com/Keats/validator) from 0.18.1 to 0.19.0.
- [Changelog](https://github.com/Keats/validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Keats/validator/commits)
---
updated-dependencies:
- dependency-name: validator
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump insta from 1.41.0 to 1.41.1 in /src/wasm-lib (#4400)
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.41.0 to 1.41.1.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.41.0...1.41.1)
---
updated-dependencies:
- dependency-name: insta
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 pyo3 from 0.22.5 to 0.22.6 in /src/wasm-lib (#4398)
Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.22.5 to 0.22.6.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/v0.22.6/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.22.5...v0.22.6)
---
updated-dependencies:
- dependency-name: pyo3
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 thiserror from 1.0.65 to 2.0.0 in /src/wasm-lib (#4397)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.65 to 2.0.0.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.65...2.0.0)
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-major
...
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.2 to 2.5.3 in /src/wasm-lib (#4399)
Bumps [url](https://github.com/servo/rust-url) from 2.5.2 to 2.5.3.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.2...v2.5.3)
---
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 @types/ws from 8.5.12 to 8.5.13 (#4395)
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.5.12 to 8.5.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)
---
updated-dependencies:
- dependency-name: "@types/ws"
dependency-type: direct:development
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>
* File tree to act more like VS Code's file tree (#4392)
* File tree acts as VS Code's file tree
* Adjust test for new expectations
* Remove screenshot
* Actually remove this screenshot
* 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: 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)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fixing directory/file selection logic to deselect folders properly and always hightlight files. (#4408)
* File tree acts as VS Code's file tree
* Adjust test for new expectations
* Remove screenshot
* Actually remove this screenshot
* 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)
* fix: fixed logic for selection
* fix: always show the current file
---------
Co-authored-by: 49lf <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump happy-dom from 15.10.1 to 15.10.2 (#4409)
Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 15.10.1 to 15.10.2.
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](https://github.com/capricorn86/happy-dom/compare/v15.10.1...v15.10.2)
---
updated-dependencies:
- dependency-name: happy-dom
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Change Dependabot PR frequency to weekly (#4424)
* Update insta snapshots (#4423)
No meaningful changes, they just added a field to the frontmatter
* Fix KCL source ranges to know which source file they point to (#4418)
* Add ts_rs feature to work with indexmap
* Add feature for schemars to work with indexmap
* Add module ID to intern module paths
* Update code to use new source range with three fields
* Update generated files
* Update docs
* Fix wasm
* Fix TS code to use new SourceRange
* Fix TS tests to use new SourceRange and moduleId
* Fix formatting
* Fix to filter errors and source ranges to only show the top-level module
* Fix to reuse module IDs
* Fix to disallow empty path for import
* Revert unneeded Self change
* Rename field to be clearer
* Fix parser tests
* Update snapshots
* Change to not serialize module_id of 0
* Update snapshots after adding default module_id
* Move module_id functions to separate module
* Fix tests for console errors
* Proposal: module ID = 0 gets skipped when serializing tokens too (#4422)
Just like in AST nodes.
Also I think "is_top_level" communicates intention better than is_default
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Bump anyhow from 1.0.92 to 1.0.93 in /src/wasm-lib (#4417)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.92...1.0.93)
---
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>
* Cut release v0.26.3 (#4427)
* Cut release v0.26.3
* Support new electron-builder env variable requirements for building in release mode
* Bump image from 0.25.3 to 0.25.5 in /src/wasm-lib (#4416)
Bumps [image](https://github.com/image-rs/image) from 0.25.3 to 0.25.5.
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.3...v0.25.5)
---
updated-dependencies:
- dependency-name: image
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>
* Nadro/3799/perf (#4145)
* chore: building out perf testing
* chore: adding my printing code for the different formats of the marks
* feat: adding invocation count table
* fix: markOnce iunstead
* fix: typescript additions
* fix: adding more types
* chore: adding telemetry panel as MVP, gonna remove the pane
* chore: view telemetry from command bar in file route and home route
* fix: deleting unused imports
* fix: deleting some unused files
* fix: auto cleanup
* chore: adding other routes, these will need to be moved...
* chore: moving some printing logic around and unit testing some of it
* fix: moving command init
* fix: removing debugging marks
* fix: adding some comments
* fix: fixed a bug with generating the go to page commands
* chore: adding will pages load within the router config
* chore: implementing marks for routes
* fix: auto fixes and checkers
* chore: implemented a route watcher at the root level...
* fix: auto fixes, removing unused code
* chore: timing for syntax highlighting and auto fixes
* fix: didAuth issue and syntax highlighting in the packaged application. Constructor name gets renamed
* fix: fixing typescript checks
* chore: adding mag bar chart icon for telemetry
* 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)
* chore: swapped telemetry icon for stopwatch
* 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: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* chore: writing telemetry to disk
* fix: auto fixers
* chore: getting args parsed for cli flags and writing telemetry file
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* chore: swapped mark for markOnce since we infinitely write marks to a JS array... need to solve this run time marking in another way. We only need this for startup right now
* 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)
* chore: writing raw marks to disk as well
* 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: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: cleaned up the testing names
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Fix fmt and codespell
* 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: 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)
* fix: moving this route loader data stuff
* chore: adding comment
* fix: fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* empty :(
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* empty :(
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Paul Tagliamonte <paul@zoo.dev>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* fix: fixing on drag number inc/dec massive amount of unit tests
* fix: implemented all scenarios for inc/dec formatting
* fix: deleting unused code
* fix: clearer name
* fix: adding commments
* 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: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* fix: does this trigger the CI?
* 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)
---------
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: building out perf testing
* chore: adding my printing code for the different formats of the marks
* feat: adding invocation count table
* fix: markOnce iunstead
* fix: typescript additions
* fix: adding more types
* chore: adding telemetry panel as MVP, gonna remove the pane
* chore: view telemetry from command bar in file route and home route
* fix: deleting unused imports
* fix: deleting some unused files
* fix: auto cleanup
* chore: adding other routes, these will need to be moved...
* chore: moving some printing logic around and unit testing some of it
* fix: moving command init
* fix: removing debugging marks
* fix: adding some comments
* fix: fixed a bug with generating the go to page commands
* chore: adding will pages load within the router config
* chore: implementing marks for routes
* fix: auto fixes and checkers
* chore: implemented a route watcher at the root level...
* fix: auto fixes, removing unused code
* chore: timing for syntax highlighting and auto fixes
* fix: didAuth issue and syntax highlighting in the packaged application. Constructor name gets renamed
* fix: fixing typescript checks
* chore: adding mag bar chart icon for telemetry
* 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)
* chore: swapped telemetry icon for stopwatch
* 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: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* chore: writing telemetry to disk
* fix: auto fixers
* chore: getting args parsed for cli flags and writing telemetry file
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* chore: swapped mark for markOnce since we infinitely write marks to a JS array... need to solve this run time marking in another way. We only need this for startup right now
* 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)
* chore: writing raw marks to disk as well
* 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: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: cleaned up the testing names
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Fix fmt and codespell
* 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: 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)
* fix: moving this route loader data stuff
* chore: adding comment
* fix: fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* empty :(
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* empty :(
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Add ts_rs feature to work with indexmap
* Add feature for schemars to work with indexmap
* Add module ID to intern module paths
* Update code to use new source range with three fields
* Update generated files
* Update docs
* Fix wasm
* Fix TS code to use new SourceRange
* Fix TS tests to use new SourceRange and moduleId
* Fix formatting
* Fix to filter errors and source ranges to only show the top-level module
* Fix to reuse module IDs
* Fix to disallow empty path for import
* Revert unneeded Self change
* Rename field to be clearer
* Fix parser tests
* Update snapshots
* Change to not serialize module_id of 0
* Update snapshots after adding default module_id
* Move module_id functions to separate module
* Fix tests for console errors
* Proposal: module ID = 0 gets skipped when serializing tokens too (#4422)
Just like in AST nodes.
Also I think "is_top_level" communicates intention better than is_default
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* File tree acts as VS Code's file tree
* Adjust test for new expectations
* Remove screenshot
* Actually remove this screenshot
* 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)
* fix: fixed logic for selection
* fix: always show the current file
---------
Co-authored-by: 49lf <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* File tree acts as VS Code's file tree
* Adjust test for new expectations
* Remove screenshot
* Actually remove this screenshot
* 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: 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)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add a test that shows current error within `expandPath`
* Make `expandPath` not assume there is an associated sweep artifact
* Look at this (photo)Graph *in the voice of Nickelback*
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: implementing kclsamples in stand alone unit tests
* fix: fmt, lint, and tsc
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: fixed program memory and test file pattern. Don't know how to exclude though?
* fix: trying to fix the exclude logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* fix: bump CI
* fix:typo
* fix: had conflicting filters ope, now fixed
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Demonstrate simulation tests where we don't care about visuals, e.g. the double-map test.
The `just new-sim-test` now accepts an optional argument, `render_to_png` which can be either "true" or "false" (defaults to "true"). Tests like double_map that don't render anything can use false, rather than rendering an empty PNG with nothing in it.
This means the [tests under `no_visuals/`](https://github.com/KittyCAD/modeling-app/tree/v0.26.2/src/wasm-lib/tests/executor/inputs/no_visuals) can be entirely replaced by simulation tests. This is much better! For example, I moved `double_map.kcl` from a no_visuals test to a simulation test. Here's the file:
```
fn increment = (i) => {
return i + 1
}
xs = [0..2]
ys = xs
|> map(%, increment)
|> map(%, increment)
```
Previously the `no_visuals` test just checked that the program ran successfully without panicking. Now the simulation test lets you see the value of `xs` and `ys` and immediately see they're correct. If our map logic changes (for example, we have an off-by-one error and don't apply the `map` to the last element) it'll show up in the program memory snapshot.
* Visualize draft point when near axes (only works on XY rn due to quaternion rotation issue)
* Slightly better quaternion rotation
* Actually snap new profiles to the X and Y axis
* Add snapping behavior while dragging
* Fix flickering on non-XY planes
* Add some fixture additions to support click-and-drag tests
* Add new test to verify snapping behavior
* Make the editor test fixture auto-open and close as needed
* All feedback except absolute lines
* Use `lineTo` for lines that have snapped
* Get other existing tests passing after switching to `lineTo` when snapping
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
* fix auth test in engine
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* emoty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add lsystem.kcl to tests
* Reduce iterations
* Fix the user settings flake shit (NOTE TO ALL FUTURE PEOPLE MODELING-APP DOES NOT WAIT FOR I/O IN SOME CASES BEFORE ROUTER NAVIGATION)
* Fix just lint to check all targets
* Fix yarn test:rust to lint all targets
* Remove redundant options
* Change cargo --all to --workspace
* Update readme to use just command
Create a new tag and push it to the repo. The `semantic-release.sh` script will automatically bump the minor part, which we use the most. For instance going from `v0.27.0` to `v0.28.0`.
```
git branch -D main
git checkout main
git pull origin
./make-release.sh
# Copy within the back ticks and paste the stdout of the change log
git push --set-upstream origin <branch name created from ./make-release.sh>
VERSION=$(./scripts/semantic-release.sh)
git tag $VERSION
git push origin --tags
```
That will create the branch with the updated json files for you:
- run `./make-release.sh` or `./make-release.sh patch` for a patch update;
- run `./make-release.sh minor` for minor; or
- run `./make-release.sh major` for major.
This will trigger the `build-apps` workflow, set the version, build & sign the apps, and generate release files as well as updater-test artifacts.
After it runs you should just need the push the branch and open a PR.
The workflow should be listed right away [in this list](https://github.com/KittyCAD/modeling-app/actions/workflows/build-apps.yml?query=event%3Apush)).
#### 2. Create a Cut Release PR
When you open the PR copy the change log from the output of the `./make-release.sh` script into the description of the PR.
**Important:** Pull request title needs to be prefixed with `Cut release v` to build in release mode and a few other things to test in the best context possible, the intent would be for instance to have `Cut release v1.2.3` for the `v1.2.3` release candidate.
The PR may then serve as a place to discuss the human-readable changelog and extra QA. The `make-release.sh` tool suggests a changelog for you too to be used as PR description, just make sure to delete lines that are not user facing.
#### 3. Manually test artifacts from the Cut Release PR
#### 3. Manually test artifacts
##### Release builds
The release builds can be found under the `out-{platform}` zip, at the very bottom of the `build-publish-apps` summary page for each commit on this branch.
The release builds can be found under the `out-{arch}-{platform}` zip files, at the very bottom of the `build-apps` summary page for the workflow (triggered by the tag in 2.).
Manually test against this [list](https://github.com/KittyCAD/modeling-app/issues/3588) across Windows, MacOS, Linux and posting results as comments in the Cut Release PR.
Manually test against this [list](https://github.com/KittyCAD/modeling-app/issues/3588) across Windows, MacOS, Linux and posting results as comments in the issue.
##### Updater-test builds
The other `build-publish-apps` output in Cut Release PRs is `updater-test-{platform}`. As we don't have a way to test this fully automatically, we have a semi-automated process. For macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
The only difference with these builds is that they point to a different update location on the release bucket, with this dummy v0.255.255 always available. This helps ensuring that the version we release will be able to update to the next one available.
@ -182,18 +174,17 @@ If the prompt doesn't show up, start the app in command line to grab the electro
This will kick the `create-release` action, that creates a _Draft_ release out of this Cut Release PR merge after less than a minute, with the new version as title and Cut Release PR as description.
Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the _Release title_ field as well.
Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_.
#### 5. Publish the release
A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent.
Head over to https://github.com/KittyCAD/modeling-app/releases, the draft release corresponding to the merged Cut Release PR should show up at the top as _Draft_. Click on it, verify the content, and hit _Publish_.
#### 5. Close the issue
#### 6. Profit
A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, which can be found under `release` event filter.
If everything is well and the release is out to the public, the issue tracking the release shall be closed.
## Fuzzing the parser
@ -459,3 +450,9 @@ PS: for the debug panel, the following JSON is useful for snapping the camera
## KCL
For how to contribute to KCL, [see our KCL README](https://github.com/KittyCAD/modeling-app/tree/main/src/wasm-lib/kcl).
### Logging
To display logging (to the terminal or console) set `ZOO_LOG=1`. This will log some warnings and simple performance metrics. To view these in test runs, use `-- --nocapture`.
To enable memory metrics, build with `--features dhat-heap`.
Callers should use floor(), ceil(), or other rounding function first if they care about how numbers with fractional parts are converted. If the number has a fractional part, it's truncated, moving the number towards zero.
If the number is NaN or has a magnitude, either positive or negative, that is too large to fit into the internal integer representation, the result is a runtime error.
DEPRECATED use floor(), ceil(), or round().
```js
int(num:number)->i64
int(num:number)->number
```
### Tags
@ -27,7 +25,7 @@ int(num: number) -> i64
### Returns
`i64`
`number`
### Examples
@ -37,10 +35,10 @@ n = int(ceil(5 / 2))
assertEqual(n,3,0.0001,"5/2 = 2.5, rounded up makes 3")
@ -16,7 +16,7 @@ Data for a circular pattern on a 2D sketch.
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `instances` |[`Uint`](/docs/kcl/types/Uint)| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
| `instances` |`integer`| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
| `center` |`[number, number]`| The center about which to make the pattern. This is a 2D vector. | No |
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
| `rotateDuplicates` |`boolean`| Whether or not to rotate the duplicates as they are copied. | No |
@ -16,7 +16,7 @@ Data for a circular pattern on a 3D model.
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `instances` |[`Uint`](/docs/kcl/types/Uint)| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
| `instances` |`integer`| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
| `axis` |`[number, number, number]`| The axis around which to make the pattern. This is a 3D vector. | No |
| `center` |`[number, number, number]`| The center about which to make the pattern. This is a 3D vector. | No |
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
| `parent` |[`EnvironmentRef`](/docs/kcl/types/EnvironmentRef)| | No |
| `parent` |`integer`| | No |
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.