Skip to content

refactor(pkg): use dune_section in pkg_rules#14209

Closed
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-rmuovvsmyptx
Closed

refactor(pkg): use dune_section in pkg_rules#14209
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-rmuovvsmyptx

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented Apr 17, 2026

In #14200 I would like to introduce the %{pkg:foo:lib} pfrom more generally outside of package management. In order to do so, it will make sharing both pforms expansions easier if the install section type used is the same.

This change will share the underlying type, whilst preserving the restrictions on "defined" vs "undefined" variables for package management.

For example with both %{pkg-self:...} and %{pkg:foo:...} we don't currently allow for misc, lib_root, libexec_root or share_root. This behaviour is preserved by this change.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@rgrinberg
Copy link
Copy Markdown
Member

If a package section and an opam section aren't available in the same context, why are we making them the same type? Is it just to save a bit of code?

@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented Apr 17, 2026

Yes. I suppose the benefit might be easier to motivate (if at all) after #14200.

@Alizter Alizter closed this Apr 17, 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