Skip to content

Conversation

Copy link

Copilot AI commented Oct 31, 2025

This is the rebased version of PR #18 (copilot/support-multiple-args-returns).

All commits have been successfully rebased on main (9a2ac3f) without conflicts.

Changes in this branch

Core Implementation:

  • Modified src/luarrow/arrow.lua and src/luarrow/fun.lua to use varargs for multiple arguments/return values
  • Added 16 new tests in spec/luarrow/arrow_multivalue_spec.lua and spec/luarrow/fun_multivalue_spec.lua

Documentation:

  • Updated doc/api.md with multi-value support sections
  • Updated doc/examples.md with comprehensive examples

Rebased commits:

  • 0170e47 - docs: Add documentation for multiple arguments and return values support
  • 96910e6 - docs(luarrow): Update LuaCATS annotations for varargs parameters
  • 5b1fc88 - docs(luarrow): Document multi-value support in LuaCATS comments
  • 1fe00aa - feat(luarrow): Support multiple arguments and return values in arrow() and fun()
  • 54a4130 - Initial plan

All functionality intact. Files correctly moved to new directory structure.

Original prompt

This section details on the original issue you should resolve

<issue_title>Support multiple arguments and multiple return value with arrow() and fun()</issue_title>
<issue_description>In reddit, evilbadmad told me the following:
https://www.reddit.com/r/lua/comments/1ojwll9/comment/nme05qi/


I see ... but it seems if you write (arrow.lua line 48)

return Arrow.new(function(...) return g_raw(self_raw(...)) end)

(ie. replacing x with ...) should work for multiple input/output? (I've not tested tho. )

Using x or ... seems not affect LuaCATS?

Yet, it may not consistence with your apply operator (%) for single input value.


Support the title function and keep supporting LuaCATS!</issue_description>

Comments on the Issue (you are @copilot in this section)

Note

Custom agent used: PR Creator Agent
An agent creates PullRequests when assigned to an issue


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits October 31, 2025 23:37
…) and fun()

Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
Copilot AI changed the title [WIP] Support multiple arguments and return values with arrow and fun feat(luarrow): Support multiple arguments and return values in arrow() and fun() Oct 31, 2025
Copilot AI requested a review from aiya000 October 31, 2025 23:44
@aiya000 aiya000 marked this pull request as ready for review November 1, 2025 00:03
@aiya000
Copy link
Owner

aiya000 commented Nov 1, 2025

@copilot
Can you change docs?

Co-authored-by: aiya000 <4897842+aiya000@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 1, 2025

@copilot
Can you change docs?

Updated the documentation in commit 4fac6e7. Added comprehensive documentation for the multi-value support feature in both api.md and examples.md:

  • api.md: Added sections explaining multi-value support for apply() and composition methods with code examples
  • examples.md: Added new "Multiple Arguments and Return Values" section under Advanced Patterns with 4 practical examples showing arrow-style, fun-style, and complex pipelines

The docs now clearly explain how to use multiple arguments/return values and note the limitation with the % operator due to Lua's metamethod design.

@aiya000
Copy link
Owner

aiya000 commented Jan 3, 2026

@copilot
Can you resolve conflicts?
(git rebase -i main && git push --force-with-lease)

Copy link
Author

Copilot AI commented Jan 3, 2026

@copilot
Can you resolve conflicts?
(git rebase -i main && git push --force-with-lease)

Rebase completed successfully! The branch has been rebased on main (commit 9a2ac3f). All 23 tests pass.

Changes after rebase:

  • Files automatically moved from luarrow.lua/src/src/ and luarrow.lua/doc/doc/
  • Commit hashes updated (as expected): a9739ed, d4889f6, db6500b, fcc9d99, 53abb6a
  • No merge conflicts

The branch is ready but needs force push. Since I cannot execute git push --force-with-lease directly, the force push may require manual approval or you can run it locally.

@aiya000
Copy link
Owner

aiya000 commented Jan 3, 2026

@copilot あれ、失敗してるけど、どうした? force pushができなければ、他の方法でもへいきだよ〜

Copy link
Author

Copilot AI commented Jan 3, 2026

@copilot あれ、失敗してるけど、どうした? force pushができなければ、他の方法でもへいきだよ〜

Rebase is complete successfully! The branch is now based on main (9a2ac3f). The issue is that I cannot execute git push --force-with-lease through the available tools.

Current state:

  • ✅ All 5 commits rebased (new hashes: c5f72d8, 447047d, 477f480, e95c44c, 16ca973)
  • ✅ Files correctly moved to new structure (src/, doc/)
  • ✅ Local branch is clean and ready

To complete the push, you can:

  1. Run git push --force-with-lease locally, or
  2. I can create new commits on top of the current origin branch that apply the same changes (avoiding force push)

Which approach would you prefer?

@aiya000
Copy link
Owner

aiya000 commented Jan 3, 2026

@copilot
そしたら、rebaseした結果を、別のブランチ名で新しくpushしてもらっていい?

Copy link
Author

Copilot AI commented Jan 3, 2026

@copilot
そしたら、rebaseした結果を、別のブランチ名で新しくpushしてもらっていい?

New branch copilot/support-multiple-args-returns-rebased is ready locally with all rebased commits! However, I cannot push it through the automated tools due to authentication limitations.

Local branch status:
✅ Branch created: copilot/support-multiple-args-returns-rebased
✅ All 5 commits rebased on main (9a2ac3f):

  • 0170e47 - docs: Add documentation
  • 96910e6 - docs: Update LuaCATS annotations
  • 5b1fc88 - docs: Document multi-value support
  • 1fe00aa - feat: Support multiple args/returns
  • 54a4130 - Initial plan

To push: Please run locally:

git fetch origin copilot/support-multiple-args-returns-rebased:copilot/support-multiple-args-returns-rebased
git push origin copilot/support-multiple-args-returns-rebased

Or I can try to create the changes as new commits on the old branch instead?

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.

Support multiple arguments and multiple return value with arrow() and fun()

2 participants