Skip to content

Commit

Permalink
LF: move archive snapshots in a separate directory (#11081)
Browse files Browse the repository at this point in the history
CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
remyhaemmerle-da authored Sep 30, 2021
1 parent 5e424f8 commit 1ed6428
Show file tree
Hide file tree
Showing 25 changed files with 11 additions and 15 deletions.
8 changes: 0 additions & 8 deletions buf-kvutils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ build:
- daml-lf/transaction/src/main/protobuf
- ledger/ledger-configuration/protobuf
- ledger/participant-state/kvutils/src/main/protobuf
excludes:
# We have to exclude these to avoid duplicate definitions of e.g. Unit
# within the same package.
- daml-lf/archive/src/main/protobuf/com/daml/daml_lf_1_11/
- daml-lf/archive/src/main/protobuf/com/daml/daml_lf_1_12/
- daml-lf/archive/src/main/protobuf/com/daml/daml_lf_1_13/
- daml-lf/archive/src/main/protobuf/com/daml/daml_lf_1_14/
- daml-lf/archive/src/main/protobuf/com/digitalasset/

lint:
use:
Expand Down
16 changes: 10 additions & 6 deletions daml-lf/archive/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
filegroup(
name = "daml_lf_%s_archive_proto_srcs" % version,
srcs = glob([
"src/main/protobuf/com/{package}/daml_lf_{version}/*.proto".format(
package = lf_version_package(version),
version = mangle_for_java(version),
"src/{directory}/protobuf/com/{package}/daml_lf_{version}/*.proto".format(
package = package,
version = mangled_version,
directory = directory,
),
]),
),
Expand All @@ -39,17 +40,20 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
srcs = [":daml_lf_%s_archive_proto_srcs" % version],
javadoc_root_packages = [
"com.{package}.daml_lf_{version}".format(
package = lf_version_package(version),
version = mangle_for_java(version),
package = package,
version = mangled_version,
),
],
maven_artifact_prefix = "daml-lf-%s-archive" % version,
maven_group = "com.daml",
strip_import_prefix = "src/main/protobuf",
strip_import_prefix = "src/%s/protobuf" % directory,
visibility = ["//visibility:public"],
),
]
for version in PROTO_LF_VERSIONS
for package in [lf_version_package(version)]
for mangled_version in [mangle_for_java(version)]
for directory in ["main" if version == "dev" else "stable"]
]

# FIXME(JM): Clean this up
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ProtoTest extends AnyWordSpec with Matchers with TableDrivenPropertyChecks
s"daml_lf_1_$version files" should {

val pkg = if (version < 11) "digitalasset" else "daml"
val rootDir = s"daml-lf/archive/src/main/protobuf/com/$pkg/daml_lf_1_$version"
val rootDir = s"daml-lf/archive/src/stable/protobuf/com/$pkg/daml_lf_1_$version"
"not be modified" in {
List(
"daml_lf.proto" -> damlHashes,
Expand Down

0 comments on commit 1ed6428

Please sign in to comment.