Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
396b789
Split shared Dep into two dirs
dylant-da Jun 25, 2026
5ce5fb6
Bump canton override version to 3.6.0, add daml-lf-upgrade-check as dep
dylant-da Jul 9, 2026
bbdf9d9
Split dep to use same source across two dirs, instead of reusing dir
dylant-da Jul 9, 2026
0e70cc6
Add srcout as output of daml_compile
dylant-da Jul 9, 2026
64b66e7
rename LOCAL_CANTON_OVERRIDE to LOCAL_CANTON_PATH
dylant-da Jul 13, 2026
fb36764
Script to generate/copy daml and yaml files to a local Canton
dylant-da Jul 14, 2026
f2adbeb
Rename LOCAL_CANTON_OVERRIDE to LOCAL_CANTON_PATH in version.bzl
dylant-da Jul 14, 2026
2c54517
Remove sdk-version from generated daml.yaml files
dylant-da Jul 14, 2026
dfb4c03
Publish OCI component, make srcout optional, bump Canton version
dylant-da Jul 23, 2026
6deea64
Merge remote-tracking branch 'origin/main' into dylant-da/migrate-upg…
dylant-da Jul 23, 2026
56a40dd
Fix headers
dylant-da Jul 23, 2026
e230a8a
Drop source for upgrade-check-main
dylant-da Jul 23, 2026
107f446
Merge remote-tracking branch 'origin/main' into dylant-da/migrate-upg…
dylant-da Jul 26, 2026
d7b663b
Apply fixes for shellcheck (done by Claude, reviewed by me)
dylant-da Jul 27, 2026
d3468a5
Merge remote-tracking branch 'origin/main' into dylant-da/migrate-upg…
dylant-da Jul 29, 2026
edd70f5
Use published artifacts
dylant-da Jul 30, 2026
7c2519b
Add instructions to canton/README.md for updating the daml files
dylant-da Jul 30, 2026
5850efd
Bump version
dylant-da Jul 30, 2026
91aef96
Merge branch 'main' into dylant-da/migrate-upgrade-check-main
dylant-da Jul 30, 2026
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
7 changes: 4 additions & 3 deletions sdk/bazel-java-deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ load(
"scalapb_protoc_version",
"scalapb_version",
)
load("//canton:canton_version.bzl", "CANTON_OPEN_SOURCE_TAG", "LOCAL_CANTON_OVERRIDE")
load("//canton:canton_version.bzl", "CANTON_OPEN_SOURCE_TAG", "LOCAL_CANTON_PATH")
load("@java_deps_json//:java_deps.bzl", "JAVA_DEPS")

version_specific = {
Expand Down Expand Up @@ -48,7 +48,7 @@ pekko_version = "1.2.1"
pekko_http_version = "1.1.0"
tapir_version = "1.8.5"

canton_version = "3.5.0-SNAPSHOT" if LOCAL_CANTON_OVERRIDE != None else CANTON_OPEN_SOURCE_TAG
canton_version = "3.6.0-SNAPSHOT" if LOCAL_CANTON_PATH != None else CANTON_OPEN_SOURCE_TAG

upickle_version = "4.1.0"
ujson_version = "4.0.2"
Expand Down Expand Up @@ -95,6 +95,7 @@ def install_java_deps():
# TODO(https://github.com/DACH-NY/canton/issues/30144): check whether this dependency can be gotten rid of
"com.daml:testing-utils_{}:{}".format(scala_major_version, canton_version),
"com.daml:timer-utils_{}:{}".format(scala_major_version, canton_version),
"com.daml:daml-lf-upgrade-check_{}:{}".format(scala_major_version, canton_version),

# TODO(https://github.com/DACH-NY/canton/issues/30144): move these dependencies to shared_dependencies in
# the canton repo
Expand Down Expand Up @@ -133,7 +134,7 @@ def install_java_deps():
"https://repo1.maven.org/maven2",
"https://europe-maven.pkg.dev/da-images/public-maven",
"https://europe-maven.pkg.dev/da-images/public-maven-unstable",
] + (["m2local"] if LOCAL_CANTON_OVERRIDE != None else []),
] + (["m2local"] if LOCAL_CANTON_PATH != None else []),
# The strict_visibility attribute controls whether all artifacts should
# be visible (including transitive dependencies), or whether only
# explicitly declared artifacts should be visible. The targets
Expand Down
10 changes: 9 additions & 1 deletion sdk/canton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ branch.
To avoid needing to publish a full Canton, the Daml repo can be made to use
local artifacts from a local Canton repo.

* In `canton/canton_version.bzl`, set `LOCAL_CANTON_OVERRIDE` to an absolute
* In `canton/canton_version.bzl`, set `LOCAL_CANTON_PATH` to an absolute
path to the Canton repo in question.
* Run `./sdk/canton/pull-local-canton-to-daml.sh -v --all` - the script will
navigate to the local Canton repo, build all of the artifacts, publish them to
Expand Down Expand Up @@ -79,3 +79,11 @@ Run the `./canton/push-daml-to-local-canton.sh`, which will:
* Scrape the Daml version that the local Canton repo is expecting.
* Overwrite that version's DPM artifacts with our local Damlc, Codegen, and
daml-script artifacts.

