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 for common stanzas #513

Closed
Nexmean opened this issue May 31, 2022 · 3 comments
Closed

Support for common stanzas #513

Nexmean opened this issue May 31, 2022 · 3 comments

Comments

@Nexmean
Copy link

Nexmean commented May 31, 2022

Cabal has feature called common stanzas. It described here: https://vrom911.github.io/blog/common-stanzas. Can we add support for this feature to hpack?

@tfausak
Copy link
Collaborator

tfausak commented May 31, 2022

hpack already supports this: https://github.com/sol/hpack/blob/f03825c/README.md#not-repeating-yourself

The blog post you shared discusses this as well: https://vrom911.github.io/blog/common-stanzas#hpack

@Nexmean Nexmean closed this as completed May 31, 2022
@brandonchinn178
Copy link

It would be nice to get first class support for this. For example, if I want to define a common stanza that adds foo to dependencies, I can't do it today because:

  1. Using <<: *add-foo will add a dependencies key, but itll get overridden when defining dependencies a second time in the same block
  2. YAML doesnt support concatenating lists, so I cant do something like
dependencies:
    <<: *add-foo
    - base

@ramirez7
Copy link

ramirez7 commented Oct 2, 2023

FYI I've created a new issue for this here #569 instead of necro-posting on this issue 😁

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

4 participants