bazelbuild/rules_appengine

Support homebrew bazel 4.0.0

tony-scio opened this issue · 6 comments

Homebrew upgraded me to bazel 4.0.0 and now I'm getting this failure:
@io_bazel_rules_appengine//appengine:jdk8: no such attribute 'extclasspath' in 'java_toolchain' rule

$ bazel --version
bazel 4.0.0-homebrew

Actually, that error is fixed by 387760e, but then I was broken again by the next commit here because of the -homebrew in the version string:
8099725#diff-d09189ef40ff40b339ce8357f57f92889c04132a51eb9d4e6e29252a7092c40bR321

external/io_bazel_rules_appengine/appengine/java_appengine.bzl", line 321, column 35, in java_appengine_repositories
		bazel_version = tuple([int(n) for n in native.bazel_version.split(".")])
Error in int: invalid base-10 literal: "0-homebrew"

cc @comius

Wow! Amazing turnaround, thanks so much :)

Hi, is this broken again? I'm getting this on an install from homebrew (M1/Monterey) on the tutorial iOS project:

bazel build //ios-app
Starting local Bazel server and connecting to it...
ERROR: Traceback (most recent call last):
	File "/Users/johnholdsworth/Developer/examples/tutorial/WORKSPACE", line 72, column 28, in <toplevel>
		java_appengine_repositories()
	File "/private/var/tmp/_bazel_johnholdsworth/ececc61dd39c0b216df21c404b9aec42/external/io_bazel_rules_appengine/appengine/java_appengine.bzl", line 321, column 35, in java_appengine_repositories
		bazel_version = tuple([int(n) for n in native.bazel_version.split(".")])
Error in int: invalid base-10 literal: "0-homebrew"
ERROR: error loading package 'external': Package 'external' contains errors
INFO: Elapsed time: 2.119s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

I made a temporary fix by patching the .bzl file it mentions:

        bazel_version = tuple([int(n) for n in native.bazel_version.split(".")])
becomes
        bazel_version = tuple([int(n) for n in native.bazel_version.split("-")[0].split(".")])
$ bazel --version
bazel 5.3.0-homebrew

would you send a PR with that fix?

Seems like I've picked up an old version using brew. There is already a fix for this (this one) in the repo.

Is anyone going to update the homebrew formula?