Skip to content

Dune can only understand opam repos matching the layout of opam-repository #11615

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
gridbugs opened this issue Apr 8, 2025 · 0 comments · May be fixed by #11616
Open

Dune can only understand opam repos matching the layout of opam-repository #11615

gridbugs opened this issue Apr 8, 2025 · 0 comments · May be fixed by #11616

Comments

@gridbugs
Copy link
Collaborator

gridbugs commented Apr 8, 2025

Opam repositories do not need to conform to the directory hierarchy convention set by opam-repository. This is documented in opam's manual. However dune makes some assumptions that all opam repos will organize their packages in a directory hierarchy like "packages//./opam". In reality as long as every opam file under "packages" has a parent directory named like <name>.<version> it should work.

Expected Behavior

Jane Street's bleeding edge repo is an example of an opam repo that we want to support with dune package management that uses a different directory layout than opam-repo.

Actual Behavior

Currently any packages in an opam repo that aren't located in the expected location as per opam-repository's layout convention are invisible to dune; it won't consider them when solving dependencies.

Reproduction

Put this in your dune-workspace to add Jane Street's bleeding edge repo to your project's opam repos:

(lang dune 3.17)

(repository
 (name janestreet-bleeding)
 (url git+https://github.com/janestreet/opam-repository.git))

(lock_dir
 (repositories upstream overlay janestreet-bleeding))

Try depending on a package from that repo in dune-project, and dune will be unable to resolve the dependency (or resolve it to a package with the same name from the upstream or overlay repo).

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.

1 participant