Skip to content

Commit

Permalink
Track runfile dependencies of SDK assistant (digital-asset#6462)
Browse files Browse the repository at this point in the history
The //:migration-stable test-cases had issues with test results not
being invalidated after an update of the HEAD SDK. This may be due to
the SDK distribution files being undeclared dependencies of the `daml`
binary. This change adds the SDK distribution files to the `data`
attribute of the generated `daml` `cc_binary` to ensure that changes are
noticed by Bazel and cached test-cases invalidated.

The corresponding runfiles tree includes a symlink per file of the SDK
release. At the time of commit this amounts to ~9MiB of symlinks for one
SDK version (0.0.0 in particular).

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
  • Loading branch information
aherrmann-da and aherrmann authored Jun 24, 2020
1 parent f0f682c commit 3ec80a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compatibility/bazel_tools/daml_sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ sh_binary(
cc_binary(
name = "daml",
srcs = ["daml.cc"],
data = [":sdk/bin/daml"],
data = [":sdk/bin/daml"] + glob(["sdk/sdk/{version}/**"]),
deps = ["@bazel_tools//tools/cpp/runfiles:runfiles"],
)
# Needed to provide the same set of DARs to the ledger that
Expand All @@ -138,7 +138,7 @@ filegroup(
srcs = glob(["extracted-test-tool/ledger/test-common/**"]),
)
exports_files(["daml-types.tgz", "daml-ledger.tgz", "daml-react.tgz", "create_daml_app.patch"])
""",
""".format(version = ctx.attr.version),
)
return None

Expand Down

0 comments on commit 3ec80a0

Please sign in to comment.