fix: reject (package ...) inside named dependency bindings#14499
Merged
Conversation
b2bc18f to
8a19ecd
Compare
8a19ecd to
a50c36b
Compare
`(deps (:name (package foo)))` is silently accepted by the parser but
`%{name}` resolves to an empty path list — the package contributes no
paths to the binding, only env vars (when (package ...) is allowed by
the surrounding code). This is rarely what users intend.
Reject the construct in [named_paths_builder] with a clear error pointing
at the (package ...) location and a hint to move the entry out of the
binding.
Pre-existing behavior; not specific to the install-layout PR but found
while reviewing.
Signed-off-by: Ali Caglayan <alizter@gmail.com>
a50c36b to
09adaf2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(deps (:name (package foo)))is silently accepted by the parser but%{name}resolves to an empty path list. The package contributes no paths to the binding, only env vars (when(package ...)is allowed by the surrounding code). This is rarely what users intend.We now reject the construct in
named_paths_builderwith a clear error pointing at the(package ...)location and a hint to move the entry out of the binding.This was pre-existing behaviour; not specific to the install-layout PR #14373 but found while reviewing.