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

Updated bazel_skylib to 1.1.1 #957

Merged
merged 5 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rust/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def rust_repositories(
maybe(
http_archive,
name = "bazel_skylib",
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
],
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
)

for exec_triple, name in DEFAULT_TOOLCHAIN_TRIPLES.items():
Expand Down
14 changes: 2 additions & 12 deletions test/unit/clippy/clippy_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ def _find_clippy_action(actions):

def _clippy_aspect_action_has_flag_impl(ctx, flags):
env = analysistest.begin(ctx)

# TODO: Replace with `analysistest.target_under_test(env)` upstream fix
# https://github.com/bazelbuild/bazel-skylib/pull/299
target = env.ctx.attr.target_under_test_with_aspect
target = analysistest.target_under_test(env)

clippy_action = _find_clippy_action(target.actions)

Expand Down Expand Up @@ -68,11 +65,7 @@ def _test_clippy_aspect_action_has_warnings_flag_test_impl(ctx):
def make_clippy_aspect_unittest(impl):
return analysistest.make(
impl,
attrs = {
# We can't just use target_under_test because we need to add our own aspect to the attribute.
# See https://github.com/bazelbuild/bazel-skylib/pull/299
"target_under_test_with_aspect": attr.label(aspects = [rust_clippy_aspect], mandatory = True),
},
extra_target_under_test_aspects = [rust_clippy_aspect],
)

binary_clippy_aspect_action_has_warnings_flag_test = make_clippy_aspect_unittest(_binary_clippy_aspect_action_has_warnings_flag_test_impl)
Expand All @@ -89,17 +82,14 @@ def clippy_test_suite(name):
binary_clippy_aspect_action_has_warnings_flag_test(
name = "binary_clippy_aspect_action_has_warnings_flag_test",
target_under_test = Label("//test/clippy:ok_binary"),
target_under_test_with_aspect = Label("//test/clippy:ok_binary"),
)
library_clippy_aspect_action_has_warnings_flag_test(
name = "library_clippy_aspect_action_has_warnings_flag_test",
target_under_test = Label("//test/clippy:ok_library"),
target_under_test_with_aspect = Label("//test/clippy:ok_library"),
)
test_clippy_aspect_action_has_warnings_flag_test(
name = "test_clippy_aspect_action_has_warnings_flag_test",
target_under_test = Label("//test/clippy:ok_test"),
target_under_test_with_aspect = Label("//test/clippy:ok_test"),
)

native.test_suite(
Expand Down