Skip to content

Commit

Permalink
Refactor GenerateStablePackages (#9744)
Browse files Browse the repository at this point in the history
* Refactor GenerateStablePackages

Summary of changes:

* Split GenerateStablePackages executable into a library (containing the stable package data) and an executable (that writes out the packages)

* Hook up data-dependencies test to the new library so we don't have to manually update the number of stable packages every time we add a stable package or release a new LF version.

changelog_begin
changelog_end

* buildifier-fix
  • Loading branch information
sofiafaro-da authored May 19, 2021
1 parent 14cfe99 commit 1794a6f
Show file tree
Hide file tree
Showing 5 changed files with 654 additions and 625 deletions.
23 changes: 21 additions & 2 deletions compiler/damlc/stable-packages/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

load("//bazel_tools:haskell.bzl", "da_haskell_binary")
load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_library")

da_haskell_library(
name = "stable-packages-lib",
srcs = glob(["lib/**/*.hs"]),
hackage_deps = [
"base",
"bytestring",
"containers",
"text",
],
visibility = ["//visibility:public"],
deps = [
"//compiler/daml-lf-ast",
"//compiler/daml-lf-proto",
"//compiler/damlc/daml-lf-conversion",
"//libs-haskell/da-hs-base",
],
)

da_haskell_binary(
name = "generate-stable-package",
srcs = glob(["src/**/*.hs"]),
hackage_deps = [
"base",
"bytestring",
"containers",
"optparse-applicative",
"text",
],
main_function = "GenerateStablePackage.main",
visibility = ["//visibility:public"],
deps = [
":stable-packages-lib",
"//compiler/daml-lf-ast",
"//compiler/daml-lf-proto",
"//compiler/damlc/daml-lf-conversion",
"//libs-haskell/da-hs-base",
],
)
Expand Down
Loading

0 comments on commit 1794a6f

Please sign in to comment.