Skip to content

Commit

Permalink
Fix WORKSPACE in tests (#56)
Browse files Browse the repository at this point in the history
* maven_dependencies added to WORKSPACE

* io_bazel_rules_scala to rules_scala3

* zinc_3_3_migration to zinc_3_migration

* Dependencies.scala added

* 3rdparty BUILD files modified

* get rid of @annex_test

* workspace.bzl modified

* deps BUILD file mofified

* binary tests fixed

* compat tests fixed (almost)

* compile/logger tests fixed

* compile/srcjar tests fixed

* compile/xml tests fixed

* compile/logger tests fixed

* /dependencies tests fixed

* /deployjar tests fixed

* plugins/kind-projector tests fixed

* plugins/outputs tests fixed

* /providers tests fixed

* repl/simple tests fixed

* /resources tests fixed

* scala/scalaimport tests fixed

* /scala3 tests fixed

* strategy/worker_extra_flag tests fixed

* /tagging tests fixed

* munit updated

* compile/log_level deleted (no need)

* neverlink tests fixed

* compile/error tests fixed

* scala_deps.bzl edited

* WORKSPACE edited

* scalacopts/rule test fixed

* format/scalafmt tests fixed

* plugins/classpath tests fixed

* test-frameworks/munit/test fixed

* test-frameworks/munit/test fixed

* WORKSPACE

* WORKSPACE

* WORKSPACE edited

* WORKSPACE edited

* c++ version added

* remote_java_tools (experimental)

* java_runtime added

* return

---------

Co-authored-by: anna-skrodzka <annaskrod@h=gmail.com>
  • Loading branch information
anna-skrodzka and anna-skrodzka authored Nov 9, 2024
1 parent 52c4c8b commit 9a2d1c6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .bazelrc_shared
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
common --announce_rc
common --color=yes

build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17

build --host_platform=@rules_nixpkgs_core//platforms:host

build --experimental_strict_action_env
Expand Down
14 changes: 0 additions & 14 deletions tests/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "default_java_toolchain")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_scala3//deps:scala_deps.bzl", "scala_deps")

Expand Down Expand Up @@ -37,16 +36,3 @@ proto_library(
"@com_google_protobuf//:descriptor_proto",
],
)

#default_java_toolchain(
# name = "toolchain_hostjdk16",
# configuration = dict(
# java_runtime = "@bazel_tools//tools/jdk:jdk",
# jvm_opts = ["-Xbootclasspath/p:$(location @remote_java_tools//:javac_jar)"],
# tools = ["@remote_java_tools//:javac_jar"],
# ),
# java_runtime = "@bazel_tools//tools/jdk:current_host_java_runtime",
# source_version = "16",
# target_version = "16",
# toolchain_definition = False,
#)
30 changes: 28 additions & 2 deletions tests/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,35 @@ http_archive(
url = "https://github.com/bazelbuild/rules_jvm_external/archive/{}.tar.gz".format(rules_jvm_external_tag),
)

protobuf_tag = "28.2"
bazel_skylib_tag = "1.5.0"

http_archive(
name = "bazel_skylib",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{tag}/bazel-skylib-{tag}.tar.gz".format(tag = bazel_skylib_tag),
"https://github.com/bazelbuild/bazel-skylib/releases/download/{tag}/bazel-skylib-{tag}.tar.gz".format(tag = bazel_skylib_tag),
],
)

rules_python_version = "0.37.2"

http_archive(
name = "rules_python",
sha256 = "c6fb25d0ba0246f6d5bd820dd0b2e66b339ccc510242fd4956b9a639b548d113",
strip_prefix = "rules_python-" + rules_python_version,
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/{0}.tar.gz".format(rules_python_version),
)

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

py_repositories()

protobuf_tag = "28.3"

http_archive(
name = "com_google_protobuf",
sha256 = "b2340aa47faf7ef10a0328190319d3f3bee1b24f426d4ce8f4253b6f27ce16db",
sha256 = "7c3ebd7aaedd86fa5dc479a0fda803f602caaf78d8aff7ce83b89e1b8ae7442a",
strip_prefix = "protobuf-" + protobuf_tag,
url = "https://github.com/protocolbuffers/protobuf/archive/v{}.tar.gz".format(protobuf_tag),
)
Expand Down Expand Up @@ -96,6 +120,8 @@ load("//3rdparty:workspace.bzl", "maven_dependencies")

maven_dependencies()

register_toolchains("@rules_scala3//rules/scala_proto:scalapb_scala_proto_toolchain")

bind(
name = "default_scala",
actual = "@rules_scala3//scala:zinc_3_3",
Expand Down

0 comments on commit 9a2d1c6

Please sign in to comment.