Skip to content

Commit

Permalink
Reactive canton conformance test aginst LF 1.13 (#10458)
Browse files Browse the repository at this point in the history
Now we compile the conformance test for 1.13, we can run conton
against 1.13.

follow up of #10456

CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
remyhaemmerle-da authored Aug 2, 2021
1 parent db7728a commit 1971274
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 33 deletions.
24 changes: 10 additions & 14 deletions daml-lf/encoder/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ load(
"//daml-lf/language:daml-lf.bzl",
"ENCODER_LF_VERSIONS",
"lf_version_configuration",
"lf_version_configuration_versions",
"mangle_for_java",
)

Expand Down Expand Up @@ -129,38 +128,35 @@ da_scala_binary(
[
[
genrule(
name = "testing-dar-lookup-scala-%s" % lf_version,
outs = ["TestDars-%s.scala" % mangle_for_java(lf_version)],
name = "testing-dar-lookup-scala-%s" % keyword,
outs = ["TestDars-%s.scala" % mangle_for_java(keyword)],
cmd = """
cat > $@ <<EOF
package com.daml.lf.archive.testing
object TestDar {
val fileName = \"daml-lf/encoder/test-%s.dar\"
}
EOF
""" % lf_version,
""" % version,
),
da_scala_library(
name = "testing-dar-lookup-lib-%s" % lf_version,
srcs = ["testing-dar-lookup-scala-%s" % lf_version],
name = "testing-dar-lookup-lib-%s" % keyword,
srcs = ["testing-dar-lookup-scala-%s" % keyword],
# generated_srcs is required for scaladocF
generated_srcs = ["testing-dar-lookup-scala-%s" % lf_version],
generated_srcs = ["testing-dar-lookup-scala-%s" % keyword],
visibility = ["//visibility:public"],
),
]
for lf_version in lf_version_configuration_versions
for (keyword, version) in lf_version_configuration.items()
if keyword in ["latest"]
]

[
alias(
name = "testing-dar%s-%s" % (name, keyword),
actual = ":testing-dar%s-%s" % (name, version),
name = "testing-dar-%s" % keyword,
actual = ":testing-dar-%s" % version,
visibility = ["//visibility:public"],
)
for name in [
"",
"-lookup-lib",
]
for (keyword, version) in lf_version_configuration.items()
]

Expand Down
8 changes: 4 additions & 4 deletions daml-lf/language/daml-lf.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# The following dictionary alias LF versions to keywords:
# - "legacy" is the keyword for last LF version that supports legacy
# contract ID scheme,
# - "no-exceptions" is a keyword for the last version that does not
# support exceptions (can be dropped without notice),
# - "default" is the keyword for the default compiler output,
# - "latest" is the keyword for the latest stable LF version,
# - "preview" is the keyword fort he next LF version, *not stable*,
Expand All @@ -18,16 +20,14 @@

lf_version_configuration = {
"legacy": "1.8",
# TODO (MK) Drop no-exception once Canton fully supports exceptions.
"no-exceptions": "1.13",
"default": "1.14",
"latest": "1.14",
"dev": "1.dev",
}

# TODO (MK) Drop 1.13 once Canton fully supports exceptions.
test_tool_lf_version_configuration = dict({"no-exceptions": "1.13"}, **lf_version_configuration)

lf_version_configuration_versions = depset(lf_version_configuration.values()).to_list()
test_tool_lf_version_configuration_versions = depset(test_tool_lf_version_configuration.values()).to_list()

# aggregates a list of version keywords and versions:
# 1. converts keyword in version
Expand Down
4 changes: 2 additions & 2 deletions ledger/ledger-api-test-tool-on-canton/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ conformance_test(
"@jdk11_nix//:bin/java",
],
lf_versions = [
"legacy",
"no-exceptions",
# FIXME: replace the previous line by the following ones once canton-test-runner supports LF 1.14
# "default",
# "latest",
Expand Down Expand Up @@ -105,7 +105,7 @@ conformance_test(
"@jdk11_nix//:bin/java",
],
lf_versions = [
"legacy",
"no-exceptions",
# FIXME: replace the previous line by the following ones once canton-test-runner supports LF 1.14
# "default",
# "latest",
Expand Down
4 changes: 2 additions & 2 deletions ledger/ledger-api-test-tool/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ load(
)
load(
"//daml-lf/language:daml-lf.bzl",
lf_version_configuration = "test_tool_lf_version_configuration",
lf_version_configuration_versions = "test_tool_lf_version_configuration_versions",
"lf_version_configuration",
"lf_version_configuration_versions",
)
load(
"//bazel_tools:scala.bzl",
Expand Down
4 changes: 0 additions & 4 deletions ledger/ledger-api-test-tool/util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ load(
"//daml-lf/language:daml-lf.bzl",
"versions",
)
load(
"//daml-lf/language:daml-lf.bzl",
"lf_version_configuration",
)

exceptions_suites = [
"src/main/scala/com/daml/ledger/api/testtool/suites/ExceptionsIT.scala",
Expand Down
5 changes: 0 additions & 5 deletions ledger/sandbox-classic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ load(
load("//ledger/ledger-api-test-tool:conformance.bzl", "server_conformance_test")
load("@os_info//:os_info.bzl", "is_windows")
load("@build_environment//:configuration.bzl", "mvn_version")
load(
"//daml-lf/language:daml-lf.bzl",
"lf_version_configuration",
"lf_version_configuration_versions",
)

alias(
name = "sandbox-classic",
Expand Down
4 changes: 2 additions & 2 deletions ledger/test-common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ load("@scala_version//:index.bzl", "scala_major_version")
load("@scala_version//:index.bzl", "scala_major_version")
load(
"//daml-lf/language:daml-lf.bzl",
lf_version_configuration = "test_tool_lf_version_configuration",
lf_version_configuration_versions = "test_tool_lf_version_configuration_versions",
"lf_version_configuration",
"lf_version_configuration_versions",
)
load("//ledger/test-common:test-common.bzl", "da_scala_dar_resources_library")

Expand Down

0 comments on commit 1971274

Please sign in to comment.