bazelbuild / rules_kotlin

Bazel rules for Kotlin
Apache License 2.0
334 stars 210 forks source link

Can't use rules from head without bazel installed. #662

Open BalestraPatrick opened 2 years ago

BalestraPatrick commented 2 years ago

Hi!

It seems like archive_repository_implementation is invoking bazel directly: https://github.com/bazelbuild/rules_kotlin/blob/26c811765f8ed42d4538a1963dffb9dc2d12f3b8/src/main/starlark/release_archive/repository.bzl#L80

This causes issues when running on a machine with only bazelisk on the PATH because bazel doesn't exist. Would it be possible to improve this in some way?

restingbull commented 2 years ago

I presume you are not running this from a release?

The work around is to run:

bazelisk build //:rules_kotlin_release
mkdir /tmp/rules_kotlin_release && tar -xvf bazel-bin/rules_kotlin_release.gz -C /tmp/rules_kotlin_release

And add local_repository(name="rules_kotlin", path="/tmp/rules_kotlin_release") to the consuming workspace.

BalestraPatrick commented 2 years ago

We are actually using https://github.com/bazelbuild/rules_kotlin/releases/download/v1.5.0-beta-4/rules_kotlin_release.tgz

restingbull commented 2 years ago

Workspace file, please?