Skip to content

Commit

Permalink
Merge pull request #149 from Snapchat/lf/bazel-linux-fixes
Browse files Browse the repository at this point in the history
Fix djinni scala build on Linux
  • Loading branch information
li-feng-sc authored Jul 11, 2023
2 parents 1c546f9 + 8a15e10 commit bb0fd60
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --cxxopt=-std=c++17 --incompatible_java_common_parameters=false --define=android_dexmerger_tool=d8_dexmerger --define=android_incremental_dexing_tool=d8_dexbuilder --nouse_workers_with_dexbuilder
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --incompatible_java_common_parameters=false --define=android_dexmerger_tool=d8_dexmerger --define=android_incremental_dexing_tool=d8_dexbuilder --nouse_workers_with_dexbuilder
16 changes: 11 additions & 5 deletions bzl/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ def djinni_deps():
],
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
)
rules_scala_version = "e7a948ad1948058a7a5ddfbd9d1629d6db839933"
rules_scala_version = "5.0.0"
maybe(
name = "io_bazel_rules_scala",
repo_rule = http_archive,
strip_prefix = "rules_scala-{}".format(rules_scala_version),
type = "zip",
url = "https://github.com/bazelbuild/rules_scala/archive/{}.zip".format(rules_scala_version),
sha256 = "76e1abb8a54f61ada974e6e9af689c59fd9f0518b49be6be7a631ce9fa45f236",
url = "https://github.com/bazelbuild/rules_scala/archive/refs/tags/v{}.tar.gz".format(rules_scala_version),
sha256 = "141a3919b37c80a846796f792dcf6ea7cd6e7b7ca4297603ca961cd22750c951",
)
protobuf_version = "3.12.4"
maybe(
Expand All @@ -32,7 +31,14 @@ def djinni_deps():
strip_prefix = "protobuf-{}".format(protobuf_version),
sha256 = "512e5a674bf31f8b7928a64d8adf73ee67b8fe88339ad29adaa3b84dbaa570d8",
)

rules_proto_version = "5.3.0-21.7"
maybe(
name = "rules_proto",
repo_rule = http_archive,
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
strip_prefix = "rules_proto-{}".format(rules_proto_version),
url = "https://github.com/bazelbuild/rules_proto/archive/refs/tags/{}.tar.gz".format(rules_proto_version)
)
rules_jvm_external_tag = "3.0"
maybe(
name = "rules_jvm_external",
Expand Down
4 changes: 4 additions & 0 deletions bzl/setup_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

def djinni_setup_deps():
bazel_skylib_workspace()

rules_proto_dependencies()
rules_proto_toolchains()

scala_register_toolchains()
scala_repositories()

Expand Down
2 changes: 1 addition & 1 deletion external-test/.bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --incompatible_java_common_parameters=false
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --incompatible_java_common_parameters=false --define=android_dexmerger_tool=d8_dexmerger --define=android_incremental_dexing_tool=d8_dexbuilder --nouse_workers_with_dexbuilder
2 changes: 1 addition & 1 deletion external-test/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.0
5.4.1
1 change: 1 addition & 0 deletions test-suite/handwritten-src/cpp/data_helpers.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "DataRefTest.hpp"
#include <algorithm>

namespace testsuite {

Expand Down

0 comments on commit bb0fd60

Please sign in to comment.