Skip to content

Commit

Permalink
Merge branch 'master' into bzlmod
Browse files Browse the repository at this point in the history
Incorporates:

- bazelbuild#1619
- bazelbuild#1620

Removes --noenable_bzlmod from .bazelrc
  • Loading branch information
mbland committed Oct 8, 2024
2 parents b9aea94 + cd22d88 commit d332ddd
Show file tree
Hide file tree
Showing 29 changed files with 197 additions and 31 deletions.
13 changes: 7 additions & 6 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ tasks:
shell_commands:
# Install xmllint
- sudo apt update && sudo apt install --reinstall libxml2-utils -y
- echo "build --enable_workspace" >> .bazelrc
- "./test_rules_scala.sh || buildkite-agent annotate --style 'warning' \"Optional build with latest Bazel version failed, [see here](${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}) (It is not mandatory but worth checking)\""
test_rules_scala_macos:
name: "./test_rules_scala"
Expand All @@ -47,16 +48,16 @@ tasks:
platform: windows
shell_commands:
- "bash test_rules_scala.sh"
test_coverage_linux_6_3_0:
test_coverage_linux_6_5_0:
name: "./test_coverage"
platform: ubuntu2004
bazel: 6.3.0
bazel: 6.5.0
shell_commands:
- "./test_coverage.sh"
test_coverage_macos_6.3.0:
test_coverage_macos_6.5.0:
name: "./test_coverage"
platform: macos
bazel: 6.3.0
bazel: 6.5.0
shell_commands:
- "./test_coverage.sh"
test_reproducibility_linux:
Expand All @@ -82,13 +83,13 @@ tasks:
examples_linux:
name: "./test_examples"
platform: ubuntu2004
bazel: 6.3.0
bazel: 6.5.0
shell_commands:
- "./test_examples.sh"
cross_build_linux:
name: "./test_cross_build"
platform: ubuntu2004
bazel: 6.3.0
bazel: 6.5.0
shell_commands:
- "./test_cross_build.sh"
lint_linux:
Expand Down
7 changes: 3 additions & 4 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 14 additions & 16 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

_build_tools_release = "5.1.0"

http_archive(
Expand Down Expand Up @@ -127,10 +138,10 @@ format_repositories()

http_archive(
name = "io_bazel_rules_go",
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
],
)

Expand All @@ -144,19 +155,6 @@ go_rules_dependencies()

go_register_toolchains(version = "1.19.5")

# Explicitly pull in a different (newer) version of rules_java for remote jdks
rules_java_extra_version = "5.1.0"

rules_java_extra_sha = "d974a2d6e1a534856d1b60ad6a15e57f3970d8596fbb0bb17b9ee26ca209332a"

rules_java_extra_url = "https://github.com/bazelbuild/rules_java/releases/download/{}/rules_java-{}.tar.gz".format(rules_java_extra_version, rules_java_extra_version)

http_archive(
name = "rules_java_extra",
sha256 = rules_java_extra_sha,
url = rules_java_extra_url,
)

load("@rules_java//java:repositories.bzl", "remote_jdk8_repos")

# We need to select based on platform when we use these
Expand Down
11 changes: 11 additions & 0 deletions dt_patches/test_dt_patches/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../..",
Expand Down
11 changes: 11 additions & 0 deletions dt_patches/test_dt_patches_user_srcjar/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../..",
Expand Down
3 changes: 3 additions & 0 deletions examples/crossbuild/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions examples/crossbuild/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../..",
Expand Down
3 changes: 3 additions & 0 deletions examples/scala3/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions examples/scala3/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../..",
Expand Down
3 changes: 3 additions & 0 deletions examples/semanticdb/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions examples/semanticdb/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../..",
Expand Down
4 changes: 4 additions & 0 deletions examples/testing/multi_frameworks_toolchain/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
build --enable_platform_specific_config
windows:build --enable_runfiles

# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions examples/testing/multi_frameworks_toolchain/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../../..",
Expand Down
3 changes: 3 additions & 0 deletions examples/testing/scalatest_repositories/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions examples/testing/scalatest_repositories/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../../..",
Expand Down
6 changes: 5 additions & 1 deletion examples/testing/specs2_junit_repositories/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
build --enable_platform_specific_config
windows:build --enable_runfiles
windows:build --enable_runfiles

# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions examples/testing/specs2_junit_repositories/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../../..",
Expand Down
4 changes: 2 additions & 2 deletions scala/private/macros/scala_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ def rules_scala_setup(scala_compiler_srcjar = None):
http_archive(
name = "rules_java",
urls = [
"https://github.com/bazelbuild/rules_java/releases/download/5.4.1/rules_java-5.4.1.tar.gz",
"https://github.com/bazelbuild/rules_java/releases/download/7.9.0/rules_java-7.9.0.tar.gz",
],
sha256 = "a1f82b730b9c6395d3653032bd7e3a660f9d5ddb1099f427c1e1fe768f92e395",
sha256 = "41131de4417de70b9597e6ebd515168ed0ba843a325dc54a81b92d7af9a7b3ea",
)

if not native.existing_rule("rules_proto"):
Expand Down
2 changes: 1 addition & 1 deletion scala/private/rules/scala_repl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def make_scala_repl(*extras):
*[extra["outputs"] for extra in extras if "outputs" in extra]
),
toolchains = [
"//scala:toolchain_type",
Label("//scala:toolchain_type"),
"@bazel_tools//tools/jdk:toolchain_type",
],
cfg = scala_version_transition,
Expand Down
2 changes: 1 addition & 1 deletion test/proto_cross_repo_boundary/repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ def proto_cross_repo_boundary_repository():
native.new_local_repository(
name = "proto_cross_repo_boundary",
path = "test/proto_cross_repo_boundary/repo",
build_file = "test/proto_cross_repo_boundary/repo/BUILD.repo",
build_file = "//test/proto_cross_repo_boundary:repo/BUILD.repo",
)
3 changes: 3 additions & 0 deletions test_cross_build/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions test_cross_build/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

http_archive(
name = "rules_proto",
sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",
Expand Down
3 changes: 3 additions & 0 deletions test_version/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions test_version/WORKSPACE.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

http_archive(
name = "rules_proto",
sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",
Expand Down
3 changes: 3 additions & 0 deletions third_party/test/example_external_workspace/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
11 changes: 11 additions & 0 deletions third_party/test/example_external_workspace/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ http_archive(
],
)

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

local_repository(
name = "io_bazel_rules_scala",
path = "../../..",
Expand Down
3 changes: 3 additions & 0 deletions third_party/test/proto/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Remove upon completing Bzlmod compatibility work.
# - https://github.com/bazelbuild/rules_scala/issues/1482
build --noenable_bzlmod
Loading

0 comments on commit d332ddd

Please sign in to comment.