fix(opencode): follow symlinks in file scan and directory listing#29102
Open
mormubis wants to merge 1 commit into
Open
fix(opencode): follow symlinks in file scan and directory listing#29102mormubis wants to merge 1 commit into
mormubis wants to merge 1 commit into
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found a related PR that addresses a similar concern: Related PR:
The other PRs found (#27639 and #24973) are related to symlink handling but focus on different aspects (circular symlinks and ripgrep-specific handling respectively). No exact duplicates were found (the current PR #29102 should not be marked as a duplicate of itself), but you may want to review #28532 to ensure your changes complement rather than conflict with that work. |
rg.files() in scan() was not passing --follow, so files inside symlinked directories were invisible to @file autocomplete. the remaining readDirectoryEntries consumer fixes (symlinked dirs in list() and the global home scan path) are covered by anomalyco#28532 which fixes the root cause in readDirectoryEntries itself. closes anomalyco#29080
5e3809b to
4379e15
Compare
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #29080
Type of change
What does this PR do?
@filementions cannot find files inside symlinked directories becauseFile.scan()callsrg.files()without--follow— ripgrep skips symlinked directories by default.this adds
follow: trueto therg.files()call so ripgrep traverses symlinks when building the file search cache.the other half of the issue (
readDirectoryEntriesclassifying symlinked dirs as"symlink"instead of"directory") is addressed by #28532 which fixes the root cause inreadDirectoryEntriesitself.How did you verify your code works?
bun typecheckpassesbun test test/file/index.test.ts— 52 tests passChecklist