Skip to content

refactor(stdune): rename and move shared tree traversal - #16807

Merged
Alizter merged 2 commits into
ocaml:mainfrom
Alizter:push-lmpxwpnyvosz
Oct 28, 2026
Merged

Alizter merged 2 commits into
ocaml:mainfrom
Alizter:push-lmpxwpnyvosz

Conversation

@Alizter

@Alizter Alizter commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Rename Tree_copy to Tree_traversal and move it to Stdune. No behavior change.

Follow-up to #16675.

@Alizter
Alizter force-pushed the push-lmpxwpnyvosz branch 3 times, most recently from caafd8f to 8a88e16 Compare October 26, 2026 21:08
Rename Tree_copy.copy to Tree_traversal.traverse and its copy_file callback
to on_file. The traversal also supports symlinking and hardlinking, so its
names should not imply that it always copies files.

Document the source-to-destination mapping, root handling, and differences
from Fpath.traverse in the interface. Keep the API focused on the needs of
its two destination-tree construction callers.

Update both the sandbox and copy-action call sites without changing
traversal, permissions, or symlink handling. Keep this naming cleanup
separate from the hardlink sandbox fix in ocaml#16675.

Signed-off-by: Ali Caglayan <[email protected]>
Move Tree_traversal to Stdune and re-export it there. The implementation
only uses filesystem and path utilities already provided by Stdune; remove
the engine Import opens from its implementation and interface.

Keep the API, traversal behavior, and documentation unchanged. Existing
engine callers use the module through their Stdune import without any
call-site changes.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter
Alizter marked this pull request as ready for review October 28, 2026 15:34
@Alizter
Alizter merged commit 7d41635 into ocaml:main Oct 28, 2026
39 of 64 checks passed
@Alizter
Alizter deleted the push-lmpxwpnyvosz branch October 28, 2026 15:34
@Alizter Alizter added this to the 3.26.0 milestone Oct 29, 2026
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.

2 participants