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

[Feature request] Have a way to handle subpaths in archives #4185

Open
kit-ty-kate opened this issue May 6, 2020 · 3 comments
Open

[Feature request] Have a way to handle subpaths in archives #4185

kit-ty-kate opened this issue May 6, 2020 · 3 comments
Assignees

Comments

@kit-ty-kate
Copy link
Member

When users have their OCaml binding or project in a sub directory in their source repository there might be a disparity between the opam file they have in the source repository and the opam file they have to submit to opam-repository.
For instance, with the following source tree that mono-repo bindings can adopt:

.
├── ocaml
│   ├── lib
│   │   ├── pkg.install
│   │   ├── pkg.ml
│   │   ├── pkg.mli
│   │   ├── pkg.opam
│   │   ├── dune
│   │   ├── dune-project
[...]

The install file is located in a subdirectory and won't be picked up by opam. From opam-repository point of view a copy of the install file to the top-level directory is required. However from opam pin point of view there is no easy way of using the same opam file as for instance opam pin add --recursive . would enter the ocaml/lib directory and not stay in the top-level directory for the file copy needed by opam-repository (cp ocaml/lib/pkg.install .) to succeed.

This issue could be addressed in several ways. For instance:

Both of these have their force and weaknesses.

Issue encountered in ocaml/opam-repository#16361

@dra27
Copy link
Member

dra27 commented May 7, 2020

See also #3880

@dra27
Copy link
Member

dra27 commented Jul 8, 2021

@rjbou - is this worth looking at as part of the enabling of subpath-pinning in 2.2.0? If not, we can put it back to the Feature Wish project!

@rjbou
Copy link
Collaborator

rjbou commented Jul 20, 2021

In fact, everything is here (need to review subpath pinning code) to be able to support it. Main target here is opam repository, it needs to allow opam files with subpath field.

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

No branches or pull requests

3 participants