imports using symlinked paths are not updated
Author: Emilv2Created Oct 17, 2025Updated Sep 22, 2026
Labelslanguage-server
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.pyNow 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
Source: facebook/pyrefly