Skip to content

Commit

Permalink
Pin rules_cc
Browse files Browse the repository at this point in the history
  • Loading branch information
restingbull committed Nov 28, 2024
1 parent 5211745 commit ffce528
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
26 changes: 16 additions & 10 deletions src/main/starlark/core/repositories/download.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ def kt_download_local_dev_dependencies():
Must be called before setup_dependencies in the versions.WORKSPACE.
"""

versions.use_repository(
name = "rules_proto",
version = versions.RULES_PROTO,
rule = rules_stardoc_repository,
starlark_packages = [
"proto",
"proto/private",
],
)

versions.use_repository(
rule = http_archive,
name = "rules_cc",
version = versions.RULES_CC,
)

# bazel_skylib is initialized twice during development. This is intentional, as development
# needs to be able to run the starlark unittests, while production does not.
maybe(
Expand Down Expand Up @@ -99,16 +115,6 @@ def kt_download_local_dev_dependencies():
],
)

versions.use_repository(
name = "rules_proto",
version = versions.RULES_PROTO,
rule = rules_stardoc_repository,
starlark_packages = [
"proto",
"proto/private",
],
)

versions.use_repository(
name = "rules_testing",
rule = http_archive,
Expand Down
8 changes: 7 additions & 1 deletion src/main/starlark/core/repositories/setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ load("@cgrindel_bazel_starlib//:deps.bzl", "bazel_starlib_dependencies")
load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories")
load("@released_rules_kotlin//src/main/starlark/core/repositories:initialize.bzl", release_kotlin_repositories = "kotlin_repositories")
load("@rules_bazel_integration_test//bazel_integration_test:deps.bzl", "bazel_integration_test_rules_dependencies")
load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains")
load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
Expand Down Expand Up @@ -67,7 +68,12 @@ def kt_configure():
],
)

rules_proto_dependencies()
rules_cc_dependencies()
rules_cc_toolchains()

protobuf_deps()
protobuf_extra_deps()

rules_proto_toolchains()

rules_pkg_dependencies()
Expand Down
10 changes: 8 additions & 2 deletions src/main/starlark/core/repositories/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ versions = struct(
RULES_JVM_EXTERNAL_TAG = "5.3",
RULES_JVM_EXTERNAL_SHA = "d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac",
RULES_PROTO = version(
version = "5.3.0-21.7",
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
version = "7.0.2",
sha256 = "0e5c64a2599a6e26c6a03d6162242d231ecc0de219534c38cb4402171def21e8",
strip_prefix_template = "rules_proto-{version}",
url_templates = [
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/{version}.tar.gz",
Expand Down Expand Up @@ -167,5 +167,11 @@ versions = struct(
"https://github.com/cgrindel/bazel-starlib/releases/download/v{version}/bazel-starlib.v{version}.tar.gz",
],
),
RULES_CC = version(
version = "0.0.15",
url_templates = ["https://github.com/bazelbuild/rules_cc/releases/download/{version}/rules_cc-{version}.tar.gz"],
sha256 = "f4aadd8387f381033a9ad0500443a52a0cea5f8ad1ede4369d3c614eb7b2682e",
strip_prefix_template = "rules_cc-{version}",
),
use_repository = _use_repository,
)

0 comments on commit ffce528

Please sign in to comment.