Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Support renderers for args in addMultilineCall #68

Description

@simonwelsh

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.

Activity

  1. fredemmott commented on Nov 1, 2018

    @fredemmott
    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

  2. fredemmott commented on Nov 1, 2018

    @fredemmott
    Contributor

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

  3. added this to the v5 milestone on Nov 2, 2018
  4. lexidor commented on May 25, 2023

    @lexidor
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions