Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace kittycad crate with kittycad-modeling-cmds #3909

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Sep 18, 2024

lib.rs/kittycad-modeling-cmds is the source of our Modeling API. It gets included in our backend APIs, and those APIs generate OpenAPI specs which are read by openapitor which generates the lib.rs/kittycad crate. So basically, our modeling app is using the generated code instead of the handwritten code.

This sucks -- if you add a new field to the modeling-api crate, you have to merge PRs to the engine, api-deux, and kittycad.rs before finally you can get the new field into the modeling-app. I was pretty embarrased when @mlfarrell asked how to get a new field into the modeling app and had to explain this whole bullshit cycle. Let's fix it.

Switching to use the kittycad-modeling-cmds (aka kcmc) crate directly should speed up our dev cycle.

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Sep 18, 2024 9:33pm

Copy link

qa-wolf bot commented Sep 18, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 87.94872% with 47 lines in your changes missing coverage. Please review.

Project coverage is 87.21%. Comparing base (4a74c60) to head (b39a3a2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/std/import.rs 58.82% 21 Missing ⚠️
src/wasm-lib/kcl/src/engine/mod.rs 78.12% 14 Missing ⚠️
src/wasm-lib/kcl/src/std/fillet.rs 64.00% 9 Missing ⚠️
src/wasm-lib/kcl/src/std/sketch.rs 96.82% 2 Missing ⚠️
src/wasm-lib/kcl/src/std/extrude.rs 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3909      +/-   ##
==========================================
- Coverage   87.25%   87.21%   -0.05%     
==========================================
  Files          69       69              
  Lines       25120    25103      -17     
==========================================
- Hits        21919    21894      -25     
- Misses       3201     3209       +8     
Flag Coverage Δ
wasm-lib 87.21% <87.94%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jtran jtran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

src/wasm-lib/kcl/src/executor.rs Outdated Show resolved Hide resolved
lib.rs/kittycad-modeling-cmds is the source of our Modeling API. It gets included in our backend APIs, and those APIs generate OpenAPI specs which are read by `openapitor` which generates the lib.rs/kittycad crate. So basically, our modeling app is using the _generated code_ instead of the _handwritten code_.

This sucks -- if you add a new field to the modeling-api crate, you have to merge PRs to the engine, api-deux, and kittycad.rs before finally you can get the new field into the modeling-app. I was pretty embarrased when Mike asked how to get a new field into the modeling app and had to explain this whole bullshit cycle. Let's fix it.

Switching to use the kittycad-modeling-cmds (aka kcmc) crate directly should speed up our dev cycle.
@adamchalmers adamchalmers merged commit 5cc92f0 into main Sep 18, 2024
28 of 30 checks passed
@adamchalmers adamchalmers deleted the achalmers/use-modeling-api branch September 18, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants