adventurous-rain-63973
02/11/2024, 10:20 AMpyright
in Pants. I could verify that it breaks when using the target ::
on a big repository, at about 1,400
files, and ours has even more files. By chatting with @better-van-82973, it turned out that an additional partitioning on the files level could help in this case. I would be interested in trying to implement this myself but I'm completely lost on how to configure my IDE, visual studio code, to debug on a rule. Maybe I'm missing something, but this is what I do:
1. Once the environment is ready with rust/python, I run pants
in the root folder. I use pants
from homebrew
. The process apparently succeeds and I could also verify by running pants test src/python/pants/backend/python/typecheck/pyright/rules_integration_test.py
2. Then I link the venv to visual studio code by using the setting: "python.defaultInterpreterPath": "~/.cache/pants/pants_dev_deps/edb7e9b2fbe8ee3a512a6fe15c1d92e1628269ed.venv/bin/python",
. It's worth noticing that the pattern is different from what is mentioned in the docs, supposed to include the architecture. I also tried to export
in dist
and link in the same way, but same result. However, visual studio code seems to recognize the environment corretly.
3. The I tried the following commands in the terminal:
a. PANTS_DEBUG=true pants --no-pantsd
b. pants test --debug-adapter src/python/pants/backend/python/typecheck/pyright/rules_integration_test.py
By running with remote debugging on the file rules_integration_test.py
I cannot make it stop at any breakpoint in pyright_determine_partitions
. Is it because it is into an async
function? What would it be the best way to debug this?broad-processor-92400
02/12/2024, 5:08 AMbitter-ability-32190
02/12/2024, 2:09 PMbitter-ability-32190
02/12/2024, 2:09 PMadventurous-rain-63973
02/12/2024, 2:23 PMbitter-ability-32190
02/12/2024, 4:09 PMpyright
is pip installed from the resolve you provide? If so, use a VCS URL?better-van-82973
02/12/2024, 4:27 PMPANTS_SOURCE
, but I’m curious if there’s another way