Skip to content

Comments

Respect potentially existing lock dir when running format rules#12847

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

Respect potentially existing lock dir when running format rules#12847
Leonidas-from-XIV merged 2 commits intoocaml:mainfrom
Leonidas-from-XIV:respect-existing-lock-dir

Conversation

@Leonidas-from-XIV
Copy link
Collaborator

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.

Copy link
Collaborator

@Sudha247 Sudha247 left a comment

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
Collaborator 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.

Signed-off-by: Marek Kubica <marek@tarides.com>
Signed-off-by: Marek Kubica <marek@tarides.com>
@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
28 of 29 checks passed
@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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

2 participants