-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fixes for future Bazel changes #2
Comments
Thanks for the heads up - We seems to be hitting this one:
but there is no context in the error message due to which rule this is. A quick search show 3 cases where we return a struct: $ find bazel -name "*.bzl" -exec grep -Hn "return struct" {} \;
bazel/build_rules/app_chart/run_sequentially.bzl:27: return struct(runfiles = ctx.runfiles(files = runfiles))
bazel/build_rules/app_chart/cache_gcr_credentials.bzl:24: return struct(runfiles = ctx.runfiles(files = runfiles))
bazel/build_rules/app_chart/run_parallel.bzl:26: return struct(runfiles = ctx.runfiles(files = runfiles)) but this does not match the examples in the bug I link to above. |
Sorry, I thought I replied to this earlier. Other flags should give you clearer error messages. |
Here is the latest |
This addresses use of single_file, and pulls in some changes to rules_python from upstream. This is a contribution to #2. I have also sent a pull request for bazel_rules: antonovvk/bazel_rules#2 There are many other failures, including: - java_grpc_library.bzl from grpc/grpc-java - protobuf.bzl from google/protobuf - rules_go - references to genfiles (this will be unified with `bin`). Change-Id: Ic6548244f0906cdbd53aed16017191b6db8cd553 GitOrigin-RevId: daa70bc
Fixes #5822 RELNOTES: --incompatible_disallow_old_style_args_add is enabled by default. PiperOrigin-RevId: 235053596
With the recent fixes, it makes this repository compatible with Bazel flag `--incompatible_disallow_old_style_args_add` Progress towards #2 Closes #5 #5 ORIGINAL_AUTHOR=Laurent Le Brun <[email protected]> GitOrigin-RevId: 0e362c4 Change-Id: I96a7a45b4383d053e9177f05ad5870646a83827d
A lot of our problems come from grpc/grpc-java, which doesn't appear to be on the Bazel CI, and protobuf, which should be better when 3.7.0 is released. In the long run, we should push for grpc-java to be added to the Bazel CI so they get notified directly. |
Yes, some problems are caused by grpc-java (grpc/grpc-java#5383). |
Due to a change in how the dependencies work, we need to be careful to load go_repository from deps.bzl, not def.bzl: bazel-contrib/rules_go#1933 Additionally, Gazelle 0.17.0 seems to find the dependencies in src/.gopath, so I've added a gazelle:ignore directive for them. At the same time, I've added the path to .bazelignore, so that Bazel doesn't try to build or run files in there. This pulls in some Bazel compatibility fixes (#2). Change-Id: Ic215ca30c0e6bb438e8fff134e439e4e4a032879 GitOrigin-RevId: 8c7708b
For historical reasons, Bazel has two directories for generated files, although a future version of Bazel will remove the genfiles directory: bazelbuild/bazel#6761 Currently, rosmsg() copies all the source files (*.msg, *.srv) to the output directory, so that the directory structure matches the needs of ROS's codegen tools. It uses a hacky way of finding the paths to the transitive dependencies within the output directory, which includes a direct reference to genfiles. By using output_to_bindir=True, we can avoid the direct reference. Fixing the hack would involve rewriting the rosmsg() macro to use a rule, which wouldn't be too hard but might break compatibility. See #2. Change-Id: Ibae3451e1329e397329089aa6796c5477789c788 GitOrigin-RevId: e38ef5d
Based on our CI tests (https://buildkite.com/bazel/bazel-at-release-plus-incompatible-flags/builds/95), it looks like the project fails with the following flags:
--incompatible_new_actions_api
--incompatible_bzl_disallow_load_after_statement
--incompatible_no_support_tools_in_action_inputs
--incompatible_merge_genfiles_directory
--incompatible_disable_deprecated_attr_params
--incompatible_no_transitive_loads
Let me know if you need help with this. The error messages should provide enough information (otherwise, check Bazel issue tracker on GitHub for extra information).
The text was updated successfully, but these errors were encountered: