Skip to content

Avoid referring to ez-conf-lib:exe #27759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gridbugs
Copy link
Contributor

The ez-conf-lib:exe variable is set in ez-conf-lib.config generated while building the ez-conf-lib package, and is set to the absolute path to the ez-conf-lib script. This causes a problem if the opam switch where ez-conf-lib is installed to is ever moved, as the absolute path will no longer refer to the correct place. This also creates problems for dune package management which moves all installed artifacts of a package after running its install command.

The fix is to refer to the ez-conf-lib script directly by specifying its path relative to the lib directory where it is installed.

This is intended to fix ocaml/dune#11598 (that issue is closed because we implemented a hacky workaround in dune's overlay repo).

CC @nberth who authored these packgaes.

The `ez-conf-lib:exe` variable is set in `ez-conf-lib.config` generated
while building the `ez-conf-lib` package, and is set to the absolute
path to the `ez-conf-lib` script. This causes a problem if the opam
switch where `ez-conf-lib` is installed to is ever moved, as the
absolute path will no longer refer to the correct place. This also
creates problems for dune package management which moves all installed
artifacts of a package after running its install command.

The fix is to refer to the `ez-conf-lib` script directly by specifying
its path relative to the `lib` directory where it is installed.

Signed-off-by: Stephen Sherratt <[email protected]>
gridbugs added a commit to gridbugs/ez-conf-lib that referenced this pull request Apr 15, 2025
This package used to provide a variable `exe` containing the absolute
path to the `ez-conf-lib` script inside the current opam switch. The
problem with using an absolute path here is it means the switch is not
portable. This causes problems for dune packag emanagement where all
packages are first installed to a temporary sandbox and then moved to a
final location afterwards.

Clients of ez-conf-lib are updated to refer to the script without using
the exe variable in: ocaml/opam-repository#27759

Signed-off-by: Stephen Sherratt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packages depending on ez-conf-lib can't find the ez-conf-lib script
2 participants