ocaml / ocaml/dune

Difficulties with select stanza and depending on library's version: dependency cycle

Open
#14,946 9 comments 0 reactions 1 assignee View on GitHub

@punchagan is already working on this.

Since Jun 5, 2026.

build docs needs-investigation
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Expected Behavior

I want to depends on ppxlib's version but can't setup dependencies. Getting an error

Error: Dependency cycle between:
   %{read:../lt38.txt} at lib/dune:16
-> required by %{read:../lt38.txt} at lib/dune:16
-> required by library "fake_lt38" in _build/default/lib

Specified dune lang is 3.23 and after dune b -w you can see error above.
If you s/23/22/ you will see another error, because -w ruins thing. Restarting dune's process helps.

Also I observed with dune 3.22 that removing package stanza sometimes helps. I have not idea why and how select feature interacts with package specification

Reproduction

Reproduction project https://github.com/Kakadu/select_demo

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.