Ensure BSP respects --power mode #2997
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2678
This ensures the
bsp
sub-command (as called by an IDE) picks up on--power
mode being set by:--power
launcher option being passed tosetup-ide
--power
sub-command option being passed tosetup-ide
SCALA_CLI_POWER
environment variable being passed tosetup-ide
power
key of theconfig
sub-commandIf any single one of these sets power mode on, BSP will pick it up.
Power mode should also be picked up by a running BSP server's
workspace/reload
whensetup-ide
orconfig
are called.Note: once power mode gets picked up by BSP, we don't turn it off at any point, even when explicitly passed to
setup-ide
. This is intentional behaviour, as we don't want to break anyone's existing IDE import to break. If you care for power mode to be turned off in your IDE, you need to explicitly restart the BSP server.