Commit Graph

11052 Commits

Author SHA1 Message Date
Remy
0bba409d0e
[LF] Make ApiCommand.Exercise work directly with type constructor (#15360)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-26 18:13:38 +00:00
Stefano Baghino
96fb3be3e3
Add intro page for off-ledger automation with Daml (#15362)
* Add intro page for off-ledger automation with Daml

This is meant as a page to introduce Daml Script (as an off-ledger automation
tool) and Daml Triggers. This will require this page to be added to the
table of contents in the appropriate place in a separate PR in the
documentation repository.

changelog_begin
changelog_end

* Apply suggestions from code review

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>

* Rephrase, reformat

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>
2022-10-26 16:02:13 +00:00
Moisés Ackerman
2bcb7a432e
Define price in 'Intro: Exceptions' using template parameter instead of local let (#15358)
This fixes #15256

changelog_begin
changelog_end
2022-10-26 15:43:56 +00:00
azure-pipelines[bot]
52b7d18480
rotate release duty after 2022-10-26 (#15355)
@dylant-da is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-26 16:55:14 +02:00
Stephen Compall
7da769f37f
test number of query results after overlapping contract IDs in database (#15316)
CHANGELOG_BEGIN
CHANGELOG_END

* add single-party test case as well
2022-10-26 10:13:33 -04:00
Carl Pulley
c407c4b635
Versioned triggering and correct parsing of TransactionMsg
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-26 15:08:37 +01:00
Chun Lok Ling
fd9676754c
Add Update<R> to exercise and create method result types in Java codegen (#15193)
* pre

* address Stephen's comments

* get command from Update<R>

* to public

* generateDeprecatedFlattenedStaticExerciseByKeyMethod

* Ensure interface generation uses package prefixes

CHANGELOG_BEGIN
- [BUGFIX] Interface generation now respects package prefixes argument. This means generated interfaces will now be placed in the right subpackages.
CHANGELOG_END

* packagePrefixes

* fix what exercise* returning update breaks

* doc

* format

* WIP

* address comments

* compile

* added 2 utility methods in CommandClient for getting the result of submitted commands to demonstrate value of Update R

* address some comments

* update line number

* rename

* fold for create and exercise cases

* move transaction logic to fold

* revert config

* argTypeDecoder

* add internal api doc

* rename to Choice

* quickstart doc

* use update

* address comment

* address comment on compactability issue

* move abstract static class FoldUpdate<Z>  to Update<>

* change command clients to use List<? extends HasCommands> instead of List<Command>

* move fold to update

* compare commands

* Update docs/source/app-dev/bindings-java/quickstart.rst

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>

* address comments

* address comments

* add changelog

CHANGELOG_BEGIN
- [Java codegen] Replace return type to Update<R> of exercise and create methods in Java codegen
CHANGELOG_END

Co-authored-by: Fayi Femi-Balogun <fayimora.femibalogun@digitalasset.com>
Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
2022-10-26 14:53:06 +01:00
carrielaben-da
6777267bb7
Removing Chapter Numbers From Daml/Intro (#15353)
This allows additional chapters to be added in the future without disrupting existing pages.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com>
2022-10-26 09:40:26 -04:00
Rafael Guglielmetti
45be0c6cfa
Enable interfaces on protocol version 4 (#15320)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-26 12:00:01 +02:00
Moisés Ackerman
484c40acb5
Update "Reference: Daml Packages" (#15324)
* Remove mention of FunctionalDependencies as data-dependencies caveat

FunctionalDependencies in data-dependencies have been supported since #7698

changelog_begin
changelog_end

* Remove mention of advanced type system features as data-dependencies caveat

module DA.Generics and language extension DeriveGeneric have long been removed
from the language, and I couldn't think of other similar "advanced type
system features" that work for plain dependencies but not for data-dependencies.

* Extend list of data dependable extensions
2022-10-26 11:56:29 +02:00
Gary Verhaegen
382b091f77
ci: document node handling a bit more (#15339)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-26 11:03:27 +02:00
azure-pipelines[bot]
dd0310f66c
bump canton to 20221025 (#15356)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-26 11:02:36 +02:00
pbatko-da
6fa4abf91b
[DPP-1231] Add a conformance test where we update a non-local party's annotations #15287
changelog_begin
changelog_end
2022-10-26 10:25:24 +02:00
Nicu Reut
29a2c54682
Add opentelemetry metrics implementation [PLEN-29] (#15346) 2022-10-25 17:00:24 +00:00
Stephen Compall
e1ff695d5e
less stringly websocket testing (#15330)
* use encoder for an exercise
* make ContractDelta a bit less magic
* encode a CreateCommand

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-25 16:31:38 +00:00
Stephen Compall
7e7a8f2f2e
use domain.Party instead of String in json-api tests (#15329)
* use domain.Party instead of String in jwtForParties, headersWithPartyAuth

CHANGELOG_BEGIN
CHANGELOG_END

* use domain.Party instead of String in headersWithPartyAuth

* fix sharedAccountCreateCommand and some corners
2022-10-25 11:31:26 -04:00
Nicu Reut
8da0a84183
Introduce explicit timer API for stopping a timer [PLEN-29] (#15344) 2022-10-25 14:44:32 +00:00
Moisés Ackerman
0dbc0424b8
Clean dlint flags (#15290)
* Clean `dlint` flags

changelog_begin
changelog_end
2022-10-25 16:12:38 +02:00
Stefano Baghino
0e995f27a7
Remove outdated docs referring to 1.18.x features (#15337)
The development of the Helm Chart halted after 1.18.x to make room
for other priorities, including a better documentation of operational
concerns as a way for users to bridge the gap we were originally
trying to fill with the Helm Chart. The pages remained in the
documentation as we were hoping for the feature to go back into
active development but since the feature is not actually working and
we do not have short term plans to revive it (and possibly not in
the current form) it is better to just yank the content until
we have a better understanding of where we want this to go.

If by any chance we want to restore the feature more or less in
its current form, restoring this document from a previous version
requires very little effort while simultaneously we do not cause
confusion by documenting a feature that does not work with the
current version.

changelog_begin
changelog_end
2022-10-25 15:48:25 +02:00
dylant-da
a205378b7a
Point to merged GHC changes for AnyView (#15343)
* Point to merged GHC

* satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-25 13:23:11 +00:00
azure-pipelines[bot]
a6dde8eb71
update NOTICES file (#15333)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-25 14:08:14 +02:00
Gary Verhaegen
4a8efb84cc
run trigger & script compat tests on PRs (#15334)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-25 14:05:51 +02:00
dylant-da
da8064de64
Add AnyView with HasFromAnyView instances (#15280)
* Implement AnyView as a stable package / primitive

* Point to updated GHC

* Export AnyView datatype, move typeclasses, fix convertPrim

* Adjust AnyView w/ InterfaceTypeRep, implement {to,from}AnyView

* fix lint, satisfy changelog

CHANGELOG_BEGIN
CHANGELOG_END

* fix daml-desugar

* Has{From,To}AnyView instances in daml-docs

* Add DA.Internal.Interface.AnyView to LibraryModules for stdlib

* Fix hash for DA.Internal.Interface.AnyView

* Prefix AnyView with CurrentSdk, add to golden for daml-script test

* Remove HasToAnyView

* Split AnyView into AnyView and AnyView.Types

* fix hash

* Remove unused StandaloneDeriving

* Add HasField instances (requires relevant workers)

* Accept desugaring test changes for removal of HasToAnyView

* Update daml-doc for removal/modification of HasToAnyView/HasFromAnyView

* Update StablePackage hash for DA.Internal.Interface.AnyView.Types
2022-10-25 11:49:32 +00:00
Nicu Reut
f550b69463
Reorganize the metrics package structure [PLEN-29] (#15312) 2022-10-25 10:05:40 +00:00
azure-pipelines[bot]
5cac6f254f
bump canton to 20221024 (#15332)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-25 08:41:59 +00:00
Stephen Compall
c8adc54ad9
do not use the external definition of "serializable" (#15328)
"ones whose values can be written in a text or binary format" is a very
misleading definition to give for "serializable types" in the context of
Daml.

When we say "serializable" in Daml, we *always* mean the formal Daml-LF
definition given in "Serializable types" in daml-lf-1.rst, i.e. ⊢ₛ τ, or
"τ derives from the rules S".  That is also what we mean here.

There are many examples of types "whose values can be written in a text
or binary format", that are nevertheless *not* derivable from S.

As it says in daml-lf-1.rst, "serializable types are the types whose
values can be persisted on the ledger".  So we copy over something like
that language.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>
2022-10-24 18:33:45 -04:00
Chun Lok Ling
1730a96515
javapoet space instead of literally space (#15326)
* javapoet space instead of literally space

* javapoet space instead of literally space

* add change log

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-24 20:21:45 +01:00
Nicu Reut
8957a3a426
Add opentelemetry metrics integration on the same prometheus endpoint [PLEN-4] (#15232) 2022-10-24 16:50:27 +00:00
fayi-da
e3dcaf8aaf
Hide internal APIs (#15325)
* Hide internal APIs

CHANGELOG_BEGIN
CHANGELOG_END

* Formatting

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-24 16:49:53 +01:00
fayi-da
7762d2a376
Removed unnecessary log message (#15323)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-24 14:35:18 +01:00
azure-pipelines[bot]
5aa6c55a02
update NOTICES file (#15321)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-24 11:21:58 +02:00
Remy
5f8c39dde4
Relese ledger-api-test-tool for 1.15 (#15322)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-24 08:41:39 +00:00
Remy
15dd81b524
[Trigger] update Created with interface (#15299)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-24 10:00:01 +02:00
tudor-da
1a4ef5b238
Revert "Upgrade dependencies to their latest stable release (#15216)" (#15309)
This reverts commit 1454497f

changelog_begin
changelog_end
2022-10-24 08:33:37 +02:00
atriantafyllos-da
322de044b6
Dpp 1273 elevate qualification on the important metrics to debug (#15294)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-23 19:23:40 +00:00
azure-pipelines[bot]
db307e55e3
bump canton to 20221021 (#15317)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-22 11:55:54 +02:00
Stefano Baghino
7aaec19fd9
Link main Canton console doc from intro (#15313)
changelog_begin
changelog_end

Follow up to https://github.com/digital-asset/daml/pull/15292#discussion_r1001459934
2022-10-21 15:36:45 +00:00
azure-pipelines[bot]
b31638f2d4
bump canton to 20221020 (#15305)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-10-21 14:57:40 +00:00
Nicu Reut
5b4c7f7677
Extract metrics API that is decoupled from dropwizard [PLEN-28] (#15231) 2022-10-21 16:30:21 +02:00
Marton Nagy
20a639467b
Implement wiring of additional gRPC services (#15301)
changelog_begin
changelog_end
2022-10-21 15:59:35 +02:00
Rafael Guglielmetti
5a16aa76f6
Small changes in interoperable ledgers doc (#15307)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-21 13:34:13 +00:00
Stefano Baghino
ec3aea29ca
Replace old logo in 404 screen (#15308)
Mostly copied from `//templates/create-daml-app/ui/public/daml.svg` with
tweaks to center it like the old logo.

changelog_begin
changelog_end
2022-10-21 15:33:58 +02:00
Stefano Baghino
c217883c51
Provide an introduction to the Canton Console (#15292)
* Provide an introduction to the Canton Console

The purpose of this page is to expose developers to the availability of the Canton Console
as part of the SDK to interact with the Sandbox, provide tips on how to consult the built-in
documentation and provide further pointers to the in-depth documentation page part of the
Canton user manual.

changelog_begin
changelog_end

* Apply suggestions from code review

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>
2022-10-21 13:12:36 +00:00
Gary Verhaegen
5f126897e5
dev-env: pin msys2/mingw (#15311)
* dev-env: pin msys2/mingw

Today the postgresql 12.4 artifacts were purged from the msys2 primary
mirrors. I was able to find a copy on some old mirrors (I downloaded
from [mirrors.piconets.webwerks.in], [mirrors.aliyun.com], and
[mirror.iscas.ac.cn]), but that raised the question of where to put the
binary so our CI nodes can access it. I decided to put it on one of our
GCS buckets, and while I was there I did the whole msys2 set of
packages.

Does this manually may not be the best path forward for a long-term
solution (though maybe it is; they tend not to change all that often),
but it does unblock us right now.

For the postgresql binary specifically, I have checked that the three
mirrors give me the exact same file between them, and that it matches
the old hash. For the other files, I downloaded them from the primary
mirror ([repo.msys2.org]) and checked that the hashes match the recorded
values in our JSON manifest.

CHANGELOG_BEGIN
CHANGELOG_END

[mirrors.piconets.webwerks.in]: https://mirrors.piconets.webwerks.in/msys2-mirror/mingw/x86_64/mingw-w64-x86_64-postgresql-12.4-1-any.pkg.tar.zst
[mirrors.aliyun.com]: https://mirrors.aliyun.com/msys2/mingw/x86_64/mingw-w64-x86_64-postgresql-12.4-1-any.pkg.tar.zst?spm=a2c6h.25603864.0.0.32b23240Qp8jCL
[mirror.iscas.ac.cn]: https://mirror.iscas.ac.cn/msys2/mingw/x86_64/mingw-w64-x86_64-postgresql-12.4-1-any.pkg.tar.zst
[repo.msys2.org]: https://repo.msys2.org/mingw/x86_64/
2022-10-21 14:14:30 +02:00
Remy
4fa22e85c1
[Triggers] Version Trigger Daml code (#15298)
We track in `DA.Trigger.Internal` the version of the API between the Daml code and the scala code of the Triggers.

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-21 11:36:59 +02:00
Gerolf Seitz
1bab150d7f
slf4j-api:1.7.36, logback:1.2.11 (#15291)
* slf4j-api:1.7.36, logback:1.2.11

CHANGELOG_BEGIN
CHANGELOG_END

* Use HikariCP 4.x, as 5.x pulls in slf4j-api 2.x as well

* Revert Hikari CP to 3.4.5 since 4+ brings slf4j-api 2+

Co-authored-by: Tudor Voicu <tudor.voicu@digitalasset.com>
2022-10-20 19:12:46 +02:00
Stephen Compall
31942d46ee
make resolver preserve ContractTypeId type *and* class (#15282)
* move resolveTemplateId to ContractTypeIdMap
* replace the contractTypeIdMap with an interfaceIdMap
* remove ResolveContractTypeId's type parameter, replace with Overload relation
* define the ContractTypeId resolver to be overload, ctid-type-sensitive
* remove AnyKind usages
* remove resolveTemplateId argument-passing

* demonstrate very strange inserted cast
`x.packageId` inserts a cast on `x` to `ContractTypeId.Template`, for
which there is no local evidence
* fix compiler-inserted cast problem
- Why does this fix it?  Who knows!

* failure of template ID resolution no longer fails later than we want
* fix resolution of interface IDs for websocket queries

CHANGELOG_BEGIN
- [JSON API] Some error messages have been corrected to no longer
  confuse interface IDs with template IDs, based on what varieties of
  contract type ID the endpoint in question supports.
CHANGELOG_END

* mention #15293 where relevant
* define templateId_ generically
* remove unused utilities for old resolver
2022-10-20 10:02:04 -04:00
Carl Pulley
3d53aae871
Enable interface registration for interfaces in triggers
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-20 12:54:03 +01:00
Remy
b0d840019b
[Script] Do not use type constructor in AnyInterfaceChoice anymore (#15188)
companion PR of digital-asset/ghc#137

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-20 10:30:20 +00:00
Stefano Baghino
dd5728bc3a
Document how to add a link to the Canton documentation (#15300)
changelog_begin
changelog_end
2022-10-20 09:29:19 +00:00