Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LF: move archive snapshots in a separate directory #11081

Merged
merged 2 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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