Skip to content

fix: reject (package ...) inside named dependency bindings#14499

Merged
Alizter merged 1 commit into
ocaml:mainfrom
Alizter:push-srruutnqsowu
May 22, 2026
Merged

fix: reject (package ...) inside named dependency bindings#14499
Alizter merged 1 commit into
ocaml:mainfrom
Alizter:push-srruutnqsowu

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented May 12, 2026

(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_builder with 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.

@Alizter Alizter force-pushed the push-srruutnqsowu branch from b2bc18f to 8a19ecd Compare May 13, 2026 00:28
@Alizter Alizter force-pushed the push-srruutnqsowu branch from 8a19ecd to a50c36b Compare May 21, 2026 23:58
@Alizter Alizter marked this pull request as ready for review May 22, 2026 00:39
@Alizter Alizter requested a review from rgrinberg May 22, 2026 00:40
`(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>
@Alizter Alizter force-pushed the push-srruutnqsowu branch from a50c36b to 09adaf2 Compare May 22, 2026 00:45
@Alizter Alizter merged commit 2284ebd into ocaml:main May 22, 2026
31 checks passed
@Alizter Alizter deleted the push-srruutnqsowu branch May 22, 2026 22:07
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

Successfully merging this pull request may close these issues.

1 participant