From ddc0791fa66deaf3d70925fbc8048e5b0e2fe999 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 5 Oct 2021 09:12:49 -0700 Subject: [PATCH] Remove dependency on rules_pkg from rules_cc This helps with getting rules_cc back to green. The distro package doesn't seem critical and it can be added back in a later CL once we figure out what is wrong with the rules_pkg dependency. RELNOTES:none PiperOrigin-RevId: 401001290 Change-Id: I94304c7df3597c84633952fb6013bd074c350122 --- .bazelci/presubmit.yml | 2 -- WORKSPACE | 13 ------------- distro/BUILD.bazel | 30 ------------------------------ distro/README.md | 11 ----------- internal_deps.bzl | 3 +-- internal_setup.bzl | 2 -- 6 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 distro/BUILD.bazel delete mode 100644 distro/README.md diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 680f7c2..a7e4da0 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -11,7 +11,6 @@ x_defaults: - "//cc:all" - "//cc/private/rules_impl:all" - "//cc/private/toolchain:all" - - "//distro:all" - "//examples:all" - "//examples/my_c_archive:all" - "//examples/my_c_compile:all" @@ -25,7 +24,6 @@ x_defaults: - "//cc:all" - "//cc/private/rules_impl:all" - "//cc/private/toolchain:all" - - "//distro:all" - "//examples:all" - "//examples/my_c_archive:all" - "//examples/my_c_compile:all" diff --git a/WORKSPACE b/WORKSPACE index ba32517..b5aa6eb 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,19 +2,6 @@ workspace(name = "rules_cc") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -http_archive( - name = "rules_pkg", - sha256 = "353b20e8b093d42dd16889c7f918750fb8701c485ac6cceb69a5236500507c27", - urls = [ - "https://github.com/bazelbuild/rules_pkg/releases/download/0.5.0/rules_pkg-0.5.0.tar.gz", - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.5.0/rules_pkg-0.5.0.tar.gz", - ], -) - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - http_archive( name = "bazel_federation", sha256 = "0d6893f0d18f417a3324ce7f0ed2e6e5b825d6d5ab42f0f3d7877cb313f36453", diff --git a/distro/BUILD.bazel b/distro/BUILD.bazel deleted file mode 100644 index 757e2ec..0000000 --- a/distro/BUILD.bazel +++ /dev/null @@ -1,30 +0,0 @@ -load("@rules_pkg//:pkg.bzl", "pkg_tar") -load("@rules_pkg//releasing:defs.bzl", "print_rel_notes") -load("//cc:version.bzl", "version") - -package( - default_visibility = ["//visibility:private"], -) - -# Build the artifact to put on the github release page. -pkg_tar( - name = "rules_cc-%s" % version, - srcs = [ - "//:distribution", - "//cc:distribution", - ], - extension = "tar.gz", - # It is all source code, so make it read-only. - mode = "0444", - # Make it owned by root so it does not have the uid of the CI robot. - owner = "0.0", - package_dir = ".", - strip_prefix = ".", -) - -print_rel_notes( - name = "relnotes", - outs = ["relnotes.txt"], - repo = "rules_cc", - version = version, -) diff --git a/distro/README.md b/distro/README.md deleted file mode 100644 index 086436c..0000000 --- a/distro/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Package rules_cc - -```bash -bazel build :relnotes -cat ../bazel-bin/distro/relnotes.txt -tar tzf ../bazel-bin/distro/rules_cc-*.tar.gz -``` - -- Create a new release -- Copy/paste relnotes.txt into the notes. Adjust as needed. -- Upload the tar.gz file as an artifact. diff --git a/internal_deps.bzl b/internal_deps.bzl index 9df5826..8373b10 100644 --- a/internal_deps.bzl +++ b/internal_deps.bzl @@ -14,7 +14,7 @@ """Dependencies that are needed for rules_cc tests and tools.""" -load("@bazel_federation//:repositories.bzl", "bazel_skylib", "protobuf", "rules_go", "rules_pkg", "rules_python") +load("@bazel_federation//:repositories.bzl", "bazel_skylib", "protobuf", "rules_go", "rules_python") load("@bazel_federation//:third_party_repositories.bzl", "abseil_py", "py_mock", "six", "zlib") def rules_cc_internal_deps(): @@ -22,7 +22,6 @@ def rules_cc_internal_deps(): bazel_skylib() protobuf() rules_go() - rules_pkg() rules_python() abseil_py() diff --git a/internal_setup.bzl b/internal_setup.bzl index 48b269d..709f4b1 100644 --- a/internal_setup.bzl +++ b/internal_setup.bzl @@ -14,7 +14,6 @@ """Setup for rules_cc tests and tools.""" -load("@bazel_federation//setup:rules_pkg.bzl", "rules_pkg_setup") load("@bazel_federation//setup:rules_python.bzl", "rules_python_setup") # TODO(fweikert): Add setup.bzl file for skylib to the federation and load it instead of workspace.bzl @@ -28,5 +27,4 @@ def rules_cc_internal_setup(): bazel_skylib_workspace() go_rules_dependencies() go_register_toolchains() - rules_pkg_setup() rules_python_setup()