Commit Graph

1116 Commits

Author SHA1 Message Date
Moisés Ackerman
db14360701
Remove retroactive interface instance syntax (#18350)
* Bump GHC_REV

* Remove retroactive interface instances

* Remove more uses of retroactive ii

* Remove rii from //compiler/damlc/tests:daml-doc

* Remove rii from docs/source/daml/code-snippets-dev/Interfaces.daml

* Bump GHC_REV
2024-02-07 11:28:25 +00:00
Andreas Triantafyllos
199e45dce0
Fix test for json-api query. (#18401) 2024-02-07 09:48:49 +01:00
Raphael Speyer
2ff3f7c378
Java Codegen: classes get keyToJson via inheritance rather than re-generating for each class (#18385) 2024-02-07 11:10:53 +11:00
azure-pipelines[bot]
a6cb29edca
update canton to 3.0.0-snapshot.20240205.12475.0.v0a0a01e6 (#18391)
* update canton to 3.0.0-snapshot.20240205.12475.0.v0a0a01e6

tell-slack: canton

* fix broken ts test

run-all-tests: true

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Marcin Ziolek <marcin.ziolek@digitalasset.com>
2024-02-06 14:27:41 +01:00
Remy
0b1ceafe6c
remove support of retroactie interface instance in api-type-signature (#18382) 2024-02-06 11:11:15 +01:00
Paul Brauner
35e255e6b0
Address LF2 TODOs in the daml repo (#18386)
run-all-tests: true
2024-02-06 10:45:28 +01:00
mziolekda
539926df53
remove last usages of lapi v1 (#18390) 2024-02-06 09:10:44 +00:00
Samuel Williams
0f22d1a0b0
Remove/Upgrade hs-bindings (#18362)
* Remove/Upgrade hs-bindings

* Format canton/BUILD

* Disable check that contracts get archived on hot-reload
2024-02-02 15:23:19 +00:00
Paul Brauner
f7dfff8b49
make metadata non-optional in packages (#18363) 2024-02-02 11:16:03 +00:00
Remy
3b292d0032
[LF] drop retroactive interface instance (#18282) 2024-02-01 17:41:51 +01:00
mziolekda
f0de92ba10
Convert rx java to use LAPI v2 (#18341)
* use state service

eliminate ledger-identity and ledger-configuration services

update service

event query and package services

command service

command completions

command submission service

time service

clean-up

* fix documentation example

* format

* adopt rx to changed java-bindings
2024-02-01 14:48:54 +01:00
Samuel Williams
ae098ce147
Reduce artifacts and dependencies on ledger-api-core (#18332)
* Reduce artifacts and dependencies on ledger-api-core

* Remove unnecessary bazel dep
2024-01-31 11:56:30 +00:00
azure-pipelines[bot]
9debf3dfec
update canton to 3.0.0-snapshot.20240129.12427.0.vf8044d7c (#18321)
* update canton to 3.0.0-snapshot.20240129.12427.0.vf8044d7c

tell-slack: canton

* Fixing compile errors due to refactoring

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
2024-01-30 13:57:56 +01:00
Paul Brauner
3d3e05981a
remove v1 encoder and decoder in the engine (#18295)
run-all-tests: true
2024-01-30 09:04:26 +01:00
mziolekda
90d90ea759
remove scala bindings and ledger-api-client (#18301)
* remove scala bindings from daml-script

* remove bindings-pekko

* clean test-common

* clean rx-java

* clean the rest

* remove ledger and scala-bindings

* format

* correcting from code-review
2024-01-29 17:28:14 +00:00
mziolekda
779e84987a
use canton ledger-client (#18025)
* PoC to demonstrate the use of canton ledger-client

run-all-tests: true

* make it compile on canton-3

* remove all remnants of ledger-api-* from daml-script

* make the whole projet build

* Convert daml2-script and daml3-script to ledger-api-v2 (partially)

* Transfer some tests over to v2

* Update next batch of tests to api-v2

* Add temporary maven artifacts.

* Add maven tags to canton

* Format canton build file, rename coordinates

* Finally release passes

* Fix daml script following LedgerClient changes

run-all-tests: true

* Format canton/BUILD

* Update after merge, get all canton targets building

* Format canton/BUILD

* Fix further build issues

* Update ledgerclient to avoid GetLedgerEnd

* Update comment

---------

Co-authored-by: Samuel Williams <samuel.williams@digitalasset.com>
2024-01-26 16:14:39 +01:00
Hubert Slojewski
8bc0e8a8d7
#15209 Remove agreementText from Java codegen and bindings (#18267) 2024-01-25 14:20:24 +01:00
Paul Brauner
274120a3af
fix //language-support/hs/bindings:test (#18279)
run-all-tests: true
2024-01-25 09:51:54 +00:00
azure-pipelines[bot]
c62c9d4eea
update canton to 20240122.12366.0.v932e06e9/3.0.0-snapshot.20240122.12366.0.v932e06e9 (#18248)
* update canton to 20240122.12366.0.v932e06e9/3.0.0-snapshot.20240122.12366.0.v932e06e9

tell-slack: canton

* fix canton/BUILD.bazel

* fix the bootstrap scripts of the integration tests

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Paul Brauner <paul.brauner@digitalasset.com>
2024-01-23 17:43:22 +00:00
azure-pipelines[bot]
d88dbfcd6b
update canton to 20240119.12351.0.v919e4e65/3.0.0-snapshot.20240119.12351.0.v919e4e65 (#18228)
* update canton to 20240119.12351.0.v919e4e65/3.0.0-snapshot.20240119.12351.0.v919e4e65

tell-slack: canton

* Move package service from v0 to v30

To adapt to: https://github.com/DACH-NY/canton/pull/16527/files#diff-ab9f2213eb571819e86f0623cdd806c3603cfce1337f2a48e3453843cd97f7aa

* Remove -x suffix from participants/sequencers/mediators config

to adapt to https://github.com/DACH-NY/canton/pull/16486/files#diff-4072c28eb5ca7db19525b30a6f02f38284470f4d0deda2ade3ce6a686805f8f4

run-all-tests: true

* Take advantage of ledger-api party-notication fix in canton

https://github.com/DACH-NY/canton/issues/16073

run-all-tests: true

* Fix remote-domains -> remote-sequencers

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: oliverse-da <oliver.seeliger@digitalasset.com>
2024-01-23 12:10:40 +01:00
Hubert Slojewski
3b5dce66f5
#15209 Remove agreement text part 1 (internal changes only) (#18218) 2024-01-22 17:06:17 +00:00
Moisés Ackerman
b5fbcf8e3a
Split DA.Test.Sandbox off //libs-haskell/test-utils into //libs-haskell/canton-test-utils (#18210) 2024-01-22 14:53:35 +01:00
Raphael Speyer
d4b5dc1555
LT-45 - Java Codegen: add JSON-LF codec methods for contract keys (#18198)
The current code-gen supports encoding and decoding of contract **payload** data from and to JSON-LF format. However, it is currently missing facilities for encoding and decoding contract **keys**. This would be required by a user wishing to use codegen types to represent the content of the `contract_key` column returned by PQS.

This adds extra methods to the classes generated for templates with keys:
* static methods `keyJsonDecoder` and `keyFromJson`
* instance methods `keyJsonEncoder` and `keyToJson`
2024-01-22 12:32:46 +11:00
Paul Brauner
aa5f01df3c
no more sleep after party allocation (#18225)
* fix wrong issue number in TODO

* remove sleeps after party allocation
2024-01-19 16:22:05 +00:00
Paul Brauner
6393fd084c
Remove LF1 in the compiler (#18203)
* make lf v2 and daml3-script the default

* delete V1 integration tests

* Remove LF major version V1 from the compiler

run-all-tests: true

* fix security evidence

* fix //compiler/damlc/tests:damlc-test

* fix //compiler/damlc/tests:data-dependencies

* fix //compiler/damlc/tests:integration-v2*

* fix //compiler/damlc/tests:packaging

* fix //compiler/damlc/tests:platform-independence-dar-hash-file-matches

* fix //compiler/damlc/tests:stable-packages

* fix DarReaderTest.scala

* fix DecodeCommonSpec.scala

* fix //daml-lf/archive:proto_immutability_check

* fix DamlLfEncoderTest.scala

* fix //language-support/java/codegen:test

* fix //daml-assistant/integration-tests:integration-tests

* fix artifacts.yaml

run-all-tests: true
run-full-compat: true

* Disable scenario-perf for now

See https://github.com/digital-asset/daml/pull/18217.

run-all-tests: true
run-full-compat: true

* restore explicit target version in docs template

run-all-tests: true
run-full-compat: true

* Restore DamlLfEncoderTest.scala.

Introduce a ENGINE_LF_VERSIONS constant in daml-lf.bzl instead.

run-all-tests: true
run-full-compat: true

* delete daml-lf/scenario-interpreter/src/perf

run-all-tests: true
run-full-compat: true

* Address review comments.

* Apply

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>

* Restore golden/BUILD.bazel and port to 2.1

run-all-tests: true
run-full-compat: true

---------

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2024-01-19 15:19:34 +00:00
Paul Brauner
7ac69ceb2e
Pb/build daml against canton3 (#18103)
* Rename canton-3x to canton

* fix build

* fix BuildInfo for canton 3

* add reference drivers as a runtime dep to community_domain

* target 2.1 in interface-choices-valid

* run damlc integration tests with LF2

* fix the repl tests

* fix repl-functests

* fix package manager test

* disable V1 scala integration tests

* port the scala canton fixture to canton3

* fix JsonApiIt, using sleeps :/

* fix test-daml-packages and test-daml-ledger under //daml-assistant/daml-helper

* fix integration tests

* fix QuickstartTest.hs

* fix //daml-script/export/integration-tests/reproduces-transactions:test

* fix //daml-script/runner:tests

* fix Daml3ScriptDevIT

* fix Daml2ScriptTestRunner

* remove sleeps in functests now that a delay has been added to daml3-script's allocateParty

* fix //language-support/java/codegen:ledger-tests

* fix ScalaCodeGenIT

* remove useless sleep

* fix //language-support/ts/codegen/tests:build-and-lint-test

* remove redundant sleep and fix daml script

* fix //daml-assistant/daml-helper:test-tls

* fix CommandClientIT

* fix //daml-assistant/daml-helper:test-deployment

* Remove duplicate contract key test: not supported by canton 3.

run-all-tests: true

* fix //language-support/hs/bindings:test

run-all-tests: true

* small cleanups

run-all-tests: true

* clean up and fix compat tests

* fix build after rebase

run-full-compat: true
run-all-tests: true
2024-01-17 18:11:24 +01:00
Gary Verhaegen
c6ed4427ee
remove create-daml-app (#18173)
Why?

This is a terrible introductory application. We have no expertise in web
development (it's terribly outdated and we don't have the knowledge to
update it), so steering newcomers in that direction is disputable at
best. This example (and the associated documentation) spends more time
discussing (a very old version of) TypeScript than Daml. The use-case
presented is not one that showcases the strength of either the Daml
language or the underlying Canton ledger. It's not even a distributed
application as it assumes a single ledger.

At best, this template presents Daml as a DDL for simple wep API
definitions, but one where the resulting generated code provides no
support for authentication, external API calls, or any common
server-side tasks like sending emails.

Why now?

As we start working in parallel on 2.9 and 3.0, we are faced with the
perspective of having to do two weekly snapshots and thus having to test
both of them. Removing create-daml-app from the 3.0 branch alleviates
the testing burden quite a bit.

Daml 3.0 will be a long-term effort, and we have plenty of time to figure
out what should replace create-daml-app for this new version. If this
template was bad at showcasing Daml 2 strength, it's an even worse fit
for Daml 3.

Note that this PR removes a lot of additional tests, notably
compatibility ones. They live on in the main-2.x branch, where
compatibility tests also run.
2024-01-17 12:33:59 +00:00
Gary Verhaegen
179d85362d
update copyright (#18167)
* update copyright

* undo hack from #18168

* update hash in platform-independence-pre-check
2024-01-15 20:27:42 +01:00
azure-pipelines[bot]
88a271b5dd
update canton to 20240110.12220.0.ve226317e/2.9.0-snapshot.20240110.11694.0.vbbc5a08b/3.0.0-snapshot.20240110.12220.0.ve226317e (#18133)
* update canton to 20240110.12220.0.ve226317e/2.9.0-snapshot.20240110.11694.0.vbbc5a08b/3.0.0-snapshot.20240110.12220.0.ve226317e

tell-slack: canton

* Fix hs-bindings from canton proto change

run-all-tests: true

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Samuel Williams <samuel.williams@digitalasset.com>
2024-01-11 22:30:47 +01:00
mziolekda
f0a0c6d2c2
Remove http json (#18131)
* remove http json from daml-script

* remove http-json from ts

* remove http-json

* Fix daml-assistant

run-full-compat: true

* Fix broken test

* remove drepeated test

* remove commands running via http-json

* fix the build

* changes from code-review:

* anotehr attempt at fixing the build
2024-01-11 18:08:08 +00:00
Gary Verhaegen
e80615ea01
bump semver in ts tests for real (#18043) 2023-12-15 16:31:13 +01:00
Gary Verhaegen
461bd36935
bump semver in ts tests (#18042) 2023-12-15 15:42:55 +01:00
dependabot[bot]
0953ddf21b
Bump tough-cookie from 4.0.0 to 4.1.3 in /language-support/ts/packages (#18016)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 17:02:03 +00:00
dependabot[bot]
58c32684ba
Bump semver from 5.7.1 to 5.7.2 in /language-support/ts/codegen/tests/ts (#18013)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 13:51:43 +00:00
dependabot[bot]
96be964fde
Bump word-wrap from 1.2.3 to 1.2.5 in /language-support/ts/packages (#18011)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 22:35:25 +00:00
dependabot[bot]
2f7db8ff3e
Bump word-wrap in /language-support/ts/codegen/tests/ts (#18009)
Bumps word-wrap from 1.2.3 to 1.2.5.

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 20:12:02 +00:00
dependabot[bot]
f0c2c966b5
Bump json5 from 2.2.0 to 2.2.3 in /language-support/ts/packages (#18007)
Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 18:10:18 +01:00
dependabot[bot]
ff18f64df4
Bump json5 from 2.2.1 to 2.2.3 in /language-support/ts/codegen/tests/ts (#18003)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 13:18:59 +00:00
dylant-da
40b5eb8476
Fix split release for deps (#17968)
* Resolve release version for sdk build checks

* lint

* lint

run-full-compat: true

* Simple test for using daml-script in release versions

* Fix build issues in tests using pSdkVersion

run-full-compat: true

* Fix build issues with DamlcIntegration

* fix bad sdk version being an invalid version

run-full-compat: true

* Fix the linux "mmap 4096 bytes at (nil): Cannot allocate memory" error

* Fix compat tests on Windows

run-full-compat: true

* test windows os correctly

run-full-compat: true

* temporarily disable canton_3x

run-full-compat: true

---------

Co-authored-by: Paul Brauner <paul.brauner@digitalasset.com>
2023-12-05 23:46:27 +01:00
Remy
96f16df3c0
remove script/trigger/cantonFixture deps on scala-bindings (#17954)
Basically we remove the dependency of different components on "//language-support/scala/bindings" by:

- replacing com.daml.ledger.api.refinements.ApiTypes.Party by com.daml.lf.data.Ref.Party
- replacing com.daml.ledger.api.refinements.ApiTypes.ApplicationId by Option[com.daml.lf.data.Ref.ApplicationId] (here we use option as ApiTypes.ApplicationId allows empty string while Ref.ApplicationId does not).
- adding rounding logic for timestamp in com.daml.lf.data.Time.Timestamp and use it instead of the one from com.daml.api.util.TimestampConversion

Note we did not clean daml-sript export as it have never pass the alpha stage and will be dropped with the 3.x fork.
2023-12-05 15:08:09 +00:00
mziolekda
34743570bd
Rewire the build to use ledger-api within canton (#17959)
* Rewire the build to use ledger-api within canton

* same for canton-3

* fix buf

* fix buf again

* remove references to canton from canton-3x
2023-12-04 16:11:13 +01:00
Paul Brauner
dbeb172e07
Make more tests main-only (#17963) 2023-12-04 15:37:36 +01:00
mziolekda
7e2aa7cece
Adopt the repository to the movement of java bindings (#17913)
* Make java bindings compile in new place

* fix a mysterious grpcurl error
2023-11-30 22:43:35 +01:00
Andreas Triantafyllos
b8eebc6ddd
Convert conformance tests to use java bindings (#17894) 2023-11-29 16:34:06 +00:00
dependabot[bot]
75413dd0d4
Bump protobufjs from 6.11.3 to 6.11.4 in /language-support/ts/packages (#17942)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.3 to 6.11.4.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/commits)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 16:58:39 +01:00
dependabot[bot]
ce5f045de4
Bump @babel/traverse in /language-support/ts/packages (#17936)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.16.0 to 7.23.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.4/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 08:46:40 +01:00
Raphael Speyer
b5aa167a97
LT-36: remove java bindings for deprecated ContractMetadata (#17914)
ContractMetadata is deprecated and has been replaced with an opaque byte array, in a field called `created_event_blob` in the api protos, and a column called `metadata` in Scribe. I don't think we need a wrapper type for this data. When reading out of scribe, we'd typically be using it to build a `DisclosedContract`, and we have a Java type for that, so I think that would be the anchor we'd use when reading.
2023-11-28 13:33:58 +11:00
Raphael Speyer
dd98b77fc7
Java codegen: better naming hygiene (#17861)
* ensure we java-sanitise the names of type variables when building identifiers for JSON decoding and encoding these types
* avoid name clashes (obscuring) when the package-qualified name of a type begins with the same identifier as a field name
2023-11-24 20:12:02 +11:00
Raphael Speyer
115a99e419
Java bindings: add options to JSON encode numeric and int64 as string, and make that the default (#17868)
Fixes https://github.com/digital-asset/daml/issues/17761
2023-11-24 14:40:33 +11:00
Paul Brauner
2b28e59017
Introduce LF 2.1 (#17865) 2023-11-23 08:59:14 +01:00