ocaml / ocaml/dune

Promote (public_name <package>.<subpackage>) as an alternative to creating a new <package>.opam file

Open
#8,550 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

opam-repository regularly receives PRs where a number of packages have the exact name dependencies (modulo dependencies between them) and I feel like in most cases adding more packages to the opam namespace is not required (e.g. the tezos-* and octez-* packages).

Currently, dune's error messages only invite people to create <package>.opam files and never mention the possibility of subpackages anywhere. For example:

I feel like mentioning subpackages first in those error messages would be really helpful for users (less generated opam files with duplicated informations and packages to deal with when publishing) and opam-repository maintainers (less packages to maintain and review and CI would be less broken all the time)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the two error-message locations in src/dune_rules/stanza_common.ml, especially the referenced lines around 32 and 63. Update the messages so subpackages are presented before creating a .opam file; done means both messages mention the subpackage alternative clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.