Skip to content

Comments

Accept idents as KW args#6644

Merged
nrc merged 1 commit intomainfrom
nrc-input-arg
May 14, 2025
Merged

Accept idents as KW args#6644
nrc merged 1 commit intomainfrom
nrc-input-arg

Conversation

@nrc
Copy link
Contributor

@nrc nrc commented May 2, 2025

The ident/KW arg shorthand

@nrc nrc requested a review from adamchalmers May 2, 2025 00:00
@qa-wolf
Copy link

qa-wolf bot commented May 2, 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 2, 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 14, 2025 7:01pm

@nrc
Copy link
Contributor Author

nrc commented May 2, 2025

Hmm, given all the test failures I might wait until more of the migration to KWArgs functions happens and then try and land this.

@codspeed-hq
Copy link

codspeed-hq bot commented May 4, 2025

CodSpeed Instrumentation Performance Report

Merging #6644 will not alter performance

Comparing nrc-input-arg (2935002) with main (696222a)

Summary

✅ 70 untouched benchmarks

@adamchalmers
Copy link
Contributor

adamchalmers commented May 5, 2025

Should this work? Because it's not:

fn foo(@x, y) { return x + y }

y = 3
z = 4 |> foo(y)

assert(z, isEqualTo = 7)
Screenshot 2025-05-04 at 9 09 42 PM

@jtran
Copy link
Contributor

jtran commented May 8, 2025

Can we split out the new abbreviated syntax into a separate PR so that we can get the bug fix merged?

@nrc nrc marked this pull request as draft May 8, 2025 21:44
@nrc
Copy link
Contributor Author

nrc commented May 8, 2025

Can we split out the new abbreviated syntax into a separate PR so that we can get the bug fix merged?

Done in #6787

@nrc nrc force-pushed the nrc-input-arg branch from 7f62a8b to 3460df7 Compare May 13, 2025 03:16
@nrc nrc marked this pull request as ready for review May 13, 2025 03:16
@nrc nrc changed the title Accept idents as KW args, fixup pipe as input for KW calls Accept idents as KW args May 13, 2025
@nrc
Copy link
Contributor Author

nrc commented May 13, 2025

Should this work? Because it's not:

fn foo(@x, y) { return x + y }

y = 3
z = 4 |> foo(y)

assert(z, isEqualTo = 7)
Screenshot 2025-05-04 at 9 09 42 PM

This works now, there's a unit test doing essentially this with extrude.

Signed-off-by: Nick Cameron <nrc@ncameron.org>
@nrc nrc force-pushed the nrc-input-arg branch from d081873 to 2935002 Compare May 14, 2025 18:48
@nrc nrc merged commit ce566fb into main May 14, 2025
72 checks passed
@nrc nrc deleted the nrc-input-arg branch May 14, 2025 19:42
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.

3 participants