Hi, Is there is any active/initial work on making...
# general
h
Hi, Is there is any active/initial work on making a Pants plugin for PyCharm/IntelliJ? If so, I'd like to help.
🧵
b
The discussion on https://github.com/pantsbuild/pants/issues/11151 suggests maybe no active effort at the moment
h
Thanks!
b
From what I've heard: • JetBrians plugins are notoriously challenging. The mypy folks a while back just straight up gave up • They do support a "Build Support Protocol" (mainly JVM languages) but were working on a Python one So if anything I'd probably focus on the Python BSP
h
Do you maybe have a link? (Googling "Pycharm python build support protocol" gave lots of junk...)
b
I looked at it like a year ago, and it was just a document t then. You might have more luck with "BSP"
h
Looks like something exists now. Will give it a look.
b
That's for Scala. There was a provisional one for Python
h
There is Pants support for IntelliJ for Scala/Java, using BSP. The open issue is extending that for Python. @witty-crayon-22786 has the details.
I think it currently uses the generic BSP support rather than a Pants-specific IDEA plugin, but the latter is probably a good idea.
w
yea, the IntelliJ folks were expected to have added or announced BSP client support for Python in IntelliJ/PyCharm sometime in the last few weeks: i haven’t followed up to see whether that actually happened. there has been some communication in the BSP discord Pants already supports acting as a BSP server for Java/Scala, so when the client is there, adding support for acting as a BSP server for Python should be all that is necessary…?
…i’ll put this on the ticket instead, sorry.
updated the description of https://github.com/pantsbuild/pants/issues/11151: they’re hoping to have the client in the next release
@high-magician-46188: if you’re interested, i’d be happy to explain the BSP protocol. @fast-nail-55400 was the original author of our support.
f
I am willing to be available to guide any one who wants to extend the BSP support to Python.
h
Could you point me to an example that I could learn from most of it and then I'll ask for more specific pointers?
f
depends on where you want to start. you can look at the existing BSP code in the repo (just search
bsp
)
for Python aspects of BSP, you would need to find whatever spec the BSP groups has published.
I don't have experience with Python/BSP so can't really help much there other than to point at the JVM-related stuff and how the concepts were translated to Pants.