-
Notifications
You must be signed in to change notification settings - Fork 483
Upgrade rules_scala and rules_meta
#2293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade rules_scala and rules_meta
#2293
Conversation
e8b3dc6 to
c00c23b
Compare
…eps (#2290) Summary: Upgrade Bazel from 6.2.0 to 6.5.0 along with protobuf, tensorflow, and related dependencies. This is a coordinated upgrade since these dependencies have hard interdependencies that make incremental upgrades difficult. Key changes - Upgrade Bazel from 6.2.0 to 6.5.0 (required by these new dependencies) - Protobuf upgrade with compatibility patches for text format handling and JavaScript generation - TensorFlow upgrade with patches to disable GPU/LLVM/Python features. The GPU disable patch will not be necessary as TensorFlow's fallback logic will work with Bazel 7 - gRPC-web upgrade to 2.0.2 and replacement of the vendored `protoc-gen-grpc-web` with a Bazel repository - Flatbuffers patched to remove rules_js dependency (this upgrade is required by TensorFlow v2.20.0) - absl upgrade (causes transitive header changes) - Regenerated TypeScript protobuf bindings for the UI I attempted to split this into a smaller change in #2296. TensorFlow has a tight dependency on protobuf, which prevented that attempt from working. I'm open to other ideas on how to split this up, but so far this seemed like the best balance with #2293 and #2297 to follow to complete the Bazel 7 migration. Relevant Issues: #2282 Type of change: /kind cleanup Test Plan: Build passes --------- Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com> (cherry picked from commit 430eb96)
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
9d9119a to
5613047
Compare
| REPOSITORY_LOCATIONS["with_cfg.bzl"] = dict( | ||
| sha256 = "c7af6227d24499438fa0bb96fe4034e163d8c807b06f7c0645f3654448268b84", | ||
| strip_prefix = "with_cfg.bzl-0.11.0", | ||
| urls = ["https://github.com/fmeum/with_cfg.bzl/releases/download/v0.11.0/with_cfg.bzl-v0.11.0.tar.gz"], | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason not to stick it inline above? you might need to quote the key I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the dict() function expects the key (kwarg) to be a valid identifier. Since with_cfg.bzl contains a period, I wasn't able to get this to work another way.
I was going to start moving dependencies to bzlmod after #2297 and this was one of the dependencies I intended to move initially. So this will get cleaned up quickly.
7ff4375 to
5613047
Compare
| return rule( | ||
| name = "sysroot_{variant}_image".format(variant = variant), | ||
| implementation = _impl, | ||
| attrs = dicts.add(_container.image.attrs, { | ||
| "default_image": attr.label(mandatory = True, doc = "Default container_image to use if no sysroot toolchain is found"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change fixes the following error:
root@px-dev-docker-hacksaw:/px/src/px.dev/pixie# bazel build @com_github_iovisor_bpftrace//:bpftrace --verbose_failures
ERROR: Traceback (most recent call last):
File "/px/src/px.dev/pixie/bazel/cc_toolchains/sysroots/images.bzl", line 82, column 55, in <toplevel>
sysroot_runtime_image = _sysroot_variant_image_factory("runtime")
File "/px/src/px.dev/pixie/bazel/cc_toolchains/sysroots/images.bzl", line 67, column 16, in _sysroot_variant_image_factory
return rule(
Error in rule: in call to rule(), parameter 'name' is deprecated and will be removed soon. It may be temporarily re-enabled by setting --incompatible_remove_rule_name_parameter=false
ERROR: /root/.cache/bazel/_bazel_root/54060b0ed2e63c063d495ae4fb1a7d19/external/com_github_iovisor_bcc/BUILD.bazel:27:6: error loading package '': initialization of module 'bazel/cc_toolchains/sysroots/images.bzl' failed and referenced by '@com_github_iovisor_bcc//:bcc'
ERROR: /root/.cache/bazel/_bazel_root/54060b0ed2e63c063d495ae4fb1a7d19/external/com_github_iovisor_bpftrace/BUILD.bazel:27:6: error loading package '': initialization of module 'bazel/cc_toolchains/sysroots/images.bzl' failed and referenced by '@com_github_iovisor_bpftrace//:bpftrace'
ERROR: Analysis of target '@com_github_iovisor_bpftrace//:bpftrace' failed; build aborted:
INFO: Elapsed time: 0.459s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
Summary: Upgrade rules scala and rules_meta
Relevant Issues: #2282
Type of change: /kind cleanup
Test Plan: Build succeeds