scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

`--power` not reflected via `--json-options` for `bsp` subcommand

Open ramytanios opened this issue 1 year ago • 0 comments

Version(s) 1.1.1

Describe the bug scala-cli bsp --power sets power while scala-cli bsp --json-options jsonOptions.json where jsonOptions.json is

{"powerOptions": {"power":true}}

does not set power to true.

To Reproduce 1.

//app.scala
@main def run = println("Hello world!")
//project.scala
//> using scala 3.3.1
//> using buildInfo
  1. Open the project with an IDE with metals support. There should be a generated .bsp/scala-cli.json and .scala-build/ide-options-v2.json.

  2. In project.scala, there should be the error on using buildInfo image that complains about the power option.

  3. In the root of the project, do scala-cli setup-ide . --power. Look at content of .scala-build/ide-options-v2.json, you should find

{"powerOptions": {"power":true}}
  1. However the error in project.scala on using buildInfo does not go away although ide-options-v2.json is read through the arg --json-options in .bsp/scala-cli.json.

  2. Go to .bsp/scala-cli.json and append --power to args. Error in project.scala disappears.

Expected behaviour --power should be picked up when set through --json-options

ramytanios avatar Jan 15 '24 21:01 ramytanios