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

Dependency Generation Does Not Include Executables? #36

Open
zepalmer opened this issue May 23, 2017 · 0 comments
Open

Dependency Generation Does Not Include Executables? #36

zepalmer opened this issue May 23, 2017 · 0 comments

Comments

@zepalmer
Copy link

zepalmer commented May 23, 2017

It seems that, if a BuildDepends entry appears in an Executable but not in a Library, it is not included in the opam file. For instance, my project includes a single library with the following BuildDepends:

  BuildDepends:
    batteries,
    monadlib,
    ocaml-monadic,
    ppx_deriving.std (>= 2.0),
    yojson

It has a single executable with this BuildDepends:

  BuildDepends:
    batteries,
    jhupllib,
    oUnit,
    ppx_deriving.std (>= 2.0),
    ppx_deriving_yojson

The resulting opam file contains this depends entry:

depends: [
  "base-threads"
  "batteries"
  "monadlib"
  "oasis" {build & >= "0.4.7"}
  "ocaml-monadic"
  "ocamlbuild" {build}
  "ocamlfind" {build}
  "ounit" {build}
  "ppx_deriving" {>= "2.0"}
  "yojson"
]

As a result, the OPAM package fails to install unless the user has already manually installed ppx_deriving_yojson. Am I misunderstanding the function of these fields? Is this an oversight?

The above project can be found here. Steps to reproduce:

mkdir -p ztemp
cd ztemp
export OPAMROOT="$(pwd)/opam"
mkdir -p $OPAMROOT
opam init
eval `opam config env`
git clone https://github.com/JHU-PL-Lab/jhu-pl-lib.git
cd jhu-pl-lib
git checkout c901c56ea93640e5aaa0232e6b05000e5f87120b
opam pin add jhupllib .

The last command will fail with an error message something like this:

#=== ERROR while installing jhupllib.0.1+dev ==================================#
# opam-version 1.2.2
# os           linux
# command      ocaml setup.ml -configure --prefix /home/zpalmer/ztemp/opam/4.04.1
# path         /home/zpalmer/ztemp/opam/4.04.1/build/jhupllib.0.1+dev
# compiler     4.04.1
# exit-code    1
# env-file     /home/zpalmer/ztemp/opam/4.04.1/build/jhupllib.0.1+dev/jhupllib-4107-aaa640.env
# stdout-file  /home/zpalmer/ztemp/opam/4.04.1/build/jhupllib.0.1+dev/jhupllib-4107-aaa640.out
# stderr-file  /home/zpalmer/ztemp/opam/4.04.1/build/jhupllib.0.1+dev/jhupllib-4107-aaa640.err
### stderr ###
# ocamlfind: Package `ppx_deriving_yojson' not found

Please let me know if I can provide additional information. Thank you for the tool!

@Chris00 Chris00 self-assigned this May 28, 2017
@Chris00 Chris00 removed their assignment Nov 12, 2017
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

No branches or pull requests

2 participants