Hey y'all! Question about IDE integration. I saw <...
# general
b
Hey y'all! Question about IDE integration. I saw these docs, and as a VSCode users, this more or less worked: AFAICT, these operations are pretty static, and I'd need to remember to rerun these commands if I added a new source or 3rd party dependency. Think there's a way to automatically regenerate the
.env
file or rerun
Copy code
pants export --py-resolve-format=symlinked_immutable_virtualenv --resolve=python-default
Any time either a source is added or
python-default
changes?
w
I don't know if there is a way to run that locally, as I don't think we have re-gen hooks anywhere (which would be a cool feature, BTW). You could create a script that you call pants through that could do that, if you want the indirection, and you could create an alias in the pants.toml so it's less unwieldy. WOuld you mind adding an issue here? This is a pretty good use case to capture for the plugin https://github.com/robotpajamas/suspenders
b
Would you mind adding an issue here?
Will do!
> You could create a script that you call pants through that could do that Yeah I wondering if setting up a
shell_command
with
//3rdparty/python
as a dependency would be a good start, with the
command
being
pants export --py-resolve-format=symlinked_immutable_virtualenv --resolve=python-default
s
Aha, I just found out about suspenders, thanks @wide-midnight-78598! I downloaded the pre-release version and am playing around with it. I really enjoyed that pyright finally recognizes my BUILD file LSP data, thank you 🙂 . I noticed that python_artifact isn't recognized, though. Are there any VSCode integrations with the source roots and targets yet? Like not having to specify extraPaths for pylint, or not having to specify a .env file with PYTHONPATHs for VSCode's module discovery?
w
I noticed that python_artifact isn't recognized, though.
There are some problems with it, because it's actually generated by the extension - rather than being provided by Pants (which would end up being more accurate in the end), but the plugin needs to generate it for now so that it's backported. You can create some issues with suggestions. I've been a bit distracted from Suspenders, as I'm writing an LSP and extension for Jai - and then I was going to merge some of the functionality of both of them
s
Thanks! Will do.
👍 1
w
I'm hoping to get Suspenders to a proper 1.0 around the end of March if I can. I've been laying off open source the past 6 months or so while doing some other stuff
1
s
I am happy to contribute after I get up to speed on this.
w
👍 There's a lot of re-writing yet to come, but overall it's pretty simple
s
Is pants support for pycharm considered better than support for VSCode?
w
I mean, the vscode support is super minimal, but I haven't used Pycharm in a decade, so not sure
🆗 1