Skip to content

Commit 6a8bc4e

Browse files
committed
Migrate to Bazel 9
1 parent 050dbca commit 6a8bc4e

6 files changed

Lines changed: 406 additions & 80 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.0.0

MODULE.bazel.lock

Lines changed: 201 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.0.0

examples/bazel-example/MODULE.bazel.lock

Lines changed: 197 additions & 37 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: 4 additions & 2 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,7 +98,7 @@ 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;
101+
# In Bazel 8+ compilation.javac_options is a depset of shell-quoted strings;
100102
# ctx.tokenize splits each entry into proper individual flags.
101103
raw_options = compilation.javac_options
102104
if hasattr(raw_options, "to_list"):
@@ -160,7 +162,7 @@ def _scip_java(target, ctx):
160162
def _scip_java_aspect(target, ctx):
161163
scip = _scip_java(target, ctx)
162164
if not scip:
163-
return struct()
165+
return []
164166
return [OutputGroupInfo(scip = [scip])]
165167

166168
scip_java_aspect = aspect(

0 commit comments

Comments
 (0)