Skip to content

Conversation

@kit-ty-kate
Copy link
Contributor

As an opam user i would like to do opam pin add https://github.com/rossberg/camp.git to install your project, however currently this doesn't work because your project doesn't contain any standard opam file.

  • The first commit adds an opam file based on the already present description that you've added in the dune-project
  • The second commit is optional, but i personally don't think duplicating the packaging information in the dune-project makes any sense past the first generation. But this can be a matter of taste and if you disagree feel free to remove that commit, i really don't mind.

@rossberg
Copy link
Owner

rossberg commented Jan 6, 2026

[Sorry for the delay, vacation time.]

This looks okay to me in principle, but admittedly I'm somewhat allergic to directory pollution, so I wonder if there is any way to achieve the same without adding yet another boilerplate file? I would love if it could just be generated from the project file? (Pardon my ignorance, I have never used opam pin myself, and have no clue what its use case would be for something that's not a library package.)

@lindig
Copy link

lindig commented Jan 7, 2026

It would be better to add (generate_opam_files true) to the dune-project, let it generate the opam file and to commit it into the repository. All information required for the opam file can be specified in dune-project. As for not having the opam file on the top level - I think that would be incompatible with being able to use opam pin.

@rossberg
Copy link
Owner

rossberg commented Jan 7, 2026

@lindig, I see. The redundancy of two manifests is unfortunate. But if the .opam file is generated from the dune project file, then they even contain redundant information, so I think the PR is actually preferable as is. (That said, I won't stop hoping that opam and dune will one day be unified into one coherent tool that I'll actually be able to understand... :) )

@rossberg rossberg merged commit 335ca61 into rossberg:master Jan 7, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

3 participants