Skip to content

fix(pkg): lock subdirectories#14524

Merged
shonfeder merged 1 commit into
ocaml:mainfrom
Alizter:push-skkwmnoyzwpp
May 15, 2026
Merged

fix(pkg): lock subdirectories#14524
shonfeder merged 1 commit into
ocaml:mainfrom
Alizter:push-skkwmnoyzwpp

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented May 13, 2026

Fixes #14523.

Two places assumed single-segment lock_dir paths:

  • Lock_rules.setup_rules only handled components = [".lock"] and fell through to empty rules for deeper paths. Adds a ".lock" :: _ :: _ arm that returns redirect_to_parent, mirroring the pattern Pkg_rules uses for .pkg/<digest> sub-paths.
  • Workspace.source_path_of_lock_dir_path only matched a 4-component build path; generalised to any _ :: _ :: ".lock" :: (_ :: _ as segs).

Builds on #14522.

@Alizter Alizter force-pushed the push-skkwmnoyzwpp branch 2 times, most recently from 76b02c9 to 73efa2d Compare May 13, 2026 23:31
@Alizter Alizter marked this pull request as ready for review May 13, 2026 23:48
@Leonidas-from-XIV
Copy link
Copy Markdown
Collaborator

#14522 is merged, can you rebase to see just the fix in the cram test diff?

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter Alizter force-pushed the push-skkwmnoyzwpp branch from 73efa2d to a778e5b Compare May 14, 2026 10:11
@Alizter Alizter requested a review from Leonidas-from-XIV May 14, 2026 11:10
Copy link
Copy Markdown
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

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

Looks pretty good, one clarification missing and then its good to go.

Comment thread src/dune_rules/lock_rules.ml
@Alizter Alizter requested a review from Leonidas-from-XIV May 14, 2026 12:29
@shonfeder shonfeder self-requested a review May 14, 2026 14:53
@Leonidas-from-XIV Leonidas-from-XIV dismissed their stale review May 15, 2026 14:25

Not worth blocking over what is basically a preference in readability.

@shonfeder shonfeder merged commit c30a4a1 into ocaml:main May 15, 2026
31 checks passed
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.

lock_dir with subdirectory path is broken

3 participants