Skip to content

Commit

Permalink
Allow passing options to scala-cli via language plugin executor (#503)
Browse files Browse the repository at this point in the history
* add BESOM_LANGHOST_SCALA_CLI_OPTS env var handling to scala-cli langhost executor
* disable bloop in CI jobs
  • Loading branch information
lbialy authored May 24, 2024
1 parent 7a0c24a commit 85d55d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
build:
if: "! github.event.pull_request.head.repo.fork"
runs-on: ubuntu-latest
env:
BESOM_LANGHOST_SCALA_CLI_OPTS: "--server=false"
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
package executors

import (
"os"

"github.com/virtuslab/besom/language-host/fsys"
)

Expand All @@ -23,12 +25,13 @@ func (s scalacli) NewScalaExecutor(opts ScalaExecutorOptions) (*ScalaExecutor, e
}

func (scalacli) newScalaCliExecutor(cmd string, bootstrapLibJarPath string) (*ScalaExecutor, error) {
scalaCliOpts := os.Getenv("BESOM_LANGHOST_SCALA_CLI_OPTS")
return &ScalaExecutor{
Name: "scala-cli",
Cmd: cmd,
BuildArgs: []string{"compile", "."},
RunArgs: []string{"run", "."},
PluginArgs: []string{"run", ".", "--jar", bootstrapLibJarPath, "--main-class", "besom.bootstrap.PulumiPluginsDiscoverer"},
BuildArgs: []string{"compile", ".", scalaCliOpts},
RunArgs: []string{"run", ".", scalaCliOpts},
PluginArgs: []string{"run", ".", scalaCliOpts, "--jar", bootstrapLibJarPath, "--main-class", "besom.bootstrap.PulumiPluginsDiscoverer"},
VersionArgs: []string{"version", "--cli", "--offline"},
}, nil
}

0 comments on commit 85d55d4

Please sign in to comment.