Monorepo management for opam overlays
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

monopam: trim opam-repository speculation from comments

The lint and root.ml comments claimed dev-repo: ends up in
opam-repository to direct users at the canonical home. monopam
push routes via sources.toml, not via the .opam dev-repo field,
so that justification is more aspirational than concrete.

Keep the rule (dune-project (source ...) must match
sources.toml's upstream when set) and drop the over-claimed
rationale.

+9 -11
+3 -5
lib/lint.ml
··· 455 455 | Some e -> Option.map normalise_url e.upstream 456 456 | None -> None 457 457 in 458 - (* When sources.toml declares an [upstream] for the subtree, the canonical 459 - home is upstream and dune-project's (source ...) must match it: the 460 - generated dev-repo: ends up published in opam-repository, where it 461 - points users (and tooling) at upstream rather than the in-monorepo 462 - fork. Otherwise the default-origin URL is the expected one. *) 458 + (* When sources.toml declares an [upstream] for the subtree, the 459 + dune-project (source ...) must match it. Otherwise the default-origin 460 + URL is the expected one. *) 463 461 let expected = 464 462 match upstream with Some _ -> upstream | None -> source 465 463 in
+6 -6
lib/root.ml
··· 393 393 394 394 let collect_external_deps ~fs ~monorepo = 395 395 (* Iterate the actual subtree directories on disk rather than deriving them 396 - from each package's dev-repo URL via [Package.repo_name]. For a fork, the 397 - dev-repo: field intentionally points at upstream (so opam-repository 398 - directs users at the canonical home), which means the URL basename does 399 - not match the in-monorepo subtree directory. Walking [subtree_dirs] 400 - keeps the dep collection and the internal-package exclusion set aligned 401 - with the real layout. *) 396 + from each package's dev-repo URL via [Package.repo_name]. For forks, the 397 + dune-project [(source ...)] points at upstream (matching the upstream 398 + entry in [sources.toml]) so [Package.repo_name] returns the upstream 399 + basename, not the in-monorepo subtree. Walking [subtree_dirs] keeps the 400 + dep collection and the internal-package exclusion set aligned with the 401 + real layout. *) 402 402 let scan_dirs = subtree_dirs ~fs monorepo in 403 403 let all_deps = 404 404 List.concat_map