Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow symlinks when walking project trees #6246

Merged
merged 1 commit into from Oct 16, 2020

Conversation

dfoxfranke
Copy link
Contributor

@dfoxfranke dfoxfranke commented Oct 15, 2020

Fixes #3691.

WIP pending further testing:

  • Verify that symlinked files get indexed.
  • Verify that files in symlinked directories get indexed.
  • Verify that inotify events are properly received and handled when the target of a symlink resides outside the project tree.

@dfoxfranke
Copy link
Contributor Author

Everything seems to work as expected. I think this is ready to merge.

@lnicola
Copy link
Member

lnicola commented Oct 16, 2020

LGTM

I think we can merge this, since it's a very small change that seems unlikely to make things worse.

@lnicola lnicola added the hacktoberfest-accepted Hacktoberfest accepted PR label Oct 16, 2020
@lnicola
Copy link
Member

lnicola commented Oct 16, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 16, 2020

@bors bors bot merged commit 1af6275 into rust-lang:master Oct 16, 2020
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Apr 17, 2024
As of rust-lang#6246, rust-analyzer follows symlinks. This can introduce an
infinite loop if symlinks point to parent directories.

Considering that rust-lang#6246 was added in 2020 without many bug reports,
this is clearly a rare occurrence. However, I am observing
rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is
more robust but still allows typical symlink usage patterns.
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Apr 17, 2024
As of rust-lang#6246, rust-analyzer follows symlinks. This can introduce an
infinite loop if symlinks point to parent directories.

Considering that rust-lang#6246 was added in 2020 without many bug reports,
this is clearly a rare occurrence. However, I am observing
rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is
more robust but still allows typical symlink usage patterns.
Wilfred added a commit to Wilfred/rust-analyzer that referenced this pull request Apr 17, 2024
As of rust-lang#6246, rust-analyzer follows symlinks. This can introduce an
infinite loop if symlinks point to parent directories.

Considering that rust-lang#6246 was added in 2020 without many bug reports,
this is clearly a rare occurrence. However, I am observing
rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is
more robust but still allows typical symlink usage patterns.
bors added a commit that referenced this pull request Apr 18, 2024
fix: VFS should not walk circular symlinks

As of #6246, rust-analyzer follows symlinks. This can introduce an infinite loop if symlinks point to parent directories.

Considering that #6246 was added in 2020 without many bug reports, this is clearly a rare occurrence. However, I am observing rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is more robust but still allows typical symlink usage patterns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Hacktoberfest accepted PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workspace symlink causes error
2 participants