LF: release LF 1.12 (#8856)

CHANGELOG_BEGIN

    - [LF] Release LF 1.12. This version reduce the size of transaction

    - [Compiler]: Change the default LF output from 1.8 to 1.11.

CHANGELOG_END
This commit is contained in:
Remy 2021-02-24 21:17:33 +01:00 committed by GitHub
parent 89cbd7d572
commit a9b035e92e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 183 additions and 126 deletions

View File

@ -398,7 +398,7 @@ def sdk_platform_test(sdk_version, platform_version):
# if the CI machine does not have enough entropy.
sandbox_args = ["sandbox", "--contract-id-seeding=testing-weak"]
sandbox_classic_args = ["sandbox-classic"]
sandbox_classic_args = ["sandbox-classic", "--contract-id-seeding=testing-weak"]
json_api_args = ["json-api"]
@ -476,7 +476,7 @@ def sdk_platform_test(sdk_version, platform_version):
runner = "@//bazel_tools/client_server:runner",
runner_args = ["6865"],
server = ":sandbox-with-postgres-{}".format(platform_version),
server_args = [platform_version, "sandbox-classic"],
server_args = [platform_version] + sandbox_classic_args,
server_files = ["$(rootpaths {dar_files})".format(
dar_files = dar_files,
)],

View File

@ -94,5 +94,5 @@ withSandbox assistant jdbcUrl f =
where
sandboxConfig = defaultSandboxConf
{ sandboxBinary = assistant
, sandboxArgs = ["sandbox-classic", "--jdbcurl=" <> T.unpack jdbcUrl]
, sandboxArgs = ["sandbox-classic", "--jdbcurl=" <> T.unpack jdbcUrl, "--contract-id-seeding=testing-weak"]
}

View File

@ -41,7 +41,7 @@ version1_12 = V1 $ PointStable 12
-- | The DAML-LF version used by default.
versionDefault :: Version
versionDefault = version1_8
versionDefault = version1_11
-- | The DAML-LF development version.
versionDev :: Version

View File

@ -102,6 +102,11 @@ toBoolExpr (ETmApp (ETmApp op e1) e2) = case op of
(ETyApp (EBuiltin BEGreaterEqNumeric) _) -> [BGtE e1 e2]
(ETyApp (EBuiltin BELessNumeric) _) -> [BLt e1 e2]
(ETyApp (EBuiltin BELessEqNumeric) _) -> [BLtE e1 e2]
(ETyApp (EBuiltin BEEqualGeneric) _) -> [BEq e1 e2]
(ETyApp (EBuiltin BEGreaterGeneric) _) -> [BGt e1 e2]
(ETyApp (EBuiltin BEGreaterEqGeneric) _) -> [BGtE e1 e2]
(ETyApp (EBuiltin BELessGeneric) _) -> [BLt e1 e2]
(ETyApp (EBuiltin BELessEqGeneric) _) -> [BLtE e1 e2]
_ -> trace ("Warning: Unmatched Expr to BoolExpr Operator: " ++ show op) []
toBoolExpr exp = trace ("Warning: Unmatched Expr to BoolExpr: " ++ show exp) []

View File

@ -146,14 +146,19 @@ instance ConstrExpr Expr where
builtin_op (ETyApp e _) = builtin_op e
builtin_op (EBuiltin op) = case op of
BEEqual _ -> COp OpEq
BEEqualGeneric -> COp OpEq
BEEqualNumeric -> COp OpEq
BEGreater _ -> COp OpGt
BEGreaterGeneric -> COp OpGt
BEGreaterNumeric -> COp OpGt
BEGreaterEq _ -> COp OpGtE
BEGreaterEqGeneric -> COp OpGtE
BEGreaterEqNumeric -> COp OpGtE
BELess _ -> COp OpLt
BELessGeneric -> COp OpLt
BELessNumeric -> COp OpLt
BELessEq _ -> COp OpLtE
BELessEqGeneric -> COp OpLtE
BELessEqNumeric -> COp OpLtE
BEAddInt64 -> CAdd
BEAddNumeric -> CAdd

View File

@ -113,7 +113,7 @@ functionalTests replClient replLogger serviceOut options ideState = describe "re
, matchServiceOutput "^.*: \\[\\]$"
, input "_ <- submit alice $ createCmd (T alice alice)"
, input "debug =<< query @T alice"
, matchServiceOutput "^.*: \\[\\(<contract-id>,T {proposer = '[^']+', accepter = '[^']+'}.*\\)\\]$"
, matchServiceOutput "^.*: \\[\\([0-9a-f]+,T {proposer = '[^']+', accepter = '[^']+'}.*\\)\\]$"
]
, testInteraction' "propose and accept"
[ input "alice <- allocateParty \"Alice\""
@ -121,11 +121,11 @@ functionalTests replClient replLogger serviceOut options ideState = describe "re
, input "_ <- submit alice $ createCmd (TProposal alice bob)"
, input "props <- query @TProposal bob"
, input "debug props"
, matchServiceOutput "^.*: \\[\\(<contract-id>,TProposal {proposer = '[^']+', accepter = '[^']+'}.*\\)\\]$"
, matchServiceOutput "^.*: \\[\\([0-9a-f]+,TProposal {proposer = '[^']+', accepter = '[^']+'}.*\\)\\]$"
, input "forA props $ \\(prop, _) -> submit bob $ exerciseCmd prop Accept"
, matchOutput "^\\[<contract-id>\\]$"
, matchOutput "^\\[[0-9a-f]+\\]$"
, input "debug =<< query @T bob"
, matchServiceOutput "^.*: \\[\\(<contract-id>,T {proposer = '[^']+', accepter = '[^']+'}.*\\)\\]$"
, matchServiceOutput "^.*: \\[\\([0-9a-f]+,T {proposer = '[^']+', accepter = '[^']+'}.*\\)\\]$"
, input "debug =<< query @TProposal bob"
, matchServiceOutput "^.*: \\[\\]$"
]

View File

@ -12,6 +12,8 @@ load(
"//daml-lf/language:daml-lf.bzl",
"ENCODER_LF_VERSIONS",
"lf_version_configuration",
"lf_version_configuration_versions",
"mangle_for_java",
)
da_scala_library(
@ -24,10 +26,7 @@ da_scala_library(
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts,
visibility = [
"//daml-lf:__subpackages__",
"//ledger:__subpackages__",
],
visibility = ["//visibility:public"],
deps = [
"//daml-lf/archive:daml_lf_archive_reader",
"//daml-lf/archive:daml_lf_dev_archive_proto_java",
@ -70,10 +69,7 @@ da_scala_binary(
srcs = glob(["src/main/scala/com/digitalasset/daml/lf/archive/testing/DamlLfEncoder.scala"]),
main_class = "com.daml.lf.archive.testing.DamlLfEncoder",
scalacopts = lf_scalacopts,
visibility = [
"//daml-lf:__subpackages__",
"//language-support:__subpackages__",
],
visibility = ["//visibility:public"],
deps = [
":encoder",
"//:sdk-version-scala-lib",
@ -107,11 +103,7 @@ da_scala_binary(
outs = ["test-%s.dar" % target],
cmd = "$(location :encoder_binary) $(SRCS) --output $@ --target %s" % target,
tools = [":encoder_binary"],
visibility = [
"//daml-lf:__subpackages__",
"//extractor:__subpackages__",
"//language-support:__subpackages__",
],
visibility = ["//visibility:public"],
),
sh_test(
name = "validate-dar-%s" % target,
@ -134,15 +126,45 @@ da_scala_binary(
]
[
filegroup(
name = "testing-dar-%s" % alias,
srcs = [":testing-dar-%s" % version],
visibility = [
"//daml-lf:__subpackages__",
"//extractor:__subpackages__",
"//language-support:__subpackages__",
"//ledger:__subpackages__",
],
)
for (alias, version) in lf_version_configuration.items()
[
genrule(
name = "testing-dar-lookup-scala-%s" % lf_version,
outs = ["TestDars-%s.scala" % mangle_for_java(lf_version)],
cmd = """
cat > $@ <<EOF
package com.daml.lf.archive.testing
object TestDar {
val fileName = \"daml-lf/encoder/test-%s.dar\"
}
EOF
""" % lf_version,
),
da_scala_library(
name = "testing-dar-lookup-lib-%s" % lf_version,
srcs = ["testing-dar-lookup-scala-%s" % lf_version],
# generated_srcs is required for scaladocF
generated_srcs = ["testing-dar-lookup-scala-%s" % lf_version],
visibility = ["//visibility:public"],
),
]
for lf_version in lf_version_configuration_versions
]
[
alias(
name = "testing-dar%s-%s" % (name, keyword),
actual = ":testing-dar%s-%s" % (name, version),
visibility = ["//visibility:public"],
)
for name in [
"",
"-lookup-lib",
]
for (keyword, version) in lf_version_configuration.items()
]
filegroup(
name = "testing-dars",
srcs = ["testing-dar-%s" % version for version in ENCODER_LF_VERSIONS],
visibility = ["//visibility:public"],
)

View File

@ -25,7 +25,7 @@ class EngineInfoTest extends AnyWordSpec with Matchers {
"DAML LF Engine supports LF versions: 1.6, 1.7, 1.8"
engineInfoStable.show shouldBe
"DAML LF Engine supports LF versions: 1.6, 1.7, 1.8, 1.11"
"DAML LF Engine supports LF versions: 1.6, 1.7, 1.8, 1.11, 1.12"
engineEarlyAccess.show shouldBe
"DAML LF Engine supports LF versions: 1.6, 1.7, 1.8, 1.11, 1.12"

View File

@ -9,9 +9,8 @@
# If exists "preview"'s value is guarantee to be different for all other values.
lf_version_configuration = {
"legacy": "1.8",
"stable": "1.8",
"latest": "1.11",
"preview": "1.12",
"stable": "1.11",
"latest": "1.12",
"dev": "1.dev",
}
@ -53,7 +52,13 @@ COMPILER_LF_VERSIONS = ENCODER_LF_VERSIONS
# We need Any in DAML Script so we require DAML-LF >= 1.7
SCRIPT_LF_VERSIONS = [ver for ver in COMPILER_LF_VERSIONS if ver != "1.6"]
LF_VERSION_PACKAGE_DIGITALASSET = {"1.6": "digitalasset", "1.7": "digitalasset", "1.8": "digitalasset", "1.11": "daml"}
LF_VERSION_PACKAGE_DIGITALASSET = {
"1.6": "digitalasset",
"1.7": "digitalasset",
"1.8": "digitalasset",
"1.11": "daml",
"1.12": "daml",
}
def lf_version_package(version):
return LF_VERSION_PACKAGE_DIGITALASSET.get(version, "daml")

View File

@ -57,7 +57,7 @@ object LanguageVersion {
// All the stable versions.
val StableVersions: VersionRange[LanguageVersion] =
VersionRange(min = v1_6, max = v1_11)
VersionRange(min = v1_6, max = v1_12)
// All versions compatible with legacy contract ID scheme.
val LegacyVersions: VersionRange[LanguageVersion] =
@ -66,7 +66,7 @@ object LanguageVersion {
// All the stable and preview versions
// Equals `Stable` if no preview version is available
val EarlyAccessVersions: VersionRange[LanguageVersion] =
StableVersions.copy(max = v1_12)
StableVersions
// All the versions
val DevVersions: VersionRange[LanguageVersion] =

View File

@ -219,6 +219,22 @@ Version: 1.11
+ **Add** choice observers.
Version: 1.12
.............
* Introduction date:
2021-01-2
* Description:
+ Drop type constructor in serialized variant and enumeration
values. Drop type constructor and field names in serialized record
values. See value version 12 in value specification for more
details
Version: 1.dev (development)
............................

View File

@ -179,7 +179,7 @@ later.
+--------------------+-----------------+
| 11 | 2021-01-19 |
+--------------------+-----------------+
| (preview) 12 | 2021-01-27 |
| 12 | 2021-01-27 |
+--------------------+-----------------+
| dev | 2020-12-14 |
+--------------------+-----------------+

View File

@ -158,7 +158,7 @@ later.
+--------------------+-----------------+
| 11 | 2021-01-19 |
+--------------------+-----------------+
| (preview) 12 | 2021-01-27 |
| 12 | 2021-01-27 |
+--------------------+-----------------+
| dev | 2019-12-14 |
+--------------------+-----------------+

View File

@ -1,63 +1,63 @@
transactions:
TX #0 1970-01-01T00:00:00Z [Test:48] version: 10
#0:0 version: 10
TX #0 1970-01-01T00:00:00Z [Test:48] version: 11
#0:0 version: 11
│ archived by #1:0
│ referenced by #1:0
│ known to (since): Alice (#0), Bob (#0)
└─> create Test:KeyOps@XXXXXXXX
with: { signatories = DA.Next.Set:Set@XXXXXXXX{ textMap = TextMap(Alice -> <unit>) }, counterParty = 'Bob' }
TX #1 1970-01-01T00:00:00Z [Test:49] version: 10
#1:0 version: 10
TX #1 1970-01-01T00:00:00Z [Test:49] version: 11
#1:0 version: 11
│ known to (since): Alice (#1), Bob (#1)
└─> Bob exercises Accept:Test:KeyOps@XXXXXXXX on 0066d7eab72b04d1ab3c24f2f3cb2a2d9266c2c2dc769c8b4699b6db3a4f56ec46
with { }
children:
#1:1 version: 10
#1:1 version: 11
│ referenced by #2:0, #3:0, #5:0
│ known to (since): Alice (#1), Bob (#1)
└─> create Test:KeyOps@XXXXXXXX
with: { signatories = DA.Next.Set:Set@XXXXXXXX{ textMap = TextMap(Alice -> <unit>, Bob -> <unit>) }, counterParty = 'Bob' }
TX #2 1970-01-01T00:00:00Z [Test:51] version: 10
#2:0 version: 10
TX #2 1970-01-01T00:00:00Z [Test:51] version: 11
#2:0 version: 11
│ known to (since): Alice (#2), Bob (#2)
└─> Alice exercises LookupGivenKey:Test:KeyOps@XXXXXXXX on 00541236708d6615d0586a50793ccd77d0bc2b7c51025df96ce743c2469c8d3c95
with { actor = 'Alice', keyMaintainers = DA.Next.Set:Set@XXXXXXXX{ textMap = TextMap(Alice -> <unit>) } }
children:
#2:1 version: 10
#2:1 version: 11
│ known to (since): Alice (#2), Bob (#2)
└─> lookup by key Test:BasicKey@XXXXXXXX
key { textMap = TextMap(Alice -> <unit>) }
not found
TX #3 1970-01-01T00:00:00Z [Test:54] version: 10
#3:0 version: 10
TX #3 1970-01-01T00:00:00Z [Test:54] version: 11
#3:0 version: 11
│ known to (since): Alice (#3), Bob (#3)
└─> Bob exercises LookupGivenKey:Test:KeyOps@XXXXXXXX on 00541236708d6615d0586a50793ccd77d0bc2b7c51025df96ce743c2469c8d3c95
with { actor = 'Bob', keyMaintainers = DA.Next.Set:Set@XXXXXXXX{ textMap = TextMap(Alice -> <unit>) } }
children:
#3:1 version: 10
#3:1 version: 11
│ known to (since): Alice (#3), Bob (#3)
└─> lookup by key Test:BasicKey@XXXXXXXX
key { textMap = TextMap(Alice -> <unit>) }
not found
TX #4 1970-01-01T00:00:00Z [Test:57] version: 10
#4:0 version: 10
TX #4 1970-01-01T00:00:00Z [Test:57] version: 11
#4:0 version: 11
│ referenced by #5:1
│ known to (since): Alice (#4)
└─> create Test:BasicKey@XXXXXXXX
with: { owners = DA.Next.Set:Set@XXXXXXXX{ textMap = TextMap(Alice -> <unit>) } }
key { textMap = TextMap(Alice -> <unit>) }
TX #5 1970-01-01T00:00:00Z [Test:59] version: 10
#5:0 version: 10
TX #5 1970-01-01T00:00:00Z [Test:59] version: 11
#5:0 version: 11
│ known to (since): Alice (#5), Bob (#5)
└─> Alice exercises LookupGivenKey:Test:KeyOps@XXXXXXXX on 00541236708d6615d0586a50793ccd77d0bc2b7c51025df96ce743c2469c8d3c95
with { actor = 'Alice', keyMaintainers = DA.Next.Set:Set@XXXXXXXX{ textMap = TextMap(Alice -> <unit>) } }
children:
#5:1 version: 10
#5:1 version: 11
│ known to (since): Alice (#5), Bob (#5)
└─> lookup by key Test:BasicKey@XXXXXXXX
key { textMap = TextMap(Alice -> <unit>) }

View File

@ -1,6 +1,6 @@
transactions:
TX #0 1970-01-01T00:00:00Z [Test:77] version: 10
#0:0 version: 10
TX #0 1970-01-01T00:00:00Z [Test:77] version: 11
#0:0 version: 11
│ archived by #8:0
│ referenced by #4:0, #5:0, #8:0
│ known to (since): Alice (#0), Bob (#0)
@ -14,48 +14,48 @@ mustFailAt actAs: {'Bob'} readAs: {} [Test:91]
mustFailAt actAs: {'Bob'} readAs: {} [Test:93]
TX #4 1970-01-01T00:00:00Z [Test:96] version: 10
#4:0 version: 10
TX #4 1970-01-01T00:00:00Z [Test:96] version: 11
#4:0 version: 11
│ known to (since): Alice (#4)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Alice', _2 = "some-key" }
found 0066d7eab72b04d1ab3c24f2f3cb2a2d9266c2c2dc769c8b4699b6db3a4f56ec46
TX #5 1970-01-01T00:00:00Z [Test:100] version: 10
#5:0 version: 10
TX #5 1970-01-01T00:00:00Z [Test:100] version: 11
#5:0 version: 11
│ known to (since): Alice (#5)
└─> ensure active 0066d7eab72b04d1ab3c24f2f3cb2a2d9266c2c2dc769c8b4699b6db3a4f56ec46
TX #6 1970-01-01T00:00:00Z [Test:104] version: 10
#6:0 version: 10
TX #6 1970-01-01T00:00:00Z [Test:104] version: 11
#6:0 version: 11
│ known to (since): Alice (#6)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Alice', _2 = "blah" }
not found
TX #7 1970-01-01T00:00:00Z [Test:108] version: 10
#7:0 version: 10
TX #7 1970-01-01T00:00:00Z [Test:108] version: 11
#7:0 version: 11
│ known to (since): Bob (#7)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Bob', _2 = "some-key" }
not found
TX #8 1970-01-01T00:00:00Z [Test:112] version: 10
#8:0 version: 10
TX #8 1970-01-01T00:00:00Z [Test:112] version: 11
#8:0 version: 11
│ known to (since): Alice (#8), Bob (#8)
└─> Alice exercises TextKeyChoice:Test:TextKey@XXXXXXXX on 0066d7eab72b04d1ab3c24f2f3cb2a2d9266c2c2dc769c8b4699b6db3a4f56ec46
with { }
TX #9 1970-01-01T00:00:00Z [Test:115] version: 10
#9:0 version: 10
TX #9 1970-01-01T00:00:00Z [Test:115] version: 11
#9:0 version: 11
│ known to (since): Alice (#9)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Alice', _2 = "some-key" }
not found
TX #10 1970-01-01T00:00:00Z [Test:121] version: 10
#10:0 version: 10
TX #10 1970-01-01T00:00:00Z [Test:121] version: 11
#10:0 version: 11
│ archived by #11:0
│ referenced by #11:0
│ known to (since): Alice (#10), Bob (#10)
@ -63,78 +63,78 @@ TX #10 1970-01-01T00:00:00Z [Test:121] version: 10
with: { p = 'Alice', k = "some-key-2", disclosedTo = ['Bob'] }
key { _1 = 'Alice', _2 = "some-key-2" }
TX #11 1970-01-01T00:00:00Z [Test:126] version: 10
#11:0 version: 10
TX #11 1970-01-01T00:00:00Z [Test:126] version: 11
#11:0 version: 11
│ known to (since): Alice (#11), Bob (#11)
└─> Alice exercises TextKeyChoice:Test:TextKey@XXXXXXXX on 004f56105c00ca4026b905ed27b104471dffcaf2de15832139b93ef46b87000232
with { }
#11:1 version: 10
#11:1 version: 11
│ known to (since): Alice (#11)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Alice', _2 = "some-key-2" }
not found
TX #12 1970-01-01T00:00:00Z [Test:132] version: 10
#12:0 version: 10
TX #12 1970-01-01T00:00:00Z [Test:132] version: 11
#12:0 version: 11
│ referenced by #12:1
│ known to (since): Alice (#12)
└─> create Test:TextKey@XXXXXXXX
with: { p = 'Alice', k = "same-submit-key", disclosedTo = [] }
key { _1 = 'Alice', _2 = "same-submit-key" }
#12:1 version: 10
#12:1 version: 11
│ known to (since): Alice (#12)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Alice', _2 = "same-submit-key" }
found 00a95ea3bb21422ab003f15dc95de204110b3f7f2682b407a2ba75d36b0be9053b
TX #13 1970-01-01T00:00:00Z [Test:140] version: 10
#13:0 version: 10
TX #13 1970-01-01T00:00:00Z [Test:140] version: 11
#13:0 version: 11
│ referenced by #14:0
│ known to (since): Alice (#13)
└─> create Test:CreateAndLookup@XXXXXXXX
with: { p = 'Alice', k = "same-choice-key" }
TX #14 1970-01-01T00:00:00Z [Test:144] version: 10
#14:0 version: 10
TX #14 1970-01-01T00:00:00Z [Test:144] version: 11
#14:0 version: 11
│ known to (since): Alice (#14)
└─> Alice exercises Good:Test:CreateAndLookup@XXXXXXXX on 00528ef7ca096fcc1cfb640394394117e237d21236faef81c544770ec5962c462c
with { }
children:
#14:1 version: 10
#14:1 version: 11
│ referenced by #14:2, #14:3
│ known to (since): Alice (#14)
└─> create Test:TextKey@XXXXXXXX
with: { p = 'Alice', k = "same-choice-key", disclosedTo = [] }
key { _1 = 'Alice', _2 = "same-choice-key" }
#14:2 version: 10
#14:2 version: 11
│ known to (since): Alice (#14)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Alice', _2 = "same-choice-key" }
found 00ce68df68a7e42ecadca4ff1e4d35ffff75f009d1f01ae130d36116e1332ff773
#14:3 version: 10
#14:3 version: 11
│ known to (since): Alice (#14)
└─> ensure active 00ce68df68a7e42ecadca4ff1e4d35ffff75f009d1f01ae130d36116e1332ff773
mustFailAt actAs: {'Alice'} readAs: {} [Test:147]
TX #16 1970-01-01T00:00:00Z [Test:151] version: 10
#16:0 version: 10
TX #16 1970-01-01T00:00:00Z [Test:151] version: 11
#16:0 version: 11
│ referenced by #16:1, #16:2
│ known to (since): Alice (#16)
└─> create Test:TextKey@XXXXXXXX
with: { p = 'Alice', k = "non-consuming-choice", disclosedTo = [] }
key { _1 = 'Alice', _2 = "non-consuming-choice" }
#16:1 version: 10
#16:1 version: 11
│ known to (since): Alice (#16)
└─> Alice exercises TextKeyNonconsumingChoice:Test:TextKey@XXXXXXXX on 00bcf23c0f4133f226e7051a79ab289277e1a3941dcf08c545ff477593c9b22651
with { }
#16:2 version: 10
#16:2 version: 11
│ known to (since): Alice (#16)
└─> lookup by key Test:TextKey@XXXXXXXX
key { _1 = 'Alice', _2 = "non-consuming-choice" }

View File

@ -1,25 +1,25 @@
transactions:
TX #0 1970-01-01T00:00:00Z [Test:12] version: 10
#0:0 version: 10
TX #0 1970-01-01T00:00:00Z [Test:12] version: 11
#0:0 version: 11
│ referenced by #2:1
│ known to (since): Alice (#0), AlicesBank (#0), Bob (#2)
└─> create Test:Iou@XXXXXXXX
with: { payer = 'AlicesBank', owner = 'Alice', amount = Test:Amount@XXXXXXXX{ value = 1.0000000000, currency = "USD" } }
TX #1 1970-01-01T00:00:00Z [Test:17] version: 10
#1:0 version: 10
TX #1 1970-01-01T00:00:00Z [Test:17] version: 11
#1:0 version: 11
│ referenced by #2:0
│ known to (since): AlicesBank (#1), Bob (#1)
└─> create Test:DivulgeIouByExercise@XXXXXXXX
with: { payer = 'AlicesBank', divulgee = 'Bob' }
TX #2 1970-01-01T00:00:00Z [Test:20] version: 10
#2:0 version: 10
TX #2 1970-01-01T00:00:00Z [Test:20] version: 11
#2:0 version: 11
│ known to (since): AlicesBank (#2), Bob (#2)
└─> AlicesBank exercises Divulge:Test:DivulgeIouByExercise@XXXXXXXX on 00999d35e67dc49f91772eaffd08179f431661a382cd68edc7d25ee2c2508fb6a3
with { ref = 00a21310a64aec150c16589881ebebc4780fc8e476489ef939a1ebfbfeb1aa3835 }
children:
#2:1 version: 10
#2:1 version: 11
│ known to (since): AlicesBank (#2), Bob (#2)
└─> ensure active 00a21310a64aec150c16589881ebebc4780fc8e476489ef939a1ebfbfeb1aa3835

View File

@ -1,6 +1,6 @@
transactions:
TX #0 1970-01-01T00:00:00Z [Test:26] version: 10
#0:0 version: 10
TX #0 1970-01-01T00:00:00Z [Test:26] version: 11
#0:0 version: 11
│ known to (since): Alice (#0)
└─> create Test:BigTemplate@XXXXXXXX
with: { p = 'Alice', x000 = 0, x001 = 1, x002 = 2, x003 = 3, x004 = 4, x005 = 5, x006 = 6, x007 = 7, x008 = 8, x009 = 9, x010 = 10, x011 = 11, x012 = 12, x013 = 13, x014 = 14, x015 = 15, x016 = 16, x017 = 17, x018 = 18, x019 = 19, x020 = 20, x021 = 21, x022 = 22, x023 = 23, x024 = 24, x025 = 25, x026 = 26, x027 = 27, x028 = 28, x029 = 29, x030 = 30, x031 = 31, x032 = 32, x033 = 33, x034 = 34, x035 = 35, x036 = 36, x037 = 37, x038 = 38, x039 = 39, x040 = 40, x041 = 41, x042 = 42, x043 = 43, x044 = 44, x045 = 45, x046 = 46, x047 = 47, x048 = 48, x049 = 49, x050 = 50, x051 = 51, x052 = 52, x053 = 53, x054 = 54, x055 = 55, x056 = 56, x057 = 57, x058 = 58, x059 = 59, x060 = 60, x061 = 61, x062 = 62, x063 = 63, x064 = 64, x065 = 65, x066 = 66, x067 = 67, x068 = 68, x069 = 69, x070 = 70, x071 = 71, x072 = 72, x073 = 73, x074 = 74, x075 = 75, x076 = 76, x077 = 77, x078 = 78, x079 = 79, x080 = 80, x081 = 81, x082 = 82, x083 = 83, x084 = 84, x085 = 85, x086 = 86, x087 = 87, x088 = 88, x089 = 89, x090 = 90, x091 = 91, x092 = 92, x093 = 93, x094 = 94, x095 = 95, x096 = 96, x097 = 97, x098 = 98, x099 = 99, x100 = 100, x101 = 101, x102 = 102, x103 = 103, x104 = 104, x105 = 105, x106 = 106, x107 = 107, x108 = 108, x109 = 109, x110 = 110, x111 = 111, x112 = 112, x113 = 113, x114 = 114, x115 = 115, x116 = 116, x117 = 117, x118 = 118, x119 = 119 }

View File

@ -7,8 +7,8 @@ mustFailAt actAs: {'Alice'} readAs: {} [Test:96]
mustFailAt actAs: {'Alice'} readAs: {} [Test:100]
TX #4 1970-01-01T00:00:00Z [Test:108] version: 10
#4:0 version: 10
TX #4 1970-01-01T00:00:00Z [Test:108] version: 11
#4:0 version: 11
│ known to (since): Alice (#4), Bob (#4)
└─> create Test:X@XXXXXXXX
with: { p = 'Alice', p2 = 'Bob' }
@ -17,8 +17,8 @@ pass -100000000
mustFailAt actAs: {'Bob'} readAs: {} [Test:110]
TX #7 1969-12-31T23:58:20Z [Test:115] version: 10
#7:0 version: 10
TX #7 1969-12-31T23:58:20Z [Test:115] version: 11
#7:0 version: 11
│ known to (since): Alice (#7)
└─> create Test:TwoParties@XXXXXXXX
with: { p = 'Alice', p2 = 'Alice' }
@ -27,29 +27,29 @@ mustFailAt actAs: {'Bob'} readAs: {} [Test:116]
mustFailAt actAs: {'Alice'} readAs: {} [Test:123]
TX #10 1969-12-31T23:58:20Z [Test:128] version: 10
#10:0 version: 10
TX #10 1969-12-31T23:58:20Z [Test:128] version: 11
#10:0 version: 11
│ archived by #11:0
│ referenced by #11:0
│ known to (since): Alice (#10), Bob (#10)
└─> create Test:ToTwoParties@XXXXXXXX
with: { p = 'Alice', p2 = 'Bob' }
TX #11 1969-12-31T23:58:20Z [Test:129] version: 10
#11:0 version: 10
TX #11 1969-12-31T23:58:20Z [Test:129] version: 11
#11:0 version: 11
│ known to (since): Alice (#11), Bob (#11)
└─> Bob exercises Convert:Test:ToTwoParties@XXXXXXXX on 00059653cdb8e866d69fac4d5bd0f62bbdaba4c36b01c438b86351fbdbf2cab8b0
with { }
children:
#11:1 version: 10
#11:1 version: 11
│ known to (since): Alice (#11), Bob (#11)
└─> create Test:TwoParties@XXXXXXXX
with: { p = 'Alice', p2 = 'Bob' }
mustFailAt actAs: {'Bob'} readAs: {} [Test:130]
TX #13 1969-12-31T23:58:20Z [Test:134] version: 10
#13:0 version: 10
TX #13 1969-12-31T23:58:20Z [Test:134] version: 11
#13:0 version: 11
│ known to (since): Alice (#13)
└─> create Test:NoCtrls@XXXXXXXX
with: { p = 'Alice', xs = [] }
@ -58,16 +58,16 @@ mustFailAt actAs: {'Alice'} readAs: {} [Test:135]
mustFailAt actAs: {'Alice'} readAs: {} [Test:139]
TX #16 1969-12-31T23:58:20Z [Test:144] version: 10
#16:0 version: 10
TX #16 1969-12-31T23:58:20Z [Test:144] version: 11
#16:0 version: 11
│ known to (since): Alice (#16), Bob (#16)
└─> create Test:X@XXXXXXXX
with: { p = 'Alice', p2 = 'Bob' }
mustFailAt actAs: {'Alice'} readAs: {} [Test:145]
TX #18 1969-12-31T23:58:20Z [Test:151] version: 10
#18:0 version: 10
TX #18 1969-12-31T23:58:20Z [Test:151] version: 11
#18:0 version: 11
│ known to (since): Alice (#18)
└─> create Test:Recursive@XXXXXXXX
with: { p = 'Alice' }
@ -76,8 +76,8 @@ mustFailAt actAs: {'Alice'} readAs: {} [Test:154]
mustFailAt actAs: {'Alice'} readAs: {} [Test:340]
TX #21 1969-12-31T23:58:20Z [Test:345] version: 10
#21:0 version: 10
TX #21 1969-12-31T23:58:20Z [Test:345] version: 11
#21:0 version: 11
│ known to (since): Alice (#21)
└─> create Test:NestingLimitExercise@XXXXXXXX
with: { p = 'Alice' }

View File

@ -52,4 +52,4 @@ $DAMLC package $TARGETFLAG --debug $TESTMAIN 'main' -o $TESTDAR
$REPL $DEVFLAG test Test:run $TESTDAR | sed -E "$REGEX_HIDE_HASHES" > ${TESTDIR}/ACTUAL.ledger
$DIFF -u --strip-trailing-cr ${TESTDIR}/ACTUAL.ledger ${TESTDIR}/EXPECTED.ledger
$DIFF -u --strip-trailing-cr ${TESTDIR}/EXPECTED.ledger ${TESTDIR}/ACTUAL.ledger

View File

@ -206,7 +206,6 @@ da_scala_test_suite(
size = "medium",
srcs = glob(["src/test/suite/**/*.scala"]),
data = [
"//daml-lf/encoder:testing-dar-dev",
"//daml-lf/encoder:testing-dar-latest",
"//extractor:PrimitiveTypes.dar",
"//extractor:RecordsAndVariants.dar",
@ -247,6 +246,7 @@ da_scala_test_suite(
":extractor-scala-tests-lib",
"//bazel_tools/runfiles:scala_runfiles",
"//daml-lf/data",
"//daml-lf/encoder:testing-dar-lookup-lib-latest",
"//daml-lf/interface",
"//daml-lf/transaction",
"//daml-lf/transaction-test-lib",

View File

@ -25,7 +25,7 @@ class EnumSpec
with Matchers
with CustomMatchers {
override protected def darFile = new File(rlocation("daml-lf/encoder/test-1.11.dar"))
override protected def darFile = new File(rlocation(com.daml.lf.archive.testing.TestDar.fileName))
override def scenario: Option[String] = Some("EnumMod:createContracts")

View File

@ -26,7 +26,7 @@ class GenMapSpec
with CustomMatchers {
override protected def darFile =
new File(rlocation("daml-lf/encoder/test-1.11.dar"))
new File(rlocation(com.daml.lf.archive.testing.TestDar.fileName))
override def scenario: Option[String] = Some("GenMapMod:createContracts")

View File

@ -3,7 +3,7 @@
load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_library", "da_haskell_repl", "da_haskell_test")
load("//rules_daml:daml.bzl", "daml_compile")
load("@os_info//:os_info.bzl", "is_windows")
load("@os_info//:os_info.bzl", "is_darwin")
da_haskell_library(
name = "hs-ledger",
@ -88,7 +88,7 @@ da_haskell_test(
src_strip_prefix = "test",
# We spin up Sandbox as a separate process, so
# try not to overload the machine.
tags = ["cpu:2"],
tags = ["cpu:2"] + (["manual"] if is_darwin else []),
visibility = ["//visibility:public"],
deps = [
"//compiler/daml-lf-ast",

View File

@ -37,7 +37,7 @@ class CodeGenRunnerTests extends AnyFlatSpec with Matchers with BazelRunfiles {
val (interfaces, pkgPrefixes) = CodeGenRunner.collectDamlLfInterfaces(conf)
assert(interfaces.length == 19)
assert(interfaces.length == 20)
assert(pkgPrefixes == Map.empty)
}

View File

@ -34,6 +34,7 @@ import com.daml.ledger.client.configuration.{
LedgerClientConfiguration,
LedgerIdRequirement,
}
import com.daml.ledger.participant.state.v1.SeedService.Seeding
import com.daml.platform.common.LedgerIdMode
import com.daml.platform.sandbox
import com.daml.platform.sandbox.SandboxServer
@ -192,6 +193,7 @@ object HttpServiceTestFixture extends LazyLogging with Assertions with Inside {
tlsConfig = if (useTls) Some(serverTlsConfig) else None,
ledgerIdMode = LedgerIdMode.Static(ledgerId),
authService = authService,
seeding = Some(Seeding.Weak),
)
private def clientConfig[A](

View File

@ -8,6 +8,7 @@ load("@build_environment//:configuration.bzl", "mvn_version")
load(
"//daml-lf/language:daml-lf.bzl",
"lf_version_configuration",
"lf_version_configuration_versions",
)
da_scala_library(
@ -244,11 +245,10 @@ da_scala_test_suite(
name = "sandbox-classic-tests",
srcs = glob(["src/test/suite/**/*.scala"]),
data = [
"//daml-lf/encoder:testing-dar-dev",
"//daml-lf/encoder:testing-dar-latest",
"//daml-lf/encoder:testing-dars",
"//ledger/test-common:model-tests-stable.dar",
"//ledger/test-common/test-certificates",
] + ["//daml-lf/encoder:testing-dar-preview"] if lf_version_configuration.get("preview") != None else [],
],
resources = glob(["src/test/resources/**/*"]) + ["//ledger/sandbox-common:src/main/resources/logback.xml"],
scala_deps = scala_test_deps,
deps = test_deps,

View File

@ -53,6 +53,7 @@ import com.daml.platform.sandbox.config.SandboxConfig
import com.daml.platform.services.time.TimeProviderType
import com.daml.ports.{LockedFreePort, Port}
import com.daml.ledger.api.testing.utils.AkkaBeforeAndAfterAll
import com.daml.ledger.participant.state.v1.SeedService.Seeding
import com.daml.lf.engine.trigger.dao.DbTriggerDao
import com.daml.testing.postgresql.PostgresAroundAll
import com.daml.timer.RetryStrategy
@ -261,6 +262,7 @@ trait SandboxFixture extends BeforeAndAfterAll with AbstractAuthFixture with Akk
timeProviderType = Some(TimeProviderType.Static),
authService = authService,
ledgerConfig = LedgerConfiguration.defaultLedgerBackedIndex,
seeding = Some(Seeding.Weak),
)
protected lazy val sandboxServer: SandboxServer = resource.value._1