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: Drop Archive Snapshot for LF < 1.14 #11820

Merged
merged 1 commit into from
Nov 26, 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
LF: Drop Archive Snapshot for LF < 1.14
CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
remyhaemmerle-da committed Nov 25, 2021
commit eb8bc58b0d1c02003e3a8bef9fff153237f2de63
25 changes: 5 additions & 20 deletions daml-lf/archive/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ load(
"lf_scalacopts_stricter",
"silencer_plugin",
)
load("//daml-lf/language:daml-lf.bzl", "LF_MAJOR_VERSIONS", "PROTO_LF_VERSIONS", "lf_version_package", "mangle_for_java")
load("//daml-lf/language:daml-lf.bzl", "LF_MAJOR_VERSIONS", "PROTO_LF_VERSIONS", "mangle_for_java", "versions")
load(
"//rules_daml:daml.bzl",
"daml_compile",
Expand All @@ -29,8 +29,7 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
filegroup(
name = "daml_lf_%s_archive_proto_srcs" % version,
srcs = glob([
"src/{directory}/protobuf/com/{package}/daml_lf_{version}/*.proto".format(
package = package,
"src/{directory}/protobuf/com/daml/daml_lf_{version}/*.proto".format(
version = mangled_version,
directory = directory,
),
Expand All @@ -39,20 +38,14 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar")
proto_jars(
name = "daml_lf_%s_archive_proto" % version,
srcs = [":daml_lf_%s_archive_proto_srcs" % version],
javadoc_root_packages = [
"com.{package}.daml_lf_{version}".format(
package = package,
version = mangled_version,
),
],
javadoc_root_packages = ["com.daml.daml_lf_%s" % mangled_version],
maven_artifact_prefix = "daml-lf-%s-archive" % version,
maven_group = "com.daml",
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"]
]
Expand Down Expand Up @@ -169,10 +162,7 @@ da_scala_test_suite(
],
scalacopts = lf_scalacopts,
deps = [
":daml_lf_1.11_archive_proto_java",
":daml_lf_1.6_archive_proto_java",
":daml_lf_1.7_archive_proto_java",
":daml_lf_1.8_archive_proto_java",
":daml_lf_1.14_archive_proto_java",
":daml_lf_archive_reader",
":daml_lf_dev_archive_proto_java",
"//bazel_tools/runfiles:scala_runfiles",
Expand All @@ -198,12 +188,7 @@ da_scala_binary(
],
)

SNASPSHOT_VERSIONS = [
"1.11",
"1.12",
"1.13",
"1.14",
]
SNASPSHOT_VERSIONS = [ver for ver in PROTO_LF_VERSIONS if ver != "dev"]

[
sh_test(
Expand Down
14 changes: 6 additions & 8 deletions daml-lf/archive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ supported by the Daml-LF archive. Currently we have two major versions:

The component contains also an arbitrary number of snapshots of the
protobuf definitions as they were as the time a particular version of
Daml-LF was frozen. For versions <= 1.8, those snapshots are kept in the directories
`src/protobuf/com/digitalasset/daml_lf_x_y/`, where `x.y` is a
already frozen Daml-LF version. For newer versions, the directory is
`src/protobuf/com/daml/daml_lf_x_y/`. A snapshot for version `x.y` can be
used to read any Daml-LF version from `1.0` to `x.y` without suffering
breaking changes (at the generated code level) often introduced in the
current version.
Daml-LF was frozen. Those snapshots are kept in the directories
`src/protobuf/com/daml/daml_lf_x_y/`, where `x.y` is an already frozen
Daml-LF version. A snapshot for version `x.y` can be used to read any
Daml-LF version from `1.6` to `x.y` without suffering breaking changes
(at the generated code level) often introduced in the current version.

## Building

Expand All @@ -42,7 +40,7 @@ definition, a Haskell one, and several Java ones:
```
$ bazel build //daml-lf/archive:daml_lf_archive_haskell_proto
$ bazel build //daml-lf/archive:daml_lf_dev_archive_proto_java
$ bazel build //daml-lf/archive:daml_lf_1_6_archive_proto_java
$ bazel build //daml-lf/archive:daml_lf_1_14_archive_proto_java
```

## Editing the `.proto` definitions
Expand Down
6 changes: 0 additions & 6 deletions daml-lf/archive/proto_check_hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ set -e
declare -a checkSums=(
"500eefd480e9af6940adf12e7ec4c2cf4975d4cb9b25096c15edb0d57d364de8 daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_14/daml_lf_1.proto"
"455dfb894ce9648a86dadb408d1ee96c36d180e0f1d625706371ea9eca95c767 daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_14/daml_lf.proto"
"83207610fc117b47ef1da586e36c791706504911ff41cbee8fc5d1da12128147 daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_12/daml_lf_1.proto"
"6dbc0a0288c2447af690284e786c3fc1b58a296f2786e9cd5b4053069ff7c045 daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_12/daml_lf.proto"
"6d0869fd8b326cc82f7507ec9deb37520af23ccc4c03a78af623683eb5df2bee daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_13/daml_lf_1.proto"
"2038b49e33825c4730b0119472073f3d5da9b0bd3df2f6d21d9d338c04a49c47 daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_13/daml_lf.proto"
"9a9c86f4072ec08ac292517d377bb07b1436c2b9133da9ba03216c3ae8d3d27c daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_11/daml_lf_1.proto"
"05eb95f6bb15042624d2ca89d366e3bcd8618934471c6093efeecc09bb9d7df4 daml-lf/archive/src/stable/protobuf/com/daml/daml_lf_1_11/daml_lf.proto"
)

for checkSum in "${checkSums[@]}"; do
Expand Down

This file was deleted.

Loading