Skip to content

test: document %{bin} and %{bin-available} behavior lock-kind contexts - #14736

Merged
Alizter merged 1 commit into
ocaml:mainfrom
punchagan:cram-bin-pform-lock-context
May 27, 2026
Merged

Alizter merged 1 commit into
ocaml:mainfrom
punchagan:cram-bin-pform-lock-context

Conversation

@punchagan

@punchagan punchagan commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

This test aims to capture the current behavior when expanding %{bin} and
%{bin-available} pforms in the Lock-kind context. The expansion
currently depends on Pkg_rules.which that currently scans every locked
package's binary index. So, any binary installed by any locked package
is discoverable from any stanza.

But, this dependency also means that expanding these pforms has a
dependency on building all the lockdir packages which is one of the
problems to be fixed in #8652

@Alizter

Alizter commented May 26, 2026

Copy link
Copy Markdown
Collaborator

%{bin:...} is an entirely different mechanism and has been changed as such and tested in #14432. I don't think we need a test for that. The test for %{bin-available:...} however would be good.

@punchagan

Copy link
Copy Markdown
Contributor Author

%{bin:...} is an entirely different mechanism and has been changed as such and tested in #14432. I don't think we need a test for that. The test for %{bin-available:...} however would be good.

Agreed over DMs with Ali that this is still useful to have. Asserting that the PATH changes are as expected would be a useful addition to the tests. I'll work on this, and update the tests.

@punchagan
punchagan force-pushed the cram-bin-pform-lock-context branch from 75e0bfe to 34bdd2c Compare May 27, 2026 10:45
@punchagan
punchagan force-pushed the cram-bin-pform-lock-context branch 2 times, most recently from 9aebb01 to 3eb7b30 Compare May 27, 2026 11:44
@punchagan
punchagan marked this pull request as ready for review May 27, 2026 11:44
@punchagan
punchagan force-pushed the cram-bin-pform-lock-context branch 2 times, most recently from 9c5ce5d to 3d23b96 Compare May 27, 2026 13:56
This test aims to capture the current behavior when expanding %{bin} and
%{bin-available} pforms in the Lock-kind context. The expansion
currently depends on `Pkg_rules.which` that currently scans every locked
package's binary index. So, any binary installed by any locked package
is discoverable from any stanza.

But, this dependency also means that expanding these pforms has a
dependency on building all the lockdir packages which is one of the
problems to be fixed in ocaml#8652

Signed-off-by: Puneeth Chaganti <[email protected]>
@punchagan
punchagan force-pushed the cram-bin-pform-lock-context branch from 3d23b96 to 3cb93e5 Compare May 27, 2026 13:58
@Alizter
Alizter merged commit 4de6ead into ocaml:main May 27, 2026
29 checks passed
@punchagan
punchagan deleted the cram-bin-pform-lock-context branch May 27, 2026 16:17
@Alizter Alizter added this to the 3.25.0 milestone Jul 8, 2026
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.

2 participants