Skip to content
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

More bazel --incompatible fixes (#161) #169

Merged
merged 5 commits into from
Dec 10, 2018

Conversation

mfarrugi
Copy link
Collaborator

@mfarrugi mfarrugi commented Dec 9, 2018

This gets us from

bazel-20 test //... --all_incompatible_changes --incompatible_disable_deprecated_attr_params=false --incompatible_depset_is_not_iterable=false --incompatible_depset_union=false --incompatible_new_actions_api=false

to

bazel-20 test  --all_incompatible_changes //... @examples//... --incompatible_disable_deprecated_attr_params=false --incompatible_new_actions_api=false

Remaining issues:

>> bazel-20 test  --all_incompatible_changes //... @examples//... --keep_going

INFO: Invocation ID: deecf474-694f-4adc-9995-b09b2a5fc850
DEBUG: /home/marco/.cache/bazel/_bazel_marco/4e38d4394f29c071904de81d6fb3e103/external/bazel_skylib/skylark_library.bzl:23:1: WARNING: skylark_library.bzl is deprecated and will go away in the future, please use bzl_library.bzl instead.                  
ERROR: /home/marco/.cache/bazel/_bazel_marco/4e38d4394f29c071904de81d6fb3e103/external/bazel_tools/tools/build_rules/test_rules.bzl:308:17: Traceback (most recent call last):                                                                                
        File "/home/marco/.cache/bazel/_bazel_marco/4e38d4394f29c071904de81d6fb3e103/external/bazel_tools/tools/build_rules/test_rules.bzl", line 306                                                                                                         
                rule(attrs = {"file": attr.label(mand...))}, <3 more arguments>)
        File "/home/marco/.cache/bazel/_bazel_marco/4e38d4394f29c071904de81d6fb3e103/external/bazel_tools/tools/build_rules/test_rules.bzl", line 308, in rule                                                                                                
                attr.label(mandatory = True, allow_files = Tr..., ...)
'single_file' is no longer supported. use allow_single_file instead. You can use --incompatible_disable_deprecated_attr_params to temporarily disable this check.                                                                                             
ERROR: error loading package 'test': Extension file 'tools/build_rules/test_rules.bzl' has errors

Does it make sense that there are errors in @bazel_tools?

)

output_dir = ctx.actions.declare_directory(ctx.label.name)
args = ctx.actions.args()
args.add(crate.root.path)
args.add("--crate-name", crate.name)
args.add("--output", output_dir)
args.add("--output", output_dir.path)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a separate breakage

@@ -2,9 +2,6 @@
The rust_toolchain rule definition and implementation.
"""

def _get_files(labels):
return [f for l in labels for f in getattr(l, "files", [])]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear why this needed --incompatible_depset_is_not_iterable=false to work, but I refactored it out.

Copy link
Contributor

@laurentlb laurentlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@mfarrugi mfarrugi merged commit fc9988d into bazelbuild:master Dec 10, 2018
@mfarrugi mfarrugi deleted the marco-fix-incompatible branch October 19, 2020 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants