Hi! I've recently started having issues with the `...
# general
b
Hi! I've recently started having issues with the
experimental-bsp
support, as Intellij 99/100 times have issues with connecting to the BSP server (
Problem connecting to BSP server: BSP server is not responding. See IDE log for details.
) when I try to import my pants project and/or reload the BSP projects. Sometimes it works, but I can't understand what I'm doing to make it work. I've modified
.pants.d/bsp/scripts/run-bsp.sh
to start
pants
with
-ldebug
and have noticed that no Nailgun processes starts even tho the log states
14:28:13.41 [INFO] Initializing Nailgun pool for 24 processes...
when I do
BSP reload
in Intellij. I run linux, specifically
nixos
. pants
2.22.1
. I've tried a lot of things, including: - Removed
~/.cache/pants
and
~/.cache/nce
- Removed
<project root>/.pants.d
and
<project root>/.bsp
and re-run
pants experimental-bsp
- Removed
<project root>/.idea
- Invalidated Intellijs cache
b
Sorry for the trouble! You say "recently", can you think of anything that has changed between when it was working and now? E.g. OS/package/Intellj/Pants upgrades, or something else?
b
Thanks for your input! No, not really. What makes me really confused is that it works sometimes, I just can't figure out what I do to make it work. I have too many variables at the moment. My next step is to make a separate, minimal setup and see if that works. In the meantime I was hoping for a way to debug this. Worth mentioning is that other users of the same repo do not experience my issues.
👍 1
this is the closest I get to pants doing the dependency resolving. I'm not doing the
ctrl-c
, its intellij (I think):
Copy code
09:08:17.12 [INFO] _received_inbound_message: msg={'jsonrpc': '2.0', 'id': '1', 'method': 'build/initialize', 'params': {'rootUri': 'file:/home/alex/code/work/backend/', 'displayName': 'IntelliJ-BSP', 'version': '2024.2.25', 'bspVersion': '2.0', 'capabilities': {'languageIds': ['scala', 'java']}, 'data': {'clientClassesRootDir': 'file:/home/alex/code/work/backend/out', 'supportedScalaVersions': []}}}
09:08:17.12 [INFO] _send_outbound_message: msg={'jsonrpc': '2.0', 'id': '1', 'result': {'displayName': 'Pants', 'version': '2.22.1', 'bspVersion': '2.0.0', 'capabilities': {'compileProvider': {'languageIds': ('java', 'scala')}, 'testProvider': {'languageIds': ()}, 'runProvider': {'languageIds': ()}, 'debugProvider': {'languageIds': ()}, 'dependencySourcesProvider': True, 'dependencyModulesProvider': True, 'resourcesProvider': True}}}
09:08:17.12 [INFO] _received_inbound_message: msg={'jsonrpc': '2.0', 'method': '$/cancelRequest', 'params': {'id': '1'}}
09:08:17.12 [WARN] Received cancel notification for unknown message id 1
09:08:17.12 [INFO] _received_inbound_message: msg={'jsonrpc': '2.0', 'id': '2', 'method': 'build/shutdown', 'params': None}
09:08:17.13 [INFO] _send_outbound_message: msg={'jsonrpc': '2.0', 'id': '2', 'result': None}
Interrupted by user:
User interrupted execution with control-c!
update: a minimal pants repo works for me, so I will have to find where things are broken in our big repo.