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

Support renderers for args in addMultilineCall #68

Open
simonwelsh opened this issue Nov 28, 2017 · 3 comments
Open

Support renderers for args in addMultilineCall #68

simonwelsh opened this issue Nov 28, 2017 · 3 comments
Milestone

Comments

@simonwelsh
Copy link
Contributor

For our current use of addMultilineCall, it's fairly common to pass literals as arguments, including nested arrays. Would be nice if we could use HackBuilderValues::export() rather than having to do it manually.

@fredemmott
Copy link
Contributor

I'm not sure how to design this in a way that works reasonably well for both all-args-have-same-renderer and different-renderer-per-arg.

It might be best to add a HackBuilderValue type which includes both a T and a IHackBuilderValueRenderer<T>, and take multiple hackbuildervalues

@fredemmott
Copy link
Contributor

This is probably worth looking at v5, which hopefully won't be as long away as v3 => v4 :)

@fredemmott fredemmott added this to the v5 milestone Nov 2, 2018
@lexidor
Copy link
Contributor

lexidor commented May 25, 2023

Waking this issue from its multi year slumber. My instinct says: Why not both?

Keep the current addMultilineCall() around, since requiring a builder for a true literal would be cumbersome. Add a new method which takes on builder and apply it to all arguments.

I am not sure a third version taking builder+value pairs would be much more convenient than using the builders at the call site. There is no need to add this in the same PR, so that may/might be postponed (indefinitely?).

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

No branches or pull requests

3 participants