Skip to content
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

opam depext integration #3790

Closed
rjbou opened this issue Mar 20, 2019 · 8 comments · Fixed by #3975
Closed

opam depext integration #3790

rjbou opened this issue Mar 20, 2019 · 8 comments · Fixed by #3975

Comments

@rjbou
Copy link
Collaborator

rjbou commented Mar 20, 2019

This issue concerns ongoing work of opam-depext intergation into opam itself: as a built-in command and as an install option. see #3975 (comment) for more details

Until the corresponding PR is merged, new depext issues should be expressed in this issue.

@dra27
Copy link
Member

dra27 commented Jun 28, 2019

@samoht notes that neither opam install --deps . --depext nor opam depext . allow installing local depext packages.

@talex5 observes opam install . --show-actions --deps-only -t | awk '/- install/{print $3}' | xargs opam depext -iy is a workaround.

@avsm notes this should be addressed in the depext merge 🙂

@talex5
Copy link
Contributor

talex5 commented Oct 10, 2019

In ocurrent/ocaml-ci#21, @kit-ty-kate notes that this is a better work-around: opam install . --dry-run --deps-only -ty | awk '/-> installed/{print $3}' | xargs opam depext -iy"

@rjbou
Copy link
Collaborator Author

rjbou commented Oct 10, 2019

oups, forgot to add a link to this issue. opam depext integration pr is open.

@MisterDA
Copy link
Contributor

I have a problem with the current plugin (have not tested the PR). Sorry if it’s not the right place to report.

I have build OCaml 4.10 and Opam master in Cygwin with MSVC. The build of opam-depext (opam install -y opam-depext) fails because at lines shell/build.sh#74 and shell/build.sh#78 the function print_endline is used, which in this case outputs the dreaded \r\n.
When the build script is executed, it fails with:

sh -ex shell/build.sh
+ ocamlc -I src_ext/lib unix.cma cmdliner.cma -o opam-depext $'depext.ml\r'
don't know what to do with depext.ml
Usage: ocamlc <options> <files>

I’m going to patch shell/build.ml with print_string and \n for now.

Note that even if using ocaml-depext with Cygwin could be tricky (although there’s fdopen/depext-cygwinports) a slightly more modern alternative to Cygwin called MSYS2 uses Arch Linux' pacman package manager which, if I’m not mistaken, is already supported by ocaml-depext. So, there may exist users of ocaml-depext on systems using \r\n as end-of-line.

@rjbou rjbou linked a pull request May 22, 2020 that will close this issue
@rjbou
Copy link
Collaborator Author

rjbou commented May 22, 2020

PR merged and feature published. Feel free to open other issues when you tests!
Thanks!

@rjbou rjbou closed this as completed May 22, 2020
@rjbou rjbou modified the milestones: 2.2.0~alpha, 2.1.0~alpha May 22, 2020
@gasche
Copy link
Member

gasche commented Jan 22, 2021

I arrived at this issue after trying to find out how to install all external dependencies of the dependencies of the current package in a CI script. Above @talex5 and @kit-ty-kate provide the following command (thanks!):

opam install . --dry-run --deps-only -ty | awk '/-> installed/{print $3}' | xargs opam depext -iy

Questions:

  • do we have some idea of when the opam-with-depext-integration is planned to be released?
  • what will be the equivalent of this magical command in this world? Will opam install . --deps-only just work (invoke the package-manager with depexts first, and install ocaml packages second), or should we expect to pass a depext-specific argument?

@dra27
Copy link
Member

dra27 commented Jan 22, 2021

It's in opam 2.1 which we're in the process of moving from beta to release candidate.

In opam 2.1, you won't want to add anything except that you want to answer the package managers requests with yes automatically, so set OPAMDEPEXTYES to 1 (see example in https://github.com/ocurrent/opam-repo-ci/blob/911ea5ba73592c7028f5fa3e87d7b20b3ff5c119/lib/opam_build.ml#L46)

@bobot
Copy link
Contributor

bobot commented May 26, 2021

Just to note that the magical command doesn't handles the pin-depends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants