-
Notifications
You must be signed in to change notification settings - Fork 28
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
mypy
behaves differently from other extensions in reporting problems in files located in symlinked directories
#255
Comments
Can you share the part of the logs where there is output from both mypy, pylint, and flake8? With mypy we support file and workspace scopes. We expect mypy to report paths for us to report back. I am assuming mypy is reporting resolved path, logs should clarify that. |
Sure!
|
Can you test with this build and see if it works? https://github.com/microsoft/vscode-mypy/actions/runs/7590298754/artifacts/1182327203 |
@karthiknadig tested it, same behavior. But that's hardly surprising, since the new function does exactly the same thing as the old one :) |
@bersbersbers Sorry about that. Let me push the correct one. |
@bersbersbers we by default use resolved paths, for easier mapping when working with But I need to re-evaluate how this is done for each case. It might be working fine, but I feel like since the working dir for |
I recently ran into this same issue, but my entire workspace was opened via a symlinked directory. Nothing worked. Opening the same workspace via the physical path resolved the issue. You might be able to take the same approach as git support did. |
This is still an issue one of our team members ran into today. Has there been any update on this very hard-to-debug bug? The Ruff extension, for example, handles this properly and is able to report errors on a symlinked repo. |
I remember #256 fixed this for me, but it has yet to be merged. |
@Hnasar @ktbarrett Can you try this build and let me know if it works for you. This fell of my radar, I can merge it if you can confirm: https://github.com/microsoft/vscode-mypy/actions/runs/10843266187/artifacts/1928229507 |
@karthiknadig It seems to work for me. Thank you! |
My
C:\Code
is a junction:Now, when I open
C:\Code\Bug
as a workspace, and inspectC:\Code\Bug\bug.py
, this is what I see:PyLance, pylint, sonarlint, flake8, and ruff report errors in the correct file.
mypy
reports them inC:\ws\Bug\bug.py
, which means clickingmypy
errors in the "Problems" tab opens the file again:This is closely related to microsoft/vscode#100533, but since all the other extensions get it right, I feel
mypy
should, too.The text was updated successfully, but these errors were encountered: