mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 00:35:25 +03:00
Update rules_scala (#11616)
* Update rules_scala Two patches have since been upstreamed and can be removed. changelog_begin changelog_end * JMH deps were moved into a toolchain https://github.com/bazelbuild/rules_scala/pull/1106 changelog_begin changelog_end Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
This commit is contained in:
parent
f4689691ca
commit
a9de728575
@ -1,29 +0,0 @@
|
|||||||
diff --git a/src/java/io/bazel/rulesscala/exe/LauncherFileWriter.java b/src/java/io/bazel/rulesscala/exe/LauncherFileWriter.java
|
|
||||||
index 9fd8f9f..c14fb41 100644
|
|
||||||
--- a/src/java/io/bazel/rulesscala/exe/LauncherFileWriter.java
|
|
||||||
+++ b/src/java/io/bazel/rulesscala/exe/LauncherFileWriter.java
|
|
||||||
@@ -30,7 +30,7 @@ public class LauncherFileWriter {
|
|
||||||
.addKeyValuePair("binary_type", "Java")
|
|
||||||
.addKeyValuePair("workspace_name", workspaceName)
|
|
||||||
.addKeyValuePair("symlink_runfiles_enabled", "0")
|
|
||||||
- .addKeyValuePair("java_bin_path", workspaceName + "/" + javaBinPath)
|
|
||||||
+ .addKeyValuePair("java_bin_path", fullJavaBinPath(workspaceName, Paths.get(javaBinPath)).toString())
|
|
||||||
.addKeyValuePair("jar_bin_path", jarBinPath)
|
|
||||||
.addKeyValuePair("java_start_class", javaStartClass)
|
|
||||||
.addKeyValuePair("classpath", classpath)
|
|
||||||
@@ -52,4 +52,15 @@ public class LauncherFileWriter {
|
|
||||||
out.flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ private static Path fullJavaBinPath(String workspaceName, Path javaBinPath) {
|
|
||||||
+ if (javaBinPath.isAbsolute()) {
|
|
||||||
+ return javaBinPath;
|
|
||||||
+ } else if (javaBinPath.startsWith(Paths.get("external"))) {
|
|
||||||
+ // Paths under `external/` already have a workspace name.
|
|
||||||
+ return javaBinPath;
|
|
||||||
+ } else {
|
|
||||||
+ return Paths.get(workspaceName).resolve(javaBinPath);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
diff --git a/scala/private/rules/scala_test.bzl b/scala/private/rules/scala_test.bzl
|
|
||||||
index e244812..fe8fe9e 100644
|
|
||||||
--- a/scala/private/rules/scala_test.bzl
|
|
||||||
+++ b/scala/private/rules/scala_test.bzl
|
|
||||||
@@ -127,6 +127,7 @@ def scala_test_suite(
|
|
||||||
srcs = [],
|
|
||||||
visibility = None,
|
|
||||||
use_short_names = False,
|
|
||||||
+ tags = [],
|
|
||||||
**kwargs):
|
|
||||||
ts = []
|
|
||||||
i = 0
|
|
||||||
@@ -138,7 +139,8 @@ def scala_test_suite(
|
|
||||||
srcs = [test_file],
|
|
||||||
visibility = visibility,
|
|
||||||
unused_dependency_checker_mode = "off",
|
|
||||||
+ tags = tags,
|
|
||||||
**kwargs
|
|
||||||
)
|
|
||||||
ts.append(n)
|
|
||||||
- native.test_suite(name = name, tests = ts, visibility = visibility)
|
|
||||||
+ native.test_suite(name = name, tests = ts, visibility = visibility, tags = tags)
|
|
@ -128,8 +128,6 @@ def daml_deps():
|
|||||||
sha256 = rules_scala_sha256,
|
sha256 = rules_scala_sha256,
|
||||||
patches = [
|
patches = [
|
||||||
"@daml//bazel_tools:scala-escape-jvmflags.patch",
|
"@daml//bazel_tools:scala-escape-jvmflags.patch",
|
||||||
# Remove once https://github.com/bazelbuild/rules_scala/pull/1313 is merged
|
|
||||||
"@daml//bazel_tools:rules_scala_java_bin_path.patch",
|
|
||||||
],
|
],
|
||||||
patch_args = ["-p1"],
|
patch_args = ["-p1"],
|
||||||
)
|
)
|
||||||
|
8
deps.bzl
8
deps.bzl
@ -30,8 +30,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file"
|
|||||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
||||||
|
|
||||||
rules_scala_version = "67a7ac178a73d1d5ff4c2b0663a8eda6dfcbbc56"
|
rules_scala_version = "e4560ac332e9da731c1e50a76af2579c55836a5c"
|
||||||
rules_scala_sha256 = "95054009fd938ac7ef53a20619f94a5408d8ae74eb5b318cd150a3ecb1a6086f"
|
rules_scala_sha256 = "ccf19e8f966022eaaca64da559c6140b23409829cb315f2eff5dc3e757fb6ad8"
|
||||||
|
|
||||||
rules_haskell_version = "673e74aea244a6a9ee1eccec719677c80348aebf"
|
rules_haskell_version = "673e74aea244a6a9ee1eccec719677c80348aebf"
|
||||||
rules_haskell_sha256 = "73a06dc6e0d928ceeab64e2cd3159f863eb2e263ecc64d79e3952c770cd1ee51"
|
rules_haskell_sha256 = "73a06dc6e0d928ceeab64e2cd3159f863eb2e263ecc64d79e3952c770cd1ee51"
|
||||||
@ -148,10 +148,6 @@ def daml_deps():
|
|||||||
sha256 = rules_scala_sha256,
|
sha256 = rules_scala_sha256,
|
||||||
patches = [
|
patches = [
|
||||||
"@com_github_digital_asset_daml//bazel_tools:scala-escape-jvmflags.patch",
|
"@com_github_digital_asset_daml//bazel_tools:scala-escape-jvmflags.patch",
|
||||||
# Remove once https://github.com/bazelbuild/rules_scala/pull/1261 is merged
|
|
||||||
"@com_github_digital_asset_daml//bazel_tools:rules_scala_suite_tags.patch",
|
|
||||||
# Remove once https://github.com/bazelbuild/rules_scala/pull/1313 is merged
|
|
||||||
"@com_github_digital_asset_daml//bazel_tools:rules_scala_java_bin_path.patch",
|
|
||||||
],
|
],
|
||||||
patch_args = ["-p1"],
|
patch_args = ["-p1"],
|
||||||
)
|
)
|
||||||
|
@ -24,7 +24,6 @@ da_scala_library(
|
|||||||
"//bazel_tools/runfiles:scala_runfiles",
|
"//bazel_tools/runfiles:scala_runfiles",
|
||||||
"//daml-lf/archive:daml_lf_archive_reader",
|
"//daml-lf/archive:daml_lf_archive_reader",
|
||||||
"//daml-lf/data",
|
"//daml-lf/data",
|
||||||
"//external:io_bazel_rules_scala/dependency/jmh/jmh_core",
|
|
||||||
"//language-support/scala/bindings",
|
"//language-support/scala/bindings",
|
||||||
"//ledger-api/rs-grpc-akka",
|
"//ledger-api/rs-grpc-akka",
|
||||||
"//ledger-api/rs-grpc-bridge",
|
"//ledger-api/rs-grpc-bridge",
|
||||||
@ -48,6 +47,7 @@ da_scala_library(
|
|||||||
"//libs-scala/resources",
|
"//libs-scala/resources",
|
||||||
"//libs-scala/resources-akka",
|
"//libs-scala/resources-akka",
|
||||||
"//libs-scala/resources-grpc",
|
"//libs-scala/resources-grpc",
|
||||||
|
"@io_bazel_rules_scala//jmh:jmh_core",
|
||||||
"@maven//:ch_qos_logback_logback_classic",
|
"@maven//:ch_qos_logback_logback_classic",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user