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

workaround for memory leak caused by pylint bug #585

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bundled/tool/lsp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,10 +735,14 @@ def _run_tool_on_document(

argv += TOOL_ARGS + settings["args"] + extra_args

# pygls normalizes the path to lowercase on windows, but we need to resolve the
# correct capitalization to avoid https://github.com/pylint-dev/pylint/issues/10137
resolved_path = str(pathlib.Path(document.path).resolve())

if use_stdin:
argv += ["--from-stdin", document.path]
argv += ["--from-stdin", resolved_path]
else:
argv += [document.path]
argv += [resolved_path]

env = None
if use_path or use_rpc:
Expand Down
Loading