leanprover / leanprover/lean4

RFC: Allow `System.FilePath.walkDir` to not follow symbolic link

Open
#10,972 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting-author RFC
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Proposal

Callers of System.FilePath.walkDir should have the ability to not follow symbolic links, which are now followed unconditionally. This may prevent infinite recursion on a directory structure with a cycle.

Impact

Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.

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.

Research direction

Start with System.FilePath.walkDir in src/Init/System/IO.lean, at the lines linked in the proposal. Check how directory traversal currently handles symbolic links and identify the API decision needed to let callers disable following them. Done means callers can opt out and directory cycles no longer cause unbounded recursion.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.