Commit Graph

9429 Commits

Author SHA1 Message Date
Moisés Ackerman
2dbd91aab9
Interface methods can use plain function declaration syntax (#13102)
* Update 'implements' blocks to use new syntax

* Add InterfaceSyntax test case

* Add InterfaceMultipleMethodDeclsError test case

* Add InterfaceDifferentNumArgsError test case

changelog_begin
changelog_end
2022-03-02 15:59:01 +00:00
Moritz Kiefer
7acc6a9009
Pipe hpp through package_app (#13128)
This is needed so shared libraries are properly resolved and this
actually works outside of our build. Same issue that broke
damlc_legacy originally and we had someone trying to use cpp on their
own project (whether they should is another question but having it
half working is even worse).

I don’t know how to write a test for this unfortunately. It would only
fail if our nix store is not available which is pretty hard to
simulate. I could spin up a docker image or something but that doesn’t
seem worth the trouble.

fixes #13100

changelog_begin
changelog_end
2022-03-02 16:04:12 +01:00
Bernhard Elsner
140360fa0c
Fix a few docs redirects (#13126)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-02 15:16:56 +01:00
Robert Autenrieth
7fc1cd2441
DPP-931 Resolve testing uncertainties (#13109)
* Address todos

changelog_begin
changelog_end

* Fix test

* Reverse bad change
2022-03-02 13:00:42 +01:00
Stefano Baghino
f5c4755b76
Improve docs of auth middleware and trigger service (#13111)
* Improve docs of auth middleware and trigger service

changelog_begin
changelog_end

Fix #13049
Fix #13048

Several improvements to the documentation for these two services. The main aim was
to add, where needed, references to the new user management service. Ultimately,
only the auth middleware really needed to add a note about it, since to the trigger
service this is (so far) completely transparent.

For the rest, I took advantage of the chance to polish the docs a bit and make a few
improvements (that I will describe more in depth in a self-review).

* Prevent copy-pasting drama.

Thanks @S11001001

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* Address https://github.com/digital-asset/daml/pull/13111#discussion_r816967559

* Address https://github.com/digital-asset/daml/pull/13111#discussion_r816970609

* Address https://github.com/digital-asset/daml/pull/13111#discussion_r816973727

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-03-02 11:51:58 +00:00
Sofia Faro
8075a64f7f
LF Spec: Add interface expressions (#13103)
* LF Spec: Add interface expressions

This PR adds type rules and operational semantics for interface
expressions (including updates). The only thing I haven't added yet is
the operational semantics for exercise interface, and the operational
semantics for interface preconditions.

changelog_begin
changelog_end

* typo

* spurious duplicate

* minor edits

* review suggestions
2022-03-02 11:20:07 +00:00
Moritz Kiefer
6bb74786b9
Document docs HEAD build (#13121)
I used that script a few times myself and had a few people ask for it
so lets document it.

changelog_begin
changelog_end
2022-03-02 10:32:00 +01:00
Raymond Roestenburg
e4d05e7924
Notes for macOS setup of Nix in the main README. (#13051)
* Notes for macOS setup of Nix.

* Some more notes on importing a project in Intellij.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-02 09:49:12 +01:00
azure-pipelines[bot]
4ca3fe73b4
update NOTICES file (#13120)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-02 08:16:40 +01:00
tudor-da
681b584292
Move unit tests to corresponding implementation package (#13117)
changelog_begin
changelog_end
2022-03-02 05:21:16 +01:00
Gary Verhaegen
091a5ac752
appr: add Stewart (#13116)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-01 23:11:54 +00:00
Moritz Kiefer
de21dbf1ae
Release SDK 2.0.0 (#13110)
changelog_begin
changelog_end
2022-03-01 19:06:51 +00:00
tudor-da
ea48173350
Switch daml-lf/engine and leger-api-tests/tool not depend on kvutils (#13107)
changelog_begin
changelog_end
2022-03-01 15:41:12 +01:00
tudor-da
6da1cde1b3
Simplify IndexService hierarchy [DPP-932] (#13043)
* Squash LedgerBackedIndexService, SpannedIndexService and MeteredReadOnlyLedger
into ReadOnlyLedgerImpl

changelog_begin
changelog_end

* Rename ReadOnlyLedgerImpl to IndexServiceImpl

* Metrics cleanup
* Remove redundant metered layer stemming from MeteredReadOnlyLedger

* Simplified getLedgerId

* Addressed Marton's review comments
2022-03-01 14:30:30 +01:00
Victor Peter Rouven Müller
e1ccc2f4f4
duplicate json-api tests for full-lifecycle user token testing (#12922)
* WIP

* First version that compiles (with debug print statements)

* Revert changes on the failure tests

* Make all tests pass with some major cleanup of the new code

* Remove debug prints & outcommented code

* Make decoding / encoding test also compatible with user token tests

changelog_begin
changelog_end

* Minimize diff

* Fix oracle tests

* leave note for followup

* Update ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-03-01 11:05:58 +00:00
azure-pipelines[bot]
3ebce2fdee
update NOTICES file (#13104)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-03-01 09:26:05 +01:00
Stefano Baghino
ef8a0e662d
Describe the behavior of different token formats in the HTTP JSON API (#13082)
Fixes #12440

changelog_begin
changelog_end
2022-02-28 17:15:21 +00:00
Sofia Faro
db100c131a
Prevent iface choice & method name collisions. (#13075)
* Prevent iface choice & method name collisions.

This PR adds interface choices and methods to the name collision checker.

changelog_begin
changelog_end

* check the names from interfaces

* add error

* implement name collision check in scala side

* scalafmt
2022-02-28 13:21:41 +00:00
Moisés Ackerman
7af4215261
Interfaces accept at most a single ensure clause (#13093)
* Add test for multiple ensure declarations in interface

* update ghc patch

* Update expected result for daml-doc interface test

changelog_begin
changelog_end
2022-02-28 14:12:40 +01:00
Remy
5616846a7f
LF: Factorize logic to compute contract meta data (#13080)
between Create and Fetch.

meta data includes, signatories, observers, and contract key.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-28 12:02:33 +01:00
Moritz Kiefer
8a7aaa0c3d
Fix Windows linking issues (#13097)
I have to admit I still fdon’t fully understand why this sometimes
fails and sometimes doesn’t. It looks like some caching issue is
involved (e.g. currently builds in /d/a/2 succeed while builds in
/d/a/1 succed) but I’m not entirely sure that’s all.

This PR tries to address this in two ways:

1. Add the library when linking the Haskell bits instead of only on
the C library. I think this is required since we the final Haskell
binary is linked against the static cbits which does not carry a
reference to bcrypt but I’m not completely sure.
2. Rename the target to avoid interference with builds from before the
grpc upgrade. I suspect what is happening is that due to the lack of
sandboxing we sometimes end up picking up that library if it is in the
build tree from an older build instead of the new one.

changelog_begin
changelog_end
2022-02-28 08:35:30 +01:00
Moritz Kiefer
1783146c9e
Release new 2.0.0 RC (#13096)
changelog_begin
changelog_end
2022-02-25 20:36:26 +00:00
Moritz Kiefer
7b95a6f9c6
Bump ghcide to include SInitialized fix (#13086)
includes
0572146d4b

not going to backport this

changelog_begin
changelog_end
2022-02-25 20:20:14 +01:00
Stephen Compall
7c1cf567ad
use user token for trigger service sandbox test fixture (#13077)
In SandboxFixture when mixing in the auth middleware fixture, set
up the ledger client with a user token instead of a claims token
when not running in the claims-token-specific auth tests.

Fixes #12831.

* note about inClaims

* prevent Product, Serializable warts with AuthServiceJWTPayload

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-25 14:08:44 -05:00
pbatko-da
d5bfefbc00
[User management] Use collate "C" for Postgres and add test for collation for all backends. [DPP-908] (#13084)
In Oracle it should pass as our tests use an image that has NLS_LANG='American' which implies NLS_SORT='BINARY'

changelog_begin
changelog_end
2022-02-25 18:12:35 +01:00
davidrichards-da
23dd7c3303
Removed two links (#13092)
CHANGELOG_BEGIN
CHANGELOG_END

Removed two links from identity and package management and overview.
2022-02-25 16:05:10 +00:00
Moritz Kiefer
49e04c11c6
Fix dependencies for create-daml-app (#13089)
No reason to incldue daml-trigger by default.

changelog_begin
changelog_end
2022-02-25 15:25:50 +00:00
davidrichards-da
585f695eb8
Adding an installing daml enterprise link (#13088)
CHANGELOG_BEGIN
CHANGELOG_END

Adding an installing daml enterprise link to help with the Canton Docs
2022-02-25 15:20:07 +00:00
Robin Krom
3692a4a565
interfaces:ensure that implementations are ordered (#13071)
* interfaces:ensure that implementations are ordered

We make sure that the implementations are ordered by insertion in the
Scala AST. This is important to guarantee an evaluation order of the
interface preconditions that is determined by the order of interface
implementations of a template.

CHANGELOG_BEGIN
CHANGELOG_END

* use VectorMap instead of ListMap
2022-02-25 15:14:50 +00:00
Moritz Kiefer
c09e1d4b96
Document user management support in Navigator (#13085)
* Document user management support in Navigator

fixes #12934

changelog_begin
changelog_end
2022-02-25 16:11:51 +01:00
Simon Maxen
f67e9d4d49
Perform transaction metering aggregation inside DB (#13083)
changelog_begin
changelog_end
2022-02-25 13:37:38 +00:00
davidrichards-da
5dd6accb08
Adding a link to Daml Intro (#13074)
* Adding a link to Daml Intro

Adding a link to Daml Intro for Canton to link to.  Canton changes being made to link to this in the same docs, rather than the external links.

* Blank commit

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-25 13:05:20 +00:00
Moritz Kiefer
5dfc2e4a98
Fix GSG to account for login requirement (#13073)
* Fix GSG to account for login requirement

You can only follow a user after they logged in so the previous order
did no longer work.

changelog_begin
changelog_end

* Update docs/source/getting-started/index.rst

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

* Update docs/source/getting-started/index.rst

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

* Update docs/source/getting-started/index.rst

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

* fix borked sentence

changelog_begin
changelog_end

* Update docs/source/getting-started/index.rst

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

* Update docs/source/getting-started/index.rst

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-02-25 13:07:56 +01:00
Simon Maxen
728f03c855
Participant metering documentation (#13070)
* Participant metering documentation

changelog_begin
Participant metering added to Daml operating insturctions documentation
changelog_end
2022-02-25 10:59:20 +00:00
Moritz Kiefer
db61c7c3ee
Bump Canton to latest snapshot (#13079)
Slightly worried that some last minute change will break daml-helper
before 2.0 so upgrading to catch any issues early.

changelog_begin
changelog_end
2022-02-25 09:26:45 +00:00
Moritz Kiefer
4699201a13
Fix Window linker errors (#13078)
Apparently https://github.com/digital-asset/daml/pull/13066 resulted
in linker errors but only on clean builds (I think). I don’t fully
understand why. The requirement from bcrypt seems to come from the
grpc upgrade but reverting that still leaves undefined symbol errors
to DbgHelp. Don’t really care enough to track it down given that this
fixes it.

changelog_begin
changelog_end
2022-02-25 10:14:08 +01:00
Moritz Kiefer
9dee577138
Document ToC doc updates (#13069)
changelog_begin
changelog_end
2022-02-25 08:53:01 +01:00
Stephen Compall
786906f23b
enable oauth2-test's user tokens in trigger service tests (#12994)
Duplicates the trigger service's auth tests for the two modes of
the oauth test server from #12929, then selects out the
claim-token-dependent tests as explained in
https://github.com/digital-asset/daml/issues/12831#issuecomment-1048176312

Part of #12831.

* also suppress claims-only tests in oracle-with-oauth2-test

* use inClaims for several tests

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-24 12:41:47 -05:00
Sofia Faro
0e03e2f100
Add interfaces to LF spec (#13020)
* Add interfaces to LF spec.

Part of #11349. This PR adds the interface & implements declarations, deals with "requires", and name collisions. I'm leaving expression types and operational semantics to a future PR.

changelog_begin
changelog_end

* missing curly

* change T to I for interfaces

* revisions from Remy
2022-02-24 17:09:20 +00:00
Moritz Kiefer
0ea4866adc
Fix activeness display in script service (#13059)
The previous way of tracking this only worked for direct children of
rollback nodes but lost the information when there was an exercise
node in between.

Reported in https://discuss.daml.com/t/exception-rollback/4000

changelog_begin

- [Daml Studio] Fix a bug where contracts that have been rolled back
  would still show up as active in the table view and in the list of
  active contracts at the end of the transaction view. This only
  affected display. Fetching those contracts failed and `query` also
  did not return those contracts.

changelog_end
2022-02-24 16:20:00 +01:00
carrielaben-da
55590d916b
Update app-architecture.rst (#12993)
* Update app-architecture.rst

Second-iteration changes to the App Architecture page, addressing User Management and the Alias contract.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

* Update app-architecture - edits - 1

Which/ how many additional details about the public party do you want to include here? Or as another option, should it be explained in-depth elsewhere?

[CHANGELOG_BEGIN]
[CHANGELOG_END]

* Update docs/source/getting-started/app-architecture.rst

Adding Moritz's suggested changes

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/getting-started/app-architecture.rst

Changed to Moritz's suggested wording.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/getting-started/app-architecture.rst

Adding Moritz's suggestion w/link.

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-24 10:18:40 -05:00
Moisés Ackerman
58132cf71c
Fix data-deps orphan imports without explicit packageRefs (#13055)
* Include orphan instance imports in buildLfPackageGraph

* Add failing test for cross-DAML-LF version data-deps with stdlib orphan instances

* Add failing test for cross-DAML-LF version data-deps with custom orphan instance

changelog_begin
changelog_end
2022-02-24 15:03:10 +01:00
davidrichards-da
0ed1e0526b
Moving the 'testing your web app' page to the GSG (#13060)
* Moving the 'testing your web app' page to the GSG

CHANGELOG_BEGIN
CHANGELOG_END

Moving the 'testing your web app' page to the GSG

* Updating paths after moving the file

Updating paths after moving the file

* Adding the testing page to the pdf file too.

* Adding a link to the user management description

CHANGELOG_BEGIN
CHANGELOG_END

Adding a link to the user management description

* fixing link in first-feature linking to the moved page

fixing link in first-feature linking to the moved page

* Updating a link to the testing file

Updating a link to the testing file
2022-02-24 13:00:48 +00:00
Moritz Kiefer
267526b627
Fix MacOS GHCi issues (#13066)
The trick is extremely simple actually, see the comment for details.
Pretty embarassed that it took me this long to figure it out but
better late than never I guess.

I also upgraded grpc to match our java version and dropped the comment
to keep it in sync with the nix version which we hopefully never need
now. Not strictly required but seemed nice to do at the same time.

changelog_begin
changelog_end
2022-02-24 12:26:27 +00:00
davidrichards-da
0583b1879f
Updating the GSG architecture diagram (#13067)
CHANGELOG_BEGIN
CHANGELOG_END

Updating the GSG architecture diagram
2022-02-24 12:02:24 +00:00
Moritz Kiefer
bd1ae4cae7
Enable html4 writer in sphinx (#13056)
The sphinx update switched to an html 5 writer by default which broke
a bunch of our CSS which I unfortunately missed. While that is
definitely fixable, a few days before our 2.0 release this doesn’t
seem sensible to focus on so for now let’s force the html4 writer.

changelog_begin
changelog_end
2022-02-24 12:27:02 +01:00
Stefano Baghino
21769eaff5
Move Daml Helm Chart and Auth0 setup pages to early access (#13052)
Add a disclaimer that these pages do not work with Daml 2.0
but are under active development.

Closes #13038
Closes #13039

changelog_begin
changelog_end
2022-02-24 10:51:08 +00:00
Robert Autenrieth
d5a4aea3a7
Fix broken test logback (#13063)
changelog_begin
changelog_end
2022-02-24 10:28:56 +01:00
azure-pipelines[bot]
334f49602f
update NOTICES file (#13064)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-02-24 07:04:00 +00:00
Gary Verhaegen
fe9d44ffe7
ci: bump Nix on macOS nodes (#13061)
However that happened, we were stuck with Nix 2.3.15 (or 2.3.16 in some
cases) on our macOS nodes. This PR is a minor edition to the Nix
initialization commands to switch from 2.4 to "latest", but I wil lalso
use it to record the changes I just did manually to the cluster.

The cluster is currently composed of two parts:
- 7 machines running Catalina (10.15.7).
- 1 machine running Monterey (12.2).

Unfortunately they use different setup. The Catalina ones are described
by the state of the repo (in theory, though keeping them in sync is
manual); in order to update those, I have:

1. Taken one node off the CI pool (`builder1epjj7`).
2. On that node, run the following commands:
   ```
   cd ~/daml/infra/macos/3-running-box
   vagrant destroy -f
   rm ~/images/*
   vagrant box remove macinbox
   vagrant box remove azure-ci-node
   rm -r ~/.vagrant.d/boxes/macinbox-06032020.tar.gz
   softwareupdate -d --fetch-full-installer --full-installer-version 10.15.7
   cd ~/daml/infra/macos/1-create-box
   sudo macinbox --box-format vmware_desktop --disk 250 --memory 32768 --cpu 10 --user-script user-script.sh
   cd ../2-common-box
   vagrant up
   vagrant package --output ~/images/initialized-$(date +%Y%m%d).box
   vagrant destroy -f
   cd
   ./run-agent.sh
   ```
   This leaves us with that node running an updated box. The new box is
   in `~/images/initialized-$(date)`.
3. Send that file to all the other nodes with `scp`.
4. Reboot all the nodes (after deactivating & waiting for jobs to
   finish).

For the Monterey node, images (steps 1 and 2 in this repo) are currently
created by @nycnewman on another machine I don't have access to, so I
took a slightly different approach: I took the existing image, started
it from the `3-running-box` folder as usual, manually updated Nix there,
then repackaged that.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-24 01:04:28 +00:00