Skip to content

Respect potentially existing lock dir when running format rules - #12847

Merged
Leonidas-from-XIV merged 2 commits into
ocaml:mainfrom
Leonidas-from-XIV:respect-existing-lock-dir
Dec 5, 2025
Merged

Leonidas-from-XIV merged 2 commits into
ocaml:mainfrom
Leonidas-from-XIV:respect-existing-lock-dir

Conversation

@Leonidas-from-XIV

Copy link
Copy Markdown
Member

The reason that we check the flag first is because unless running with LOCK_DEV_TOOL we are not implicitly creating a lock dir for the dev tool. But there might still be an eligible dev tool lock dir (created by dune tools install ocamlformat previously) so we should still check it.

Closes #12839.

@Leonidas-from-XIV Leonidas-from-XIV added the package management Dune's package management — `(pkg)` stanza, lockdirs, `dune pkg` commands label Dec 2, 2025
@Leonidas-from-XIV
Leonidas-from-XIV force-pushed the respect-existing-lock-dir branch from 4d62876 to 1c08e84 Compare December 3, 2025 15:07
@Leonidas-from-XIV
Leonidas-from-XIV marked this pull request as ready for review December 3, 2025 15:08

@Sudha247 Sudha247 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks sensible to me.

However, I'm afraid the working of the environment flag may not be known? Quick look up at https://dune.readthedocs.io/en/stable/index.html didn't find me anything, so maybe we should include it in the docs? (This is unrelated to the PR, and shouldn't block it).

@Leonidas-from-XIV

Copy link
Copy Markdown
Member Author

The flag is one of the flags that were enabled in the Dune Developer Preview and being phased out in the nightly. So I think it is more on the verge of being removed in the future.

@Leonidas-from-XIV
Leonidas-from-XIV force-pushed the respect-existing-lock-dir branch from 1c08e84 to 85ff100 Compare December 5, 2025 15:40
@Leonidas-from-XIV
Leonidas-from-XIV enabled auto-merge (squash) December 5, 2025 15:41
@Leonidas-from-XIV
Leonidas-from-XIV merged commit 88bbc4f into ocaml:main Dec 5, 2025
@Leonidas-from-XIV
Leonidas-from-XIV deleted the respect-existing-lock-dir branch December 5, 2025 19:13
davesnx added a commit to davesnx/dune that referenced this pull request Dec 8, 2025
…without-system

* 'main' of github.com:/ocaml/dune: (30 commits)
  Add (files) stanza (ocaml#12879)
  Make sure to use string equality in parsing hot path (ocaml#12874)
  Hoist up [Dune_sexp.Decoder.sum] uses (ocaml#12876)
  Delay ocaml-index dependencies (ocaml#12881)
  Simplify Lib.requires (ocaml#12880)
  Lib: delay applying modules (ocaml#12884)
  Annotate some ignored parameters in lib.ml (ocaml#12883)
  feat: expand variables in `(promote (into ..))` (ocaml#12832)
  dune-binaries.t: nix ci (ocaml#12875)
  fix: greedy version location in lang declarations (ocaml#12869)
  Reproduction case for ocaml#6220. (ocaml#6221)
  Defunctionalize the dune sexp decoder (ocaml#12768)
  disable flake (ocaml#12873)
  refactor: [instantiate] takes a regular library (ocaml#12849)
  Respect potentially existing lock dir when running format rules (ocaml#12847)
  fix: ascii start
  chore: updated CR someday
  chore: added entry for CHANGES.md
  fix: else claude message
  tests: promoted non-ascii-characters.t to new logic
  ...
@Alizter Alizter added this to the 3.21.0 milestone Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package management Dune's package management — `(pkg)` stanza, lockdirs, `dune pkg` commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg: dune tools install ocamlformat can fail to put ocamformat on the path for dune build @fmt

3 participants