daml/daml-lf/tests/BUILD.bazel
Paul Brauner f4ee00361e
Make LF v2 non backwards-compatible with LF v1 in the compiler (#17492)
* initial commit

* split gen-stable-packages-v_i into two targets

* rename compatibleWith to canDependOn

* update damlc integration tests annotation to allow for 2.x

* use the right package ID for preconditionFailed when compiling to V2

* fuse stable-packages-v1 and stable-packages-v2 into one single filegroup

* Fix DA.Daml.LF.Ast.Tests

* remove leftover 'undefined' in Version.hs

* progress on fixing DataDependencies.hs

* fix Cross-SDK typeclasses test for 2.dev

* Fix the 'Typeclasses and instances' data dependency test

* Update comment

* fix //compiler/damlc/tests:packaging

* Add TODO

* parameterize the machine by the langage version, hardcode v1 in script v2, v2 in script v2, v1 in exports

* get EngineTests to pass

* fix more tests

* fix canton integration tests

* formatting

* fix more tests

* fix transactionversiontest

* fix exceptiontest

* Fix ValueEnricherSpec

* Fix EngineInfoTest

* fix PartialTransactionSpec

* fix upgragetest

* fix TransactionSnapshot

* Fix ContractKeySpec

* Fix ReinterpretTest

* fix InterfaceViewSpec

* fix InterfacesTest

* fix stable package v1 names

* fix validate.sh tests

* formatting

* Fix ChoiceAuthorityTest

* fix explicit disclosure test

* Fix SpeedyTest

* formatting

* Fix integration test

* fix data dependency tests

* fix package vetting count, increased due to metadata being added

* Redact stable package IDs in error messages in order for the ExceptionSemantics test to work for both v1 and v2

* cleanup

* fix Daml2ScriptTestRunner

* fix JsonApiIT and daml-script golden tests

* fix daml3-script runner test

* enable v2 for all integration tests

* formatting

* fix NodeSeedsTest

* fix since-lf annotations

* add comments, improve consistency

* stop hardcoding V1 in runPureExpr and runPureSExpr

* formatting

* remove harcoding of LFv1 in ConcurrentCompiledPackages.apply

* Parameterize Compiler.Config.Default with major language version

* remove global parser implicit and default package ID and language version
2023-10-11 11:40:17 +02:00

96 lines
2.3 KiB
Python

# Copyright (c) 2023 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//rules_daml:daml.bzl",
"daml_build_test",
"daml_compile",
)
load(
"//daml-lf/language:daml-lf.bzl",
"LF_MAJOR_VERSIONS",
"lf_version_latest",
)
[
daml_compile(
name = "Exceptions-v{}".format(major),
srcs = ["Exceptions.daml"],
target = lf_version_latest.get(major),
visibility = ["//daml-lf:__subpackages__"],
)
for major in LF_MAJOR_VERSIONS
]
[
daml_compile(
name = "Interfaces-v{}".format(major),
srcs = ["Interfaces.daml"],
target = lf_version_latest.get(major),
visibility = ["//daml-lf:__subpackages__"],
)
for major in LF_MAJOR_VERSIONS
]
[
daml_build_test(
name = "InterfaceRetro-v{}".format(major),
dar_dict = {
"//daml-lf/tests:Interfaces-v{}.dar".format(major): "interfaces.dar",
},
project_dir = "interface-retro-v{}".format(major),
visibility = ["//daml-lf:__subpackages__"],
)
for major in LF_MAJOR_VERSIONS
]
[
daml_compile(
name = "InterfaceViews-v{}".format(major),
srcs = ["InterfaceViews.daml"],
target = lf_version_latest.get(major),
visibility = ["//daml-lf:__subpackages__"],
)
for major in LF_MAJOR_VERSIONS
]
daml_build_test(
name = "ReinterpretTests-v1",
dar_dict = {
"//daml-lf/tests:AtVersion13.dar": "at-version-13.dar",
"//daml-lf/tests:AtVersion14.dar": "at-version-14.dar",
},
project_dir = "reinterpret-v1",
visibility = ["//daml-lf:__subpackages__"],
)
daml_build_test(
name = "ReinterpretTests-v2",
project_dir = "reinterpret-v2",
visibility = ["//daml-lf:__subpackages__"],
)
daml_compile(
name = "AtVersion13",
srcs = ["reinterpret-v1/AtVersion13.daml"],
target = "1.13",
visibility = ["//daml-lf:__subpackages__"],
)
daml_compile(
name = "AtVersion14",
srcs = ["reinterpret-v1/AtVersion14.daml"],
target = "1.14",
visibility = ["//daml-lf:__subpackages__"],
)
[
daml_compile(
name = "MultiKeys-v{}".format(major),
srcs = ["MultiKeys.daml"],
target = lf_version_latest.get(major),
visibility = ["//daml-lf:__subpackages__"],
)
for major in LF_MAJOR_VERSIONS
]