### Update Daml test damls in the Canton repo

The Canton repo has a suite of Daml files for testing upgrade-check coverage
that is copied from the Daml repo. These are seldom changed, since the SCU
feature is now stable, but if they do, run the manual script
`test-common/copy-upgrade-check-unit-tests-to-canton.sh` from inside the SDK
directory.
8 changes: 4 additions & 4 deletions sdk/canton/canton_jar.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("//canton:canton_version.bzl", "CANTON_OPEN_SOURCE_SHA", "CANTON_OPEN_SOURCE_TAG", "LOCAL_CANTON_OVERRIDE")
load("//canton:canton_version.bzl", "CANTON_OPEN_SOURCE_SHA", "CANTON_OPEN_SOURCE_TAG", "LOCAL_CANTON_PATH")

def local_canton_repo():
if LOCAL_CANTON_OVERRIDE != None:
if LOCAL_CANTON_PATH != None:
native.new_local_repository(
name = "canton_local",
path = LOCAL_CANTON_OVERRIDE,
path = LOCAL_CANTON_PATH,
build_file_content = """
filegroup(
name = "bundle.jar",
Expand Down Expand Up @@ -38,7 +38,7 @@ def _canton_bucket(tag):
return "public"

def canton_jar():
if LOCAL_CANTON_OVERRIDE != None:
if LOCAL_CANTON_PATH != None:
copy_file(
name = "canton_open_source_jar",
src = "@canton_local//:bundle.jar",
Expand Down
6 changes: 3 additions & 3 deletions sdk/canton/canton_version.bzl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) 2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

CANTON_OPEN_SOURCE_TAG = "3.6.0-snapshot.20260729.19783.0.v2f4d4a73"
CANTON_OPEN_SOURCE_SHA = "sha256:1dd090e3d119080f2d5faefbef90abc1f0df1b46aa3097974a4a2cff2db68aab"
CANTON_OPEN_SOURCE_TAG = "3.6.0-ad-hoc.20260730.19858.0.v3e402783"
CANTON_OPEN_SOURCE_SHA = "sha256:4d066e162605be40e0d5a45111d64eba1fbe2201554967935432f9ae6a49d793"

# Use an alternative canton JAR & artifacts from the local maven cache by setting this to an absolute path
# Consult canton/README.md
LOCAL_CANTON_OVERRIDE = None
LOCAL_CANTON_PATH = None
28 changes: 14 additions & 14 deletions sdk/canton/get-local-canton-path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd "$DIR/.."

{
use_local_canton_line_prefix='^LOCAL_CANTON_OVERRIDE *= *'
use_local_canton_line_prefix='^LOCAL_CANTON_PATH *= *'
if ! grep -q -E "$use_local_canton_line_prefix" canton/canton_version.bzl; then
echo "Could not find a definition of LOCAL_CANTON_OVERRIDE (matching '$use_local_canton_line_prefix') inside of canton/canton_version.bzl."
echo "Expected a line of the form 'LOCAL_CANTON_OVERRIDE = <absolute_path_to_canton_repo>'"
echo "Could not find a definition of LOCAL_CANTON_PATH (matching '$use_local_canton_line_prefix') inside of canton/canton_version.bzl."
echo "Expected a line of the form 'LOCAL_CANTON_PATH = <absolute_path_to_canton_repo>'"
echo "Instead got:"
cat canton/canton_version.bzl
exit 1
else
LOCAL_CANTON_OVERRIDE=$(grep -E "$use_local_canton_line_prefix" canton/canton_version.bzl | sed -E "s/$use_local_canton_line_prefix//")
if echo -n "$LOCAL_CANTON_OVERRIDE" | grep -q -E '^"[^"]+"$'; then
LOCAL_CANTON_OVERRIDE=$(echo -n "$LOCAL_CANTON_OVERRIDE" | sed -E 's/^"(.*)"$/\1/')
if [[ "$(realpath "$LOCAL_CANTON_OVERRIDE")" != "$LOCAL_CANTON_OVERRIDE" ]]; then
echo "LOCAL_CANTON_OVERRIDE inside of canton/canton_version.bzl is not an absolute path."
echo "Verbatim path in file: $LOCAL_CANTON_OVERRIDE"
echo "Outcome of calling realpath: $(realpath "$LOCAL_CANTON_OVERRIDE")"
LOCAL_CANTON_PATH=$(grep -E "$use_local_canton_line_prefix" canton/canton_version.bzl | sed -E "s/$use_local_canton_line_prefix//")
if echo -n "$LOCAL_CANTON_PATH" | grep -q -E '^"[^"]+"$'; then
LOCAL_CANTON_PATH=$(echo -n "$LOCAL_CANTON_PATH" | sed -E 's/^"(.*)"$/\1/')
if [[ "$(realpath "$LOCAL_CANTON_PATH")" != "$LOCAL_CANTON_PATH" ]]; then
echo "LOCAL_CANTON_PATH inside of canton/canton_version.bzl is not an absolute path."
echo "Verbatim path in file: $LOCAL_CANTON_PATH"
echo "Outcome of calling realpath: $(realpath "$LOCAL_CANTON_PATH")"
exit 1
fi
elif echo -n "$LOCAL_CANTON_OVERRIDE" | grep -q -E '^None$'; then
echo "LOCAL_CANTON_OVERRIDE inside of canton/canton_version.bzl is set to None. You must set this to an absolute path to a canton repo."
elif echo -n "$LOCAL_CANTON_PATH" | grep -q -E '^None$'; then
echo "LOCAL_CANTON_PATH inside of canton/canton_version.bzl is set to None. You must set this to an absolute path to a canton repo."
exit 1
else
echo 'Could not recognize LOCAL_CANTON_OVERRIDE as a string (must match the pattern: ^"[^"]+"$). You must set this to a path to an absolute path to a canton repo'
echo 'Could not recognize LOCAL_CANTON_PATH as a string (must match the pattern: ^"[^"]+"$). You must set this to a path to an absolute path to a canton repo'
exit 1
fi
fi
} 1>&2

echo "$LOCAL_CANTON_OVERRIDE"
echo "$LOCAL_CANTON_PATH"
12 changes: 6 additions & 6 deletions sdk/canton/pull-local-canton-to-daml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LOG=$(mktemp)
trap "cat $LOG" EXIT

function print_help () {
echo "Builds and locally publishes artifacts from the local canton repository in canton/canton_version.bzl:LOCAL_CANTON_OVERRIDE in such a way that this Daml repository can use them."
echo "Builds and locally publishes artifacts from the local canton repository in canton/canton_version.bzl:LOCAL_CANTON_PATH in such a way that this Daml repository can use them."
echo "For more information on usage, consult canton/README.md"
echo ""
echo "Usage: $0 [-h|-v] [--all|--libraries|--app|--repin]"
Expand Down Expand Up @@ -77,18 +77,18 @@ if $DO_ALL && { $DO_LIBRARIES || $DO_APP || $DO_REPIN || $DO_SHARED; }; then
exit 1
fi

LOCAL_CANTON_OVERRIDE=$(./canton/get-local-canton-path.sh)
LOCAL_CANTON_PATH=$(./canton/get-local-canton-path.sh)

if $DO_ALL || $DO_SHARED; then
echo "Copying '$LOCAL_CANTON_OVERRIDE/shared_dependencies.json' to 'canton/shared_dependencies.json'"
cp "$LOCAL_CANTON_OVERRIDE/shared_dependencies.json" canton/shared_dependencies.json
echo "Copying '$LOCAL_CANTON_PATH/shared_dependencies.json' to 'canton/shared_dependencies.json'"
cp "$LOCAL_CANTON_PATH/shared_dependencies.json" canton/shared_dependencies.json
else
echo "Skipping copy of shared_dependencies.json"
fi

(
echo "Changing directory to local canton path '$LOCAL_CANTON_OVERRIDE'"
cd "$LOCAL_CANTON_OVERRIDE"
echo "Changing directory to local canton path '$LOCAL_CANTON_PATH'"
cd "$LOCAL_CANTON_PATH"

if $DO_ALL || $DO_LIBRARIES; then
echo "Publish JARs to local Maven cache$VERBOSE_TRAILER"
Expand Down
8 changes: 4 additions & 4 deletions sdk/canton/push-daml-to-local-canton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function cleanup () {
trap cleanup EXIT

function print_help () {
echo "Builds and locally publishes artifacts from this Daml repository in such a way that the local canton repository in canton/canton_version.bzl:LOCAL_CANTON_OVERRIDE can use them."
echo "Builds and locally publishes artifacts from this Daml repository in such a way that the local canton repository in canton/canton_version.bzl:LOCAL_CANTON_PATH can use them."
echo ""
echo "For more information on usage, consult canton/README.md"
echo ""
Expand Down Expand Up @@ -51,10 +51,10 @@ if $HELP; then
exit 0
fi

LOCAL_CANTON_OVERRIDE=$(./canton/get-local-canton-path.sh)
LOCAL_CANTON_PATH=$(./canton/get-local-canton-path.sh)

echo "Changing directory to local canton path '$LOCAL_CANTON_OVERRIDE'"
cd "$LOCAL_CANTON_OVERRIDE"
echo "Changing directory to local canton path '$LOCAL_CANTON_PATH'"
cd "$LOCAL_CANTON_PATH"

echo "Getting local Canton's DamlVersion settings..."
sbt --error 'print community-base / buildInfoKeys; print ThisBuild / damlUseCustomVersion' > $SBT_OUT
Expand Down
2 changes: 1 addition & 1 deletion sdk/ci/refresh-canton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CANTON_OPEN_SOURCE_SHA = "${CANTON_DIGEST}"

# Use an alternative canton JAR & artifacts from the local maven cache by setting this to an absolute path
# Consult canton/README.md
LOCAL_CANTON_OVERRIDE = None
LOCAL_CANTON_PATH = None
EOF


Expand Down
Loading
Loading