Skip to content

Commit 7a5397c

Browse files
authored
Migrate to Bazel 9 (#937)
1 parent 16ee5d9 commit 7a5397c

6 files changed

Lines changed: 555 additions & 83 deletions

File tree

‎.bazelversion‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.7.0
1+
9.1.1

‎MODULE.bazel.lock‎

Lines changed: 274 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.7.0
1+
9.1.1

‎examples/bazel-example/MODULE.bazel.lock‎

Lines changed: 274 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples/bazel-example/src/main/java/srcjar_example/BUILD‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_java//java:defs.bzl", "java_library", "java_test")
2+
13
genrule(
24
name = "generated-srcjar",
35
outs = ["sources.srcjar"],

‎scip-java/src/main/resources/scip-java/scip_java.bzl‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Example command to run this aspect directly:
3838
To learn more about aspects: https://bazel.build/extending/aspects
3939
"""
4040

41+
load("@rules_java//java/common:java_info.bzl", "JavaInfo")
42+
4143
def _scip_java(target, ctx):
4244
if JavaInfo not in target or not hasattr(ctx.rule.attr, "srcs"):
4345
return None
@@ -96,8 +98,6 @@ def _scip_java(target, ctx):
9698
processorpath += [j.path for j in annotations.processor_classpath.to_list()]
9799
processors = annotations.processor_classnames
98100

99-
# In Bazel 8 compilation.javac_options is a depset of shell-quoted strings;
100-
# ctx.tokenize splits each entry into proper individual flags.
101101
raw_options = compilation.javac_options
102102
if hasattr(raw_options, "to_list"):
103103
raw_options = raw_options.to_list()
@@ -160,7 +160,7 @@ def _scip_java(target, ctx):
160160
def _scip_java_aspect(target, ctx):
161161
scip = _scip_java(target, ctx)
162162
if not scip:
163-
return struct()
163+
return []
164164
return [OutputGroupInfo(scip = [scip])]
165165

166166
scip_java_aspect = aspect(

0 commit comments

Comments
 (0)