new DSL form container :nested => <inner> #6120
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: tests will probably not pass until #6118 is merged, and may conflict with that PR.
Like #6068, this is a new form intended for inclusion in DSL 1.0, but which was
overlooked during planning in #4688.
As with #6068, implementing
container :nested
now means we would not have thebenefit of the forward-compatibility transition code. However,
nested_container
isonly used in 38 Casks in the main repo, so that is unlikely to cause a problem in practice.
The gain is consolidating two stanzas:
container_type
andnested_container
are bothhandled by
container
. For a first-time Cask author, that seems more logical and regular.We do lose the extensibility of
nested_container
, since:nested
can only take a singlevalue. However, it is unlikely that extensibility is needed, and there are workarounds.