Skip to content

Remove CallExpression support#6639

Merged
adamchalmers merged 32 commits intomainfrom
achalmers/rm-callexpression
May 2, 2025
Merged

Remove CallExpression support#6639
adamchalmers merged 32 commits intomainfrom
achalmers/rm-callexpression

Conversation

@adamchalmers
Copy link
Contributor

@adamchalmers adamchalmers commented May 1, 2025

Users MUST use keyword call syntax now.

Closes #4600

In moreNodePathFromSourceRange, the `args` property may not be
present if it's empty. So we should check args && before checking if
args.length > 0.
It was looking for references to tags by finding kwarg labeled `tag=`.
But that's used for DECLARING tags, not for REFERENCING them.

Instead, it shouldn't really look at the kwarg labels at all. It should
just find tag declarations and references by their type.

This has a problem, in that if you assign a tag to an identifier, it
won't find them.

So... I guess... don't do that??? good enough for now.
It was identifying `x = b` (tag ref) as its target instead of `tag = $a`
(tag decl)
@qa-wolf
Copy link

qa-wolf bot commented May 1, 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!

@vercel
Copy link

vercel bot commented May 1, 2025

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

Name Status Preview Comments Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2025 8:50pm

To get started again run

`nr test -- -t "testing source range to artifact startSketch on for a end cap that is also sketch on face on face" src/lib/selections.test.ts`
@adamchalmers adamchalmers marked this pull request as ready for review May 2, 2025 17:04
@codspeed-hq
Copy link

codspeed-hq bot commented May 2, 2025

CodSpeed Instrumentation Performance Report

Merging #6639 will degrade performances by 40.02%

Comparing achalmers/rm-callexpression (160a2d7) with main (86a83ca)

Summary

⚡ 37 improvements
❌ 5 regressions
✅ 12 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
parse_axial-fan 389.2 µs 350.4 µs +11.06%
parse_ball-bearing 26.3 ms 22 ms +19.5%
parse_bench 70 ms 36.2 ms +93.5%
parse_bottle 6.8 ms 5.1 ms +34.62%
parse_car-wheel-assembly 2.3 ms 1.9 ms +20.34%
parse_color-cube 21.8 ms 15.8 ms +38.51%
parse_cycloidal-gear 20.1 ms 33.5 ms -40.02%
parse_dodecahedron 30.8 ms 27.6 ms +11.69%
parse_exhaust-manifold 56.7 ms 51 ms +11.15%
parse_flange 9.9 ms 7.2 ms +37.6%
parse_focusrite-scarlett-mounting-bracket 47.5 ms 42.4 ms +11.98%
parse_food-service-spatula 83.8 ms 109 ms -23.17%
parse_french-press 69.7 ms 62.2 ms +12.1%
parse_gear-rack 15.2 ms 12.3 ms +24.44%
parse_gear 50.6 ms 75.8 ms -33.32%
parse_gridfinity-baseplate-magnets 197.3 ms 159.9 ms +23.38%
parse_gridfinity-baseplate 153.4 ms 113.1 ms +35.63%
parse_gridfinity-bins-stacking-lip 237.4 ms 189.3 ms +25.44%
parse_gridfinity-bins 180 ms 139.8 ms +28.74%
parse_hex-nut 8.7 ms 6.9 ms +26.37%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@adamchalmers adamchalmers force-pushed the achalmers/rm-callexpression branch from ee59616 to 160a2d7 Compare May 2, 2025 20:38
@adamchalmers adamchalmers merged commit 4fe8741 into main May 2, 2025
67 of 69 checks passed
@adamchalmers adamchalmers deleted the achalmers/rm-callexpression branch May 2, 2025 21:08
adamchalmers added a commit that referenced this pull request May 21, 2025
This has been enforced by the parser since #6639, so there's no need for `keywords = true` in every stdlib function anymore.
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.

KCL functions should use keyword args not positional args

2 participants