https://pantsbuild.org/ logo
b

better-sunset-63499

03/01/2022, 4:21 PM
Does anyone have a VS Code stub or something for
BUILD
files? I like to have them set as the Python type to get autoformatting, but it's a sea of red because
python_sources
and such aren't defined
👀 1
b

bitter-ability-32190

03/01/2022, 4:22 PM
I don't think so, but would love to be wrong 🙂 In the distant future I'm hoping to help out on a VS Code plugin 🎉
r

refined-addition-53644

03/01/2022, 4:35 PM
Someone had posted that VS code extension for Bazel BUILD files work also for pants.
b

bitter-ability-32190

03/01/2022, 4:35 PM
It does somewhat, but doesn't work as well if you want to format with
black
(unless perhaps you configure the plugin to pretend
black
is
buildifier
🤔 )
👍 1
r

refined-addition-53644

03/01/2022, 4:36 PM
Yeah it just makes red stuff 💚
🟥 1
h

hundreds-father-404

03/01/2022, 6:01 PM
@fast-nail-55400 has been leading a project to add Java support to PyCharm using BSP (like LSP). Our hope is that this will be easily adapted to VSCode, which also supports BSP
f

fast-nail-55400

03/01/2022, 6:05 PM
current status on BSP: IntelliJ’s Scala plugin is able to speak BSP to the current support in Pants, although there is much work to be done yet. BSP and LSP uses the same wire protocol, so if someone wanted to explore an LSP server for Pants BUILD files, there’s a lot of work there but it could reuse the protocol work already done for BSP and just focus on implementing the necessary LSP methods.
🙌 1
b

better-sunset-63499

03/01/2022, 8:56 PM
thanks I'll try that out
f

fresh-cat-90827

03/01/2022, 8:59 PM
please do! They even feature autocompletion!
b

bitter-ability-32190

03/01/2022, 9:03 PM
Aside: I'm hoping to pick this up eventually: https://github.com/pantsbuild/pants/pull/14049
Then your resources get dependency-inferenced (in certain scenarios)
🙌 1
4 Views