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

KCL: Change core sketch functions to use keyword args #4826

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Dec 17, 2024

Changes to KCL stdlib:

  • line(point, sketch, tag) and lineTo(point, sketch, tag) are combined into line(@sketch, end?, endAbsolute?, tag?)
  • close(sketch, tag?) is now close(@sketch, tag?)
  • extrude(length, sketch) is now extrude(@sketch, length)
  • Update all the docs everywhere

Incidental changes:

  • The tests generated from each KCL stdlib call (via the #[stdlib] proc-macro in derive-docs) now use docs.rs/miette to show a beautiful error.

Here's a before:
Screenshot 2024-12-17 at 9 11 05 AM

And here's after:

Screenshot 2024-12-17 at 9 09 53 AM

@adamchalmers adamchalmers requested review from jtran and nrc December 17, 2024 01:44
Copy link

qa-wolf bot commented Dec 17, 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

vercel bot commented Dec 17, 2024

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

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Dec 18, 2024 3:43am

@jtran
Copy link
Collaborator

jtran commented Dec 17, 2024

I skimmed this and it looks great so far.

Does it maintain backward compatibility? If not, the UI needs to generate the new code.

@adamchalmers
Copy link
Collaborator Author

I skimmed this and it looks great so far.

Does it maintain backward compatibility? If not, the UI needs to generate the new code.

It doesn't, you're right, I need to update frontend.

@adamchalmers adamchalmers force-pushed the achalmers/kw-fn-sketches branch from 0a0826d to 163ffea Compare December 18, 2024 03:12
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