Skip to content

jbuilder subst -p name leads to an error #1360

@hannesm

Description

@hannesm

when I execute the following command: opam pin add charrua-core --dev (using opam2, jbuilder.transition, dune.1.3.0 here), I get the following error:

#=== ERROR while compiling charrua-core.0.10 ==================================#
# context     2.0.0 | freebsd/x86_64 | ocaml-base-compiler.4.06.1 | pinned(git+file:///usr/home/hannes/devel/mirage/charrua-core#HEAD#83d7c15c)
# path        /usr/home/hannes/.opam/4.06.1/.opam-switch/build/charrua-core.0.10
# command     /usr/home/hannes/.opam/4.06.1/bin/jbuilder subst -p charrua-core
# exit-code   1
# env-file    /usr/home/hannes/.opam/log/charrua-core-88899-60459a.env
# output-file /usr/home/hannes/.opam/log/charrua-core-88899-60459a.out
### output ###
# Error: cannot determine name automatically.
# You must pass a [--name] command line argument.

from the opam file in question:

build: [
  ["jbuilder" "subst" "-p" name] {pinned}
  ["jbuilder" "build" "-p" name "-j" jobs]
  ["jbuilder" "runtest" "-p" name "-j" jobs] {with-test}
]

IIRC #954 was the reason to add "-p" name to a wide range of opam packages, and #960 adjusted subst behaviour. from what I can tell, one solution is to move the package to dune (but that won't fix the opam files in opam-repository).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions