facebook / facebook/pyrefly

imports using symlinked paths are not updated

Open
#1,336 4 comments 0 reactions 1 assignee Claimed by @asukaminato0721 View on GitHub
language-server
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

When importing a python module through its symlinked path, changes are not picked up.

To reproduce:
```
echo 'def hello(name):\n print(f"Hello {name}")' > test_module.py
ln -s test_module.py sym.py
echo 'from sym import hello\nhello("John")' > test_import.py
```

Now open both files in your editor with an LSP client and add/remove/rename an argument of hello in `test_module.py`. When requesting texDocument/hover or diagnostics the the data is not updated. The data is updated correctly if hello is imported with `from test_module import hello`, so it's an issue specific to symlinks.

Not sure if this is related to #1104 or not.

### Sandbox Link

_No response_

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.