dry-nightfall-26819
11/14/2022, 1:38 PMpyright to be used with ./pants check and things seem to be nearly there; current problem i'm running into is related to pyright not having access to the venv to be able to determine imports. One solution that occurred to me was to use PathGlobs to grab the python-default venv from ./pants export but pants seems to hard-ignore the dist/ folder even if I add "!dist", "!/dist/" to global.pants_ignore in pants.toml
Has anyone done something like this before? Any ideas or tips?dry-nightfall-26819
11/14/2022, 1:39 PMwide-midnight-78598
11/14/2022, 1:44 PMwide-midnight-78598
11/14/2022, 1:45 PMdry-nightfall-26819
11/14/2022, 1:51 PMwide-midnight-78598
11/14/2022, 1:52 PMdry-nightfall-26819
11/14/2022, 1:52 PMwide-midnight-78598
11/14/2022, 1:54 PMdry-nightfall-26819
11/14/2022, 4:30 PMdry-nightfall-26819
11/14/2022, 4:31 PMwide-midnight-78598
11/14/2022, 4:37 PMto use the NpxProcess over the pip-installable version of pyright🤷 We have Node available, and if the pip solution is going to install node anyways, may as well go to the source. From the docs:
This project works by first checking if node is in theSo, it does what we do, but I think we run into some weird cache ownerships, like nodeenv is in the venv, which installs node, which installs pyright, but that was all kicked off from a pex venv? I don't even know who owns what anymore 🙂. If it is not, then we download node at runtime using nodeenv and then install the pyright npm package usingPATH.npx
wide-midnight-78598
11/14/2022, 4:38 PMdry-nightfall-26819
11/14/2022, 4:40 PMwide-midnight-78598
11/14/2022, 4:41 PM(since it's not currently released)Oh really? I thought it made it into a release
dry-nightfall-26819
11/14/2022, 4:42 PMdry-nightfall-26819
11/14/2022, 4:42 PMwide-midnight-78598
11/14/2022, 4:44 PM"pants.backend.experimental.javascript",
or
"pants.backend.experimental.javascript.lint.prettier",
The pyright support itself, is definitely experimental. However, if you take a look here, I messed up the cherry pick process (https://github.com/pantsbuild/pants/issues/17225), so the latest pyright support isn't in 2.15.0.a1. If you're stripping code out of main into your own in-repo plugin, and we have experimental.javascript in your version of Pants, we should be ready to rockdry-nightfall-26819
11/14/2022, 4:45 PMhundreds-father-404
11/14/2022, 6:44 PMbusy-vase-39202
11/14/2022, 11:17 PM