./pants experimental-bsp [args]
Setup repository for Build Server Protocol (https://build-server-protocol.github.io/).
Run the Build Server Protocol server. Pants will receive BSP RPC requests via the console. This should only ever be invoked via the IDE.
--experimental-bsp-runner-env-vars="['<str>', '<str>', ...]"
[ "PATH" ]
Environment variables to set in the BSP runner script when setting up BSP in a repository. Entries are either strings in the form
ENV_VAR=value to set an explicit value; or just
ENV_VAR to copy the value from Pants' own environment when the experimental-bsp goal was run.
This option only takes effect when the BSP runner script is written. If the option changes, you must run
./pants experimental-bsp again to write a new copy of the BSP runner script.
Note: The environment variables passed to the Pants BSP server will be those set for your IDE and not your shell. For example, on macOS, the IDE is generally launched by
launchd after clicking on a Dock icon, and not from the shell. Thus, any environment variables set for your shell will likely not be seen by the Pants BSP server. At the very least, on macOS consider writing an explicit PATH into the BSP runner script via this option.
Updated over 1 year ago