Commit Graph

1086 Commits

Author SHA1 Message Date
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
Erwin Ramirez
fc03cef4d6
LT-32: events by x support in java (#17879)
* added event query service java bindings

* fixed typo

* formatting

* address comments
2023-11-23 14:42:21 +11:00
dependabot[bot]
dd63487bfc
Bump @babel/traverse in /language-support/ts/codegen/tests/ts (#17883)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.18.13 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-22 15:52:16 +01:00
dylant-da
234d003f0c
Supporting version splitting in Daml Assistant and Daml Compiler (#17682)
* initial implementation supporting version splitting in assistant

stubbed out implementations of resolveReleaseVersion/other resolution

* implement resolveReleaseVersionFromGithub

* continue work on fixing SDK/release version split

* First commit that successfully runs `daml-head install <split version>`

* fix tests

* Ignore snapshot/metadata for isHeadVersion

* remove log debugging

* Fix tests for getSdk

* refactor DA.Daml.Project.Types.defaultSdkPath

* enable incremental changes to version cache

* Allow resolveReleaseVersionFromGithub to fail via Either

* Split getSdkVersionFromSdkPath into get{Sdk,Release}VersionFromSdkPath

* Add resolveReleaseVersionFromDamlPath/Github to resolveReleaseVersion

* Add mock sdk config with version

* Remove getInstalledSdkVersions dependency on Cache

* add override for github version api endpoint, useful for mocking

* Add alternate-download to provide alternate tarball install resolution

* initial work on comprehensive autotester

* Copyright header

* fix build generation to have valid Main.daml

* improve error message for check_daml_install_nonzero

* Make killing miniserve processes more robust

* remove breakpoint

* Implement `daml build` tests

* Solve TODO in installExtracted to resolve sourceSdkVersion coherently

Supply useful error message with it.

* Return SdkVersion from sdkVersionFromReleaseVersion for typechecking

* Finish tests for tarball build, drop installed_already_behaviour

* Try to force-reload cache on tar failure, fix `Possible fix:` notes

* Add AllowInstallNonRelease as a flag

* Test allow_nonrelease, refactor, clean up setup_sandbox

* Move no_cache_override_github_endpoint API response into file

* Remove dead code, vestigial code

* Remove TODOs that no longer are relevant

* fix iAllowInstallNonRelease in InstallOptions for autoInstall

* Refactor alternateVersionLocation

* (Try to) lint language-support/ts/codegen/BUILD.bazel

* fix daml-assistant/test

* Enable allow_nonrelease post-build checks

* Remove writeFile debugging from DA.Daml.Assistant.Version

* Replace ../test-daml-yaml-install/test.sh with test-all-installs.sh

* lint

* more lint

run-full-compat: true

* Stop tracking API response in test-daml-yaml-install

* Move ReleaseResolution into Version

* remove extra deps, fixes daml-project-config-cabal-file-matches

* Move InstallLocation to minimize changes to DA.Daml.Project.Types

run-full-compat: true

* Create cachePath in daml-assistant tests that need it

* Bind to unused ports in test-all-installs.sh

run-full-compat: true

* Override via files instead of just URLs

run-full-compat: true

* Remove unused RELEASES_ENDPOINT

* Use dict keys instead of hardcoding in test-all-installs listing

* Refactor to remove check_daml_install_from_tarball_after_cache_reload

* Improve comment on update_cache

* Move shift before cases

* Add comment for unsafeParseReleaseVersion

* Rename unsafeParseReleaseVersion into unsafeParseOldReleaseVersion

* remove done todo

* Add some hungarian notation to resolveReleaseVersionFromDamlPath

* drop redundant let

* Define ordering over ReleaseVersion

run-full-compat: true

* use sdkVersion for codegen

* Use `urls` attribute in http_file, `url` is unsupported on Windows (!)

run-full-compat: true

* Remove unnecessary check for cache reload

run-full-compat: true

* Try use daml executable directly without daml-sdk-0.0.0

run-full-compat: true

* try force daml.exe to daml

run-full-compat: true

* Use daml.exe when windows is detected

* add windows tarballs for snapshots

* Fix most tests on windows, "line too long" breaks some tarball tests

run-full-compat: true

* Point to more recent snapshot post Moises's fixes

* Add os-specific tarball paths and alternate-download

run-full-compat: true

* Fix windows autoinstall with 0.0.0

run-full-compat: true

* Fix error message, remove daml_install_output catching

* Detect "The input line is too long" in other post_failed commands

* Fix missing releases endpoint, handle "cannot find the path specified"

run-full-compat: true
2023-11-22 14:24:13 +00:00
Raphael Speyer
7d302e4ef3
Java codegen: avoid clashes between template names and nested classes. (#17848) 2023-11-20 20:21:22 +11:00
mziolekda
b81ee69abe
disentangle ledger api (#17831)
* make testing-utils independent of ledger-api

* remove dead files

* move non ledger-api stuff to libs-scala
2023-11-14 22:44:10 +01:00
Marton Nagy
6933514df5
Switch from Akka to Pekko (#17814)
* Automated renames by bash script

This commit is exclusively contains changes by the bash script.
For the bash script is present at the pull request.

* Manual pekko migration changes

* adapt fully qualified name references
* adapt pekko package declarations
* adapt bazel files with dependency changes
* adapt canton pekko lib shade_rule
* adapt logger configuration declarations
* pin maven dependencies
* revert incorrect changes by script to compatibility module

Workarounds for further TODOs:
* disable http-json-perf and libs-scala/gatling-utils modules to maintain clean pekko dependencies (without akka)
* disable GraphQLSchemaSpec test (sangria library needs to be upgraded)

* Formatting
2023-11-13 23:22:22 +00:00
Stefano Baghino
9d44c23b9b
Make TransactionFilter.toProto public (#17809)
* Make `TransactionFilter.toProto` public

We are in the process of enabling the usage of the Java bindings from the
Canton Console. In order to do so in a backward-compatible fashion, we
often rely on existing Scala code and use the Protobuf representation as
a bridge between the two. Unfortunately the fact that the `toProto` method
on `TransactionFilter`s is package-private forced us to temporarily add
a conversion method located within the package that re-exported it publicly
for usage as part of the Canton Console. This change should enable us to
remove this workaround. I would be happy to hear other possible approaches
to consider.

* Update subclass
2023-11-13 15:54:00 +01:00
mziolekda
255da35e2b
Remove deprecated fields (#17740)
* align canton bazel rule with DACH-NY/canton#15189

* formatting

* modify grpc

* fix LAPITT

* make triggers and java bindings compile

* fix compatibility
run-full-compat: true

---------

Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2023-11-13 13:58:58 +01:00
Marton Nagy
78cc750714
Scala upgrade to 2.13.11 (#17803) 2023-11-13 09:05:39 +01:00
Remy
6ef062dac9
Revert "Nmarton/pekko rebased (#17789)" (#17796)
This reverts commit d310692d1b.

@remyhaemmerle-da messed up and merged the PR too fast.
2023-11-09 21:23:18 +00:00
Marton Nagy
d310692d1b
Nmarton/pekko rebased (#17789)
* Scala upgrade to 2.13.11
* Switch from akka to pekko
* Also disable gatling based libs to start from a clean stage
2023-11-09 18:17:33 +01:00
Paul Brauner
313b789731
Bump netty and grpc-netty (#17770)
* pin dependencies to json and add missing dep

* fix cyclic dep

* remove unused dep

* add missing dep to //ledger-api/testing-utils:testing-utils

* remove unused dep in //ledger/ledger-api-auth:ledger-api-auth

* remove more unused deps

* more dep fixes

* yet more dep fixing

* more fixing..

* more of the same

* hopefully the last deps to fix

* Bump the version of protobuf and fix everything that depends on it. Took shortcuts that I need to fix in a next commit, but would like to run the CI on this now that it compiles

* don't error out in the grpc-haskell patch

* remove obsolete patch

* patch absl to compile on mingw

* Add a patch to recognize the compiler

* Define _DNS_SD_LIBDISPATCH for macOS gRPC

* bump netty_tcnative_version according to https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty

* pin maven deps

* Fix macos linking errors 'dyld[xxx]: missing symbol called'

* Skip Darwin frameworks in package-app.sh

* pin stackage packages

* pin stackage windows deps

* use the netty version agreed on

* bump the windows global cache to try and debug the upb issue

* restart the CI after timeout

* clean up

* disable failing tests for now

* comment out unused code

* reset the windows machine name to 'default'

---------

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2023-11-07 19:35:50 +01:00
tudor-da
93653b4335
Add CreatedEvent.createdAt in Java bindings (#17741)
* Add CreatedEvent.createdAt in Java bindings

* Fix TransactionsClientImplTest

* Update language-support/java/bindings/src/main/java/com/daml/ledger/javaapi/data/CreatedEvent.java

Co-authored-by: Raphael Speyer <raphael.speyer@digitalasset.com>

---------

Co-authored-by: Raphael Speyer <raphael.speyer@digitalasset.com>
2023-11-07 07:42:19 +00:00
azure-pipelines[bot]
9ea0c3089f
update canton to fd561690 (#17754)
* update canton to fd561690

CHANGELOG_BEGIN
CHANGELOG_END

* Disable explicit setting of explicit disclosure

---------

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Tudor Voicu <tudor.voicu@digitalasset.com>
2023-11-06 11:05:44 +00:00
tudor-da
445a037c3e
Adapt JSON API server to the new explicit disclosure Ledger API interface (#17684)
* Adapt JSON API write path to the new explicit disclosure Ledger API interface

* Address review comments

* Switch to vanilla Base64 for createdEventBlob instead of Base64Url

* update TypeScript bindings of DisclosedContract to use the createdEventBlob field instead of payload, payloadBlob and metadata, and short-circuit a test which depends on canton populating the createdEventBlob field

* get TypeScript integration tests to use transaction service to get created_event_blob data

---------

Co-authored-by: = <=>
2023-11-02 12:35:03 +00:00
tudor-da
dd99f44073
Adapt Java bindings to latest changes in Explicit Disclosure (#17665)
* WIP

* Fixes

* Adapted to latest changes
* create_event_payload -> created_event_blob
* non-backwards compatible wrt CreatedEvent and DisclosedContract

* Update language-support/java/bindings/src/main/java/com/daml/ledger/javaapi/data/Filter.java

Co-authored-by: Raphael Speyer <raphael.speyer@digitalasset.com>

* Update language-support/java/bindings/src/main/java/com/daml/ledger/javaapi/data/Filter.java

Co-authored-by: Raphael Speyer <raphael.speyer@digitalasset.com>

* Fix comment

---------

Co-authored-by: Raphael Speyer <raphael.speyer@digitalasset.com>
2023-11-01 09:02:50 +00:00
dylant-da
61dc8d49b2
Fixes issue with Ledger class in app-dev/bindings-ts/daml-ledger/ (#17704) 2023-10-31 17:03:51 +00:00
Raphael Speyer
fe66fd7419
LT-30: fix java codegen when uppercase enum data constructor clashes with type name (#17698)
Fixes https://github.com/digital-asset/daml/issues/17692

Fixes the error from the `jsonEncoder` method (which was about `javac` mis-interpreting a method reference), and the warnings in `toValue`, `valueDecoder` and the initialiser for `__enums$`, which did not need to qualify the static identifiers by class name.
2023-10-31 20:43:17 +11:00
Paul Brauner
db91552b4a
replace community canton snapshot with our bazel-built canton deploy jar (#17651)
* replace community canton snapshot with our bazel-built canton deploy jar

* add VERSION to the resources of the jar

* fix canton-test-runner-with-dependencies-script

* add resources to community_common

* Update test-common/canton/it-lib/src/main/com/daml/CantonFixture.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

---------

Co-authored-by: Remy <remy.haemmerle@daml.com>
2023-10-30 10:23:15 +00:00
Raphael Speyer
b4b55a3a7b
HOTFIX: avoid breaking code that is created with "daml codegen" from older SDK but links against more recent java-bindings (#17648)
We provide a default implementation of `jsonEncoder` for `codegen.DefinedDataType`. This will fail if called, but older codegen will presumably not want to call `toJson` because it was not previously provided.

This is to unbreak the `canton` repo. See
https://app.circleci.com/pipelines/github/DACH-NY/canton/59000/workflows/58a9cfae-4e75-4062-b9c4-dbbf9544dc46/jobs/1576433/parallel-runs/0/steps/0-117
2023-10-25 12:01:50 +11:00
Raphael Speyer
e9d29b1c4f
LT-35: add codegen for json encoding (#17624)
To avoid excess duplicate code-gen, I put the implementation of `toJson` into the parent interface `DefinedDataType`, and leverage the `jsonEncoder()` in each generated subclasses. However custom datatypes with type parameters have a different signature of `toJson(...)` as they need to pass in arguments for encoders for each type arg, so we generate a custom `toJson(...)` for those classes. I also do a static import of the `JsonLfEncoder.apply` method, as a useful uniform syntax for calling either `Function` objects or method references (e.g. `JsonLfEncoder::bool`). That required propagating the static imports up from the various methods that need them, and adding them at the `JavaFile.Builder` level.

I changed all the integration tests that did `fromJson` from a hard-coded string, into round-trip tests a la `Foo.fromJson(foo.toJson())`, now that we have `toJson`.

Also add a benchmark, which can be run with
```
bazel run //language-support/java/codegen:to-json-bench
```
Locally I currently get these results.
```
# Run complete. Total time: 00:00:56

Benchmark                          Mode  Cnt         Score        Error  Units
ToJsonBench.enummodBox            thrpt   10   8138043.644 ± 197223.048  ops/s
ToJsonBench.enummodColoredTree    thrpt   10   3132500.885 ±  23677.832  ops/s
ToJsonBench.enummodOptionalColor  thrpt   10  10762883.904 ± 116865.102  ops/s
ToJsonBench.genmapmodBox          thrpt   10   1554965.578 ±   4956.210  ops/s
```
 The `Score` is the number of times the sample values can be converted to json per second.
2023-10-24 21:11:19 +11:00
mziolekda
25ae8d2281
Explicit disclosure based on blobs only (#17606)
* Explicit disclosure based on blobs only

* cosmetic changes

* Changes post-review

* remove buf check suppression

* Silence deprecation warnings

* more silencing of deprecation warnings

* Changes after recent round of reveiews
2023-10-23 13:47:30 +00:00
Raphael Speyer
a4e898c252
LT-35: create JsonLfEncoders in java bindings (#17603)
No code-gen yet.

Also pulled out the common test fixtures to share between encode and decode tests.
2023-10-23 16:33:12 +11:00
Gary Verhaegen
4660b08f25
remove docs theme (#17455)
It's moving to the docs repo, where it belongs.
2023-10-19 16:53:28 +02:00
Raphael Speyer
fc88867925
LT-35: pull JsonLfDecoders out from JsonLfReader.Decoders (#17569)
Mostly mechanical change, pulling nested static class `JsonLfReader.Decoders` out into its own class `JsonLfDecoders`.

Previously the nested class could access private members of `JsonLfReader`. I've now made the relevant methods package-accessible, and the fully private components such as anything from the jackson library are properly private. `currentText()` becomes the single way for `JsonLfDecoders` to read the current value.

This change will mirror what we'll then do with the upcoming `JsonLfEncoders`.
2023-10-17 15:16:12 +11:00
Gary Verhaegen
28eadc6e69
fix CODEOWNERS & related files (#17579) 2023-10-16 18:37:14 +02:00
Moritz Kiefer
ba60571a52
Support record up/downgrades in Java codegen (#17486)
* Support record up/downgrades in Java codegen

This adds enough upgrading support to the Java codegen to use it
against the current upgrading PoCs. This is backwards compatible so I
enabled it in all cases instead of trying to add a flag somewhere.
2023-10-12 11:27:34 +02:00
Raphael Speyer
a11b8708de
LT-36: add DisclosedContracts and thread it through CommandsSubmission (#17538)
Also rename the private `SubmitCommandsRequest.toProto` method which is used by the deprecated but public `toProto` overloads, to `deprecatedToProto`. The passing of disclosed contracts is not supported by these deprecated overloads.

This PR does not provide facilities for building a `DisclosedContract`, either as read from Scribe or from whatever format it may have been published or shared.
2023-10-11 20:46:53 +11:00
Raphael Speyer
6d2277ba29
LT-30: Java codegen: add fromJson method to interface view companions and getJsonDecoder method to decoder class (#17541) 2023-10-11 20:46:16 +11:00
Paul Brauner
f4ee00361e
Make LF v2 non backwards-compatible with LF v1 in the compiler (#17492)
* initial commit

* split gen-stable-packages-v_i into two targets

* rename compatibleWith to canDependOn

* update damlc integration tests annotation to allow for 2.x

* use the right package ID for preconditionFailed when compiling to V2

* fuse stable-packages-v1 and stable-packages-v2 into one single filegroup

* Fix DA.Daml.LF.Ast.Tests

* remove leftover 'undefined' in Version.hs

* progress on fixing DataDependencies.hs

* fix Cross-SDK typeclasses test for 2.dev

* Fix the 'Typeclasses and instances' data dependency test

* Update comment

* fix //compiler/damlc/tests:packaging

* Add TODO

* parameterize the machine by the langage version, hardcode v1 in script v2, v2 in script v2, v1 in exports

* get EngineTests to pass

* fix more tests

* fix canton integration tests

* formatting

* fix more tests

* fix transactionversiontest

* fix exceptiontest

* Fix ValueEnricherSpec

* Fix EngineInfoTest

* fix PartialTransactionSpec

* fix upgragetest

* fix TransactionSnapshot

* Fix ContractKeySpec

* Fix ReinterpretTest

* fix InterfaceViewSpec

* fix InterfacesTest

* fix stable package v1 names

* fix validate.sh tests

* formatting

* Fix ChoiceAuthorityTest

* fix explicit disclosure test

* Fix SpeedyTest

* formatting

* Fix integration test

* fix data dependency tests

* fix package vetting count, increased due to metadata being added

* Redact stable package IDs in error messages in order for the ExceptionSemantics test to work for both v1 and v2

* cleanup

* fix Daml2ScriptTestRunner

* fix JsonApiIT and daml-script golden tests

* fix daml3-script runner test

* enable v2 for all integration tests

* formatting

* fix NodeSeedsTest

* fix since-lf annotations

* add comments, improve consistency

* stop hardcoding V1 in runPureExpr and runPureSExpr

* formatting

* remove harcoding of LFv1 in ConcurrentCompiledPackages.apply

* Parameterize Compiler.Config.Default with major language version

* remove global parser implicit and default package ID and language version
2023-10-11 11:40:17 +02:00