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

Fix to not send engine commands when only importing functions or constants #5371

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

jtran
Copy link
Collaborator

@jtran jtran commented Feb 13, 2025

Resolves #5180. This also fixes a bug where, if you relied on the undesirable behavior to render a part when importing functions, the imported part would have the wrong units.

When examining the output of this PR, keep in mind that in either mock or isolated mode, we still record outgoing commands. The real difference and fix is the rendered scene image in src/wasm-lib/kcl/tests/import_function_not_sketch/rendered_model.png going from showing a part to being empty because the commands are not actually being sent.

We're no longer building the artifact graph because there are no engine responses. But it's inconsequential to this fix. We'll actually bring much of it back in #5093 because a lot of the artifact graph can be built without engine responses.

Copy link

qa-wolf bot commented Feb 13, 2025

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

vercel bot commented Feb 13, 2025

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

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 13, 2025 2:57am

@jtran jtran force-pushed the jtran/fix-mixed-units branch from 488c2b2 to 589595d Compare February 13, 2025 02:45
@jtran jtran marked this pull request as ready for review February 13, 2025 02:54
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 81.57895% with 7 lines in your changes missing coverage. Please review.

Project coverage is 85.85%. Comparing base (0874891) to head (589595d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/engine/conn.rs 73.07% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5371      +/-   ##
==========================================
- Coverage   85.87%   85.85%   -0.02%     
==========================================
  Files          94       94              
  Lines       34524    34553      +29     
==========================================
+ Hits        29649    29667      +18     
- Misses       4875     4886      +11     
Flag Coverage Δ
wasm-lib 85.85% <81.57%> (-0.02%) ⬇️

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.

@jtran jtran requested a review from nrc February 13, 2025 03:17
@jtran jtran merged commit a572d7b into main Feb 13, 2025
35 of 37 checks passed
@jtran jtran deleted the jtran/fix-mixed-units branch February 13, 2025 03:37
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.

modules might execute some code thats unnecessary when just importing a function
2 participants