Commit Graph

651 Commits

Author SHA1 Message Date
Leonid Shlyapnikov
f71facf7cf
Parties error handling improvements (#5395)
* Return BadRequest(400) with warnings when all party IDs are unknown

changelog_begin
changelog_end

* cleanup
2020-04-03 09:54:43 -04:00
Martin Huschenbett
7cf5018c5b
Move puppeteer tests out of create-daml-app (#5420)
As expected, the `puppeteer` library used to demonstrate how to test
DAML apps end-to-end, causes issues in CI. It is not very unlikely
that users of the getting started guide would run into the same issues.
In addition, `puppeteer` is a _huge_ dependency, we should probably not
shove down everybody's throat who just wants to walk throught the GSG.

Thus, this PR moves everything related to testing out of
`create-daml-app` and exclusively into the docs. This is completly
lacking tests, but since it wasn't tested before either, I consider
this acceptable. My manual tests succeeded.

Since merging this might unblock quite a few other PRs, I defer test
into a followup PR.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-03 14:59:18 +02:00
Rohan Jacob-Rao
6d9db3fea3
GSG: use code samples from the template instead of manual copies (#5396)
* Copy templates into docs build directory to reference in code snippets

changelog_begin
changelog_end

* Remove ui-before code copies

* Rename daml folder to daml-after and remove tags for before code

* Fix a link and wording
2020-04-03 13:18:18 +02:00
Andreas Herrmann
2d1e22fe33
Support import in DAML REPL (#5386)
* REPL parse import statements

* Factor parsing out of handleLine

* Pull binding and error handling into handleStmt

This is specific to the case of handling a statemt and does not overlap
with handling imports.

* Track module imports as ImportDecl

* Add new module imports

* Validate module imports

* Add REPL interaction test for import

* REPL document import declarations

CHANGELOG_BEGIN
- [DAML REPL - Experimental] You can now use import declarations at the
  REPL prompt to bring additional modules into scope.
CHANGELOG_END

* ReplState strict fields

* Use semigroupoids Alt to simplify parseReplInput

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-04-03 10:43:04 +00:00
Martin Huschenbett
31c78d57d8
Rename daml2ts to daml2js (#5394)
This is pretty much a search and replace over the whole repo, including
file names.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-03 08:58:23 +02:00
Martin Huschenbett
7431a96fc6
Getting Started Guide: Generate JS into daml.js (#5390)
Change the output directory given to `daml codegen ts` from `daml-ts`
to `daml.js`. This is naming is in line with the fact that `daml2ts`
puts all generated packages into the `@daml.js` scope. A renaming of
`daml2ts` into `daml2js` is immiment.

This PR also changes a few small documentation issues the
search-and-replace has surfaced.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-02 21:02:27 +00:00
Leonid Shlyapnikov
62b7ab590a
Sync query error reporting improvements (#5326)
* non empty set of template IDs in domain.GetActiveContractsRequest

* Updating expected error message

changelog_begin
changelog_end

* Adding warnings field to domain.ErrorResponse

* Error messages constants

* using domain.AsyncResponse

* added todo

* Updating examples

changelog_begin
changelog_end

* Updating examples

* Fixing the case when head is part of the tail, as pointed by @S11001001

* Fixing the domain.SynResponse JSON reader,

report deserialization error when both 'errors' and 'result' fields
present, as pointed by @S11001001

* Addressing code review comments
2020-04-02 19:47:07 +00:00
Moritz Kiefer
82fc85e585
Fix daml new command in GTG (#5385)
changelog_begin
changelog_end
2020-04-02 19:10:46 +02:00
Moritz Kiefer
2049f2ea93
Limit memory usage of scenario service in tests (#5373)
* Limit memory usage of scenario service in tests

Previously the scenario service used over 2GB of memory during
//compiler/damlc/tests:integration-dev for absolutely no reason.

This PR adds an option to pass JVM options when starting the scenario
service and sets them to 200MB for the Shake tests and the damlc
integration tests which seems to be more than sufficient.

These option can also be set in `daml.yaml`. I did not change the
defaults since this is shipped to users where I’d rather have high
memory usage than a crashing scenario service and on certain large
DAML codebases we might actually use a fair bit.

changelog_begin
changelog_end

* Update docs/source/tools/assistant.rst

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-04-02 14:42:33 +00:00
Rohan Jacob-Rao
0f5d93e0c3
Include create-daml-app as a template project for daml new (#5259)
* Initial commit with create-daml-app master

* Include create-daml-app in build rule

* Make daml.yaml a template in version and project name

* Remove git attributes

* Remove license and azure config

* Remove scripts

* Don't overwrite config files in build rule

* Template version numbers in package.json, to be replaced by the assistant

* Rename to package.json.template

changelog_begin
changelog_end

* Add copyright headers

* Do template substitutions in all .template files

And don't special case daml new create-daml-app (so it treats it as a
regular template).

* Add create-daml-app to integration tests

* Remove WIP warning

* Move towards setup that works on head

* Make local copies of the TS libs in the templates tarball

* Hardcode project name for now

* Use isExtensionOf

* Remove service worker

* remove robots.txt (don't even know what it is)

* Revert "Make local copies of the TS libs in the templates tarball"

This reverts commit 1289581fb4a82af3ab534baf978a2c6ed895d538.

* Retemplatize TS lib versions. For head builds these will be installed using npm

* Remove daml/ledger from resolutions for daml-ts

* Comment about test secret

* Remove special create-daml-app assistant command and test that won't work anymore

* Remove redundant imports and export

* Remove old create-daml-app tests

* Remove yarn.lock

* Clean up integration test (just daml new and build atm)

* Add daml/ledger as a resolution for daml-ts

* Remove top level package.json

* Update daml.js version

* Use new import scheme for generated TS

* Update readme with new codegen and build steps

* Use start-navigator in daml.yaml

* Increase a couple of timeouts in tests (either sandbox or TS lib is a bit slower?)

* Update GSG intro with new build steps

* Remove daml2ts -p flag and --start-navigator flag from GSG instructions

* Don't use start-navigator flag in ui tests

* Temporary readme describing how to manually test the create-daml-app template

* Update code samples in app arch section of GSG

* Update code samples in testing doc

* Remove copied create-daml-app code

* Indent docs markers to be more subtle

* Update visible code in Messages (after) section

This needs to be kept up to date properly somehow.

* Update text to useLedger

* Restore code/ui-before copies until the Bazel magic is figured out

We need to make the template code a dependency in the Bazel rule as
otherwise we can't find the files in the docs build.

* Update create-daml-app/readme and make templates/readme more detailed

* Use jsx comments for docs markers so they don't show up in the app
2020-04-02 00:30:07 +00:00
Moritz Kiefer
29ed16b4cc
Improve handling of exposed-modules with data-dependencies (#5330)
* Improve handling of exposed-modules with data-dependencies

Previously, we tried to rename all modules of a dependency via
--package. This fails if some of those modules are not exported. This
was trivial to hit as a user since the ``daml-trigger`` library made
use of this.

This PR adds a few things to improve the situation:

1. We only rename modules that are exposed. This fixes the issue if
   you don’t actually reference a non-exposed module from your
   data-dependency.
2. I’ve removed the exposed-modules from daml-trigger. I don’t think
   they are essential here given that the module name has `Internal`
   in the name and it’s too easy to have something that actually
   references the non-exposed module since the types are reexported.
3. I’ve added documentation that mentions this issue.
4. I’ve added a warning if your exposed-modules are excluding some
   modules. Maybe worth turning this into an error in the future.

changelog_begin
changelog_end

* Update compiler/damlc/lib/DA/Cli/Damlc/Packaging.hs

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>

Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
2020-04-01 13:57:52 +02:00
Gerolf Seitz
329320bad9
Organize maven coordinates (#5272)
* Use com.daml as groupId for all artifacts

CHANGELOG_BEGIN
[SDK] Changed the groupId for Maven artifacts to ``com.daml``.
CHANGELOG_END

* Add 2 additional maven related checks to the release binary

1. Check that all maven upload artifacts use com.daml as the groupId
2. Check that all maven upload artifacts have a unique artifactId

* Address @cocreature's comments in https://github.com/digital-asset/daml/pull/5272#pullrequestreview-385026181
2020-04-01 11:41:18 +02:00
Gerolf Seitz
9b5c5e23b9
Make wall clock time the default time mode for sandbox (#5301)
CHANGELOG_BEGIN
[Sandbox] Wall Clock Time mode (``--wall-clock-time``) is now the
default.
CHANGELOG_END
2020-04-01 08:53:16 +02:00
Moritz Kiefer
c18de1a463
Document running DAML script over the JSON API (#5314)
changelog_begin

- [DAML Script] DAML Script can now be run over the HTTP JSON
  API. Take a look at the documentation `documentation
  <https://docs.daml.com/daml-script/index.html#running-daml-script-against-the-http-json-api`_
  for instructions and limitations.

changelog_end
2020-03-31 20:45:56 +02:00
Leonid Shlyapnikov
6b1c90267a
Report UnknownTemplateIds warning before sending an error (#5318)
* report UnknownTemplateIds warning before sending an error

if no template IDs resolved, send warning before the error, this is for
consistency with the case when at least one ID resolved (we continue
processing request in this case).

changelog_begin
changelog_end

* adding an error message example

* change title

* clarifying what on-message means.

* formatting

* Addressing code review comments
2020-03-31 14:36:48 -04:00
Nemanja
aee8a2485f
Added screenshots to the GSG (#5233)
* Added screenshots to the GSG

CHANGELOG_BEGIN
CHANGELOG_END

* Added copyright headers to theme/conf.py
2020-03-31 15:05:09 +02:00
Leonid Shlyapnikov
703b588384
Error and disconnect when multiple requests coming over the same WebSocket connection (#5288)
* minor refactoring in preparation for the next test case

* allow only one input request + test, WIP

* allow only one input request + test, WIP

* Error when multiple requests coming over the same websocket connection

This never worked, we never returned anything when 2nd request received,
now we return an error and drop the connection.

changelog_begin
changelog_end

* update docs

* Fixing copyright header

* changing test description

* trying to clean wsMessageHandler up

* Reverting getTransactionSourceForParty changes
2020-03-30 18:08:54 -04:00
Moritz Kiefer
19496482f6
Replace damlpatterns tarballs by a proper template (#5273)
There is no reason why patterns should be a tarball and the current
tarballs are broken anyway. Why do we even have 2 …

changelog_begin
changelog_end
2020-03-30 12:35:22 +00:00
Martin Huschenbett
dc617345c9
JSON API: Fix docs on WebSocket setup (#5253)
Using `on` to add event listeners is a Node.js idiom. In the brosers,
it's `addEventListener`, which works in Node.js too.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-30 13:19:25 +02:00
Moritz Kiefer
c0e28d83ee
Turn warnings for module name/record name mismatches into errors (#5266)
* Turn warnings for module name/record name mismatches into errors

The module name warning existed for ages. We started warning about the
record name mismatch in 0.13.55 so I’d like to turn it into an error
before 1.0

changelog_begin

- [DAML Compiler] File names must now match up with module names. This
  already produced a warning in previous releases.

- [DAML Compiler] It is now an error to define a record with a single
  constructor where the constructor does not match the type
  name. To fix the error you need to change ```data X = Y { … }``` to
  ```data X = X { … }```.  This restriction only applies to
  single-constructor records. Variants and enums are not affected.
  This already produced a warning in 0.13.55.

changelog_end

* Fix integration tests

* Fix docs

* Fix lsp tests
2020-03-30 10:21:53 +00:00
Robert Autenrieth
0a83309f1b
TTL cleanup (#5246)
* Remove documentation for a removed option

CHANGELOG_BEGIN
- [DAML Integration Kit] The CLI option command-submission-ttl-scale-factor was
  removed, as the LET/MRT/TTL fields have recently been removed
  from the command submission service.
CHANGELOG_END

* Minor renaming
2020-03-28 00:13:08 +01:00
Moritz Kiefer
e42111b31f
Fix template name in multiparty agreement docs (#5255)
fixes #5239

changelog_begin
changelog_end
2020-03-27 16:34:57 +00:00
Martin Huschenbett
b1e6298ec6
JSON API: Slightly improve the docs for the streaming endpoints (#5234)
Semicolons at the end of every line seem to be good style. Logging to
the console does not help with the example. The `WebSocket` class is
built-in in the browser and you only need a package like `ws` on
Node.js.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 15:17:55 +00:00
Gerolf Seitz
050f049e16
Add docs for the ledger time model to the app arch guide. (#5118)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 09:46:28 +01:00
Rohan Jacob-Rao
9d73aec229
GSG: update code samples (#5224)
* Update code in before section

* Update code in 'after' section, i.e. for messaging

changelog_begin
changelog_end

* Typo with END taggit st
2020-03-27 09:16:15 +01:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Stephen Compall
332d35a347
stop filtering "phantom archives" when it won't work; reenable it on request (#5003)
* ContractKeyStreamRequest with different types for whether offset-preceded or not

- should replace EnrichedContractKey as the WS StreamQuery type

* add the ContractKeyStreamRequest layer everywhere

* split StreamQuery parse from the other steps

* make StreamQuery type depend on the input JsValue

* only StreamQueryReader is a typeclass now

* scalafmt

* wrong type arg

* letting the request data and phantom archive removal choice flow

- from work with @leo-da

* finish threading request-derived phantom state to removal flow

- from work with @leo-da

* make it clear that hints are contract IDs in StreamQuery

- from work with @leo-da

* treat StreamQueryReader's type parameter fully as a phantom

- from work with @leo-da

* remove unused type alias

- from work with @leo-da

* test fetch resume, with and without various offsetHints

* document offsetHints

* missing ` in rst

- thanks @hurryabit

* rename offsetHint to contractIdAtOffset

CHANGELOG_BEGIN
- [JSON API - Experimental] New field ``contractIdAtOffset`` for fetch-by-key streams
  to restore proper archive filtering.
  See `issue #4511 <https://github.com/digital-asset/daml/issues/4511>`_.
CHANGELOG_END

* we never unify the two ContractKeyStreamRequest types

* doc update for contractIdAtOffset
2020-03-26 15:31:27 -04:00
Shayne Fletcher
24cbeddd35
Follow up to earlier PR (#5201)
changelog_begin
changelog_end
2020-03-26 05:16:16 -04:00
Leonid Shlyapnikov
24e414cba0
Remove ledgerEffectiveTime, maximumRecordTime and default TTL config. (#5200)
changelog_begin

[JSON API - Experimental]
Remove ``ledgerEffectiveTime`` and ``maximumRecordTime`` fields from command ``meta``. Remove ``--default-ttl`` command line argument. The ledger time and TTL are automatically computed by the submission service now. See #5090.

changelog_end
2020-03-25 17:06:12 -04:00
Shayne Fletcher
9351b7a7b9
Build js packages at code-generation time (#5171)
changelog_begin
changelog_end
2020-03-25 14:13:37 -04:00
Robert Autenrieth
a3ddde3a9d
Remove MRT and LET (#5172)
Contributes to #4194.
Closes #4231.
Closes #5022.
CHANGELOG_BEGIN
- [Ledger API] The protobuf fields ledger_effective_time and maximum_record_time have been removed from
  command submission. These fields were previously deprecated following the introduction
  of a new ledger time model. See issue `#4194 <https://github.com/digital-asset/daml/issues/4194>`__.
[Java Bindings] removed the usage of ledgerEffectiveTime and
maximumRecordTime, and instead added minLedgerTimeAbsolute and
minLedgerTimeRelative in CommandSubmissionClient and CommandClient
CHANGELOG_END
2020-03-25 16:50:27 +01:00
Stephen Compall
f4525356f6
stray an->a from renaming "add" to "created" (#5170)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-25 12:42:36 +00:00
Leonid Shlyapnikov
a6a1e75bc1
Streaming API error handling/reporting improvements (#5141)
* Streaming API error handling

* Stopping the stream after emitting the 1st error

* Cleaning up test cases, stricter type for non empty streaming fetch

* Update docs.

changelog_begin

[JSON API - Experimental] Change Streaming API error format to match synchronous API:
``{"status": <400 | 401 | 404 | 500>, "errors": <JSON array of strings> }``. See #4521

changelog_end

* a few words about warnings in the Streaming API

* a few words about warnings in the Streaming API

* Updating command formatting in the JavaScript example.
2020-03-24 19:32:55 +00:00
Moritz Kiefer
37dc2f29d3
Integrate create-daml-app into the assistant (#5152)
* Integrate create-daml-app into the assistant

fixes #4868

changelog_begin

- [DAML Assistant] Add a new ``daml create-daml-app`` command for creating a project based on
  `create-daml-app <https://github.com/digital-asset/create-daml-app>`_.

changelog_end

* Try random things hoping to fix windows

* Try random things hoping to fix things on macos
2020-03-24 18:29:40 +01:00
Luciano
4610ed5b4f
Getting Started Guide: Update codegen command to SDK 0.13.55 (#5160)
* remove `src` subdir from codgen command

If you don't do this, running `yarn install` will complain:
```
error Couldn't find package "@daml-ts/create-daml-app-0.1.0@0.13.55" required by "create-daml-app@0.1.0" on the "npm" registry.
```
This was with yarn v1.22.4 - can someone please double-check this.

* Update codegen command and some surrounding explanation

Unfortunately also removed a bunch of trailing whitespace due to my
editor settings, which is fine but makes reviewing harder :(

changelog_begin
changelog_end

* Warn that workspaces run build takes ages

Co-authored-by: Rohan Jacob-Rao <rohanjr@gmail.com>
2020-03-24 16:23:06 +00:00
Rohan Jacob-Rao
c950bf97d1
Guide to UI testing with Jest and Puppeteer (#5119)
* First draft of guide to UI testing

changelog_begin
changelog_end

* Address Nemanja's feedback

* Add copyright headers

* Cut down intro and description of Jest/Puppeteer

* Shorten a bit more
2020-03-24 11:17:41 -04:00
Remy
d834b9b029
Sandbox: make contract id seeding flag public (#5153)
* Sandbox: Reveal contract id seeding flag

CHANGELOG_BEGIN
- [Sandbox] Add support for random contract identifiers.  See section
  `Contract Identifiers Generation` section in
  docs/source/tools/sandbox.rst
CHANGELOG_END
2020-03-24 15:51:23 +01:00
Moritz Kiefer
1942efba23
Allow controlling navigator startup in daml.yaml (#5155)
* Allow controlling navigator startup in daml.yaml

While I’m not entirely convinced the default atm is right, making it
configurable seems like an easier solution than bikeshedding the default.

changelog_begin

- [DAML Assistant] You can now disable starting navigator as part of
  ``daml start`` in your ``daml.yaml`` file by adding ``start-navigator: false``.

changelog_end

* Update docs/source/tools/assistant.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Use --start-navigator=true in the docs

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-03-24 14:04:26 +01:00
Stephen Compall
fb42845959
simplify websocket notes, remove an apparent contradiction (#5116)
- from a discussion with @meiersi-da and @hurryabit on #3878

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-23 09:59:49 -04:00
Stephen Compall
f2b068f0b5
remove List and TextMap support from the JSON query language (#5099)
* remove List and TextMap support from the JSON query language

CHANGELOG_BEGIN
- [JSON API - Experimental] Removed support for maps and lists from the query language.
  See `issue #4855 <https://github.com/digital-asset/daml/issues/4855>`_.
CHANGELOG_END

* GenMap won't be supported in general, remove FIXME

- thanks @leo-da

* more documentation on unsupported query types

- as suggested by @hurryabit; thanks
2020-03-20 16:22:22 -04:00
Gary Verhaegen
b45c7aed69
fix 0.13.55 release notes typo (#5074)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-20 13:25:23 +00:00
Martin Huschenbett
7037f4b6a8
Getting started guide: Invoke daml start directly (#5102)
* Getting started guide: Invoke daml start directly

Since we no can configure arguments we wish to pass to DAML Sandbox
when running `daml start` in `daml.yaml`, we don't need the mysterious
`daml-start.sh` script anymore. That's why
https://github.com/digital-asset/create-daml-app/pull/78
removes the script from `create-daml-app`.

This PR adjust the getting started guide accordingly.

This fixes #4295.

CHANGELOG_BEGIN
CHANGELOG_END

* Fix expected message when daml start successful
2020-03-20 10:57:23 +00:00
Moritz Kiefer
be90649186
Support partial patterns in DAML repl (#5093)
* Support partial patterns in DAML repl

This PR improves the support for partial patterns in DAML repl by
making sure that they fail on the line itself rather than some
subsequent line and avoids the partial pattern match warnings on all
following lines.

changelog_begin
changelog_end

* Fix tests
2020-03-19 17:28:40 +00:00
Moritz Kiefer
c2c0557970
Support complex patterns in DAML REPL (#5087)
* Support complex patterns in DAML REPL

Previously, we only supported simple variable patterns in DAML
repl. This PR extends this to support pretty much all patterns. The
main complexity here is in handling shadowing correctly but I’m
reasonably confident the solution here is sensible.

What doesn’t work properly yet is partial patterns. I’ve added a
comment describing the issue and a potential solution. Given that this
isn’t a regression apart from maybe a slightly worse error message, I
think it makes sense to merge this PR and fix that separately.

changelog_begin

- [DAML REPL - Experimental] You can now use more complex patterns in
  statements, e.g., ``(x,y) <- pure (1,2)``.

changelog_end

* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs

Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs

Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Improve error messages

* update documentation

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2020-03-19 16:17:50 +00:00
Nemanja
8dc99b583b
Follower terminology in the docs (#5067)
* Follower terminology in the docs

Changed the docs to a more twitter/Instagram like terminology where we use 'follower' relationship instead of 'friend'. Resolves #5015

CHANGELOG_BEGIN
CHANGELOG_END

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

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

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

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

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

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

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

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

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

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-03-19 12:00:09 +01:00
nickchapman-da
d81caa9568
rework daml_compile bazel rule (#5070)
Avoiding `damlc compile/package` commands (which we would like to deprecate), and replace with plain `damlc build` together with a post dar->dalf extraction step in the couple of places where we actually want the .dalf for testing.

changelog_begin
changelog_end
2020-03-18 23:06:55 +00:00
Moritz Kiefer
3493b33de5
Release 0.13.55 (#5058)
changelog_begin
changelog_end
2020-03-18 11:53:57 +01:00
Samir Talwar
cbeeb5aafc
sandbox: Fail to start if a time mode is not explicitly specified. (#5033)
* sandbox: Fail to start if a time mode is not explicitly specified.

CHANGELOG_BEGIN
- [Sandbox] Sandbox is switching from Static Time mode to Wall Clock
  Time mode as the default. To ensure that our users know about this,
  for one version, there will be no default time mode. Instead, users
  will have to explicitly select their preferred time mode by means of
  the `--static-time` or `--wall-clock-time` switches. In the next
  release, Wall Clock Time will become the default, and users who are
  happy with the defaults will no longer need to specify the time mode.
CHANGELOG_END

* daml-script|triggers: Specify time mode when testing against Sandbox.

* daml-assistant: Default the Sandbox to wall clock time.

CHANGELOG_BEGIN
- [DAML Assistant] Initializing a new DAML project adds a switch to
  ``daml.yaml`` to ensure Sandbox can continue to start with ``daml
  start``::

      sandbox-options:
        - --wall-clock-time
CHANGELOG_END

* docs: Update the DAML Script and Triggers docs to use Wall Clock time.

It's now what Sandbox will use by default when using `daml init`.

* docs: Change the Quickstart to run Sandbox in wall clock time.

This explains why the contract IDs may vary.

It also updates the manual release testing script to match.
2020-03-18 08:25:03 +00:00
Nemanja
8505135ec2
Wording fixes in GSG (#5018)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-18 08:39:31 +01:00
Nemanja
40ef8b18c7
GSG Application architecture diagram (#5017)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-18 08:39:00 +01:00
Shayne Fletcher
e71cba698e
daml2ts : Simplify docs, use mapped types for enums. (#5044)
* Simplify docs, use mapped types for enums.

changelog_begin
changelog_end

* remove serializale check

* add 'keys' property to enums

* Simplify docs just a little bit more
2020-03-17 16:27:46 +00:00
Moritz Kiefer
76c9ddfb59
Fix typo in docs for multiparty agreement (#5011)
changelog_begin
changelog_end
2020-03-16 12:08:05 +01:00
Moritz Kiefer
44d843f9ef
Support authentication and TLS in DAML repl (#4998)
* Support authentication and TLS in DAML repl

changelog_begin

- [DAML Repl - Experimental] You can now connect to a ledger via TLS
  by passing ``--tls`` to ``daml repl``

- [DAML Repl - Experimental] You can now connect to a ledger with
  authentication by passing the token via ``--access-token-file`` to
  ``daml repl``.

changelog_end

* try to fix linking on windows

* windows is weird

* gnah
2020-03-16 10:43:57 +01:00
Leonid Shlyapnikov
5c2ed56c8e
Allocate party JSON API endpoint (#4991)
* Allocate party JSON API endpoint

changelog_begin

[JSON API - Experimental]
Allocate party endpoint added: ``/v1/parties/allocate``. See #4638.

changelog_end

* cleanup

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/LedgerClientJwt.scala

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2020-03-13 14:06:08 -04:00
Stephen Compall
0cb3541666
optional offset argument to WebSocket streams (#4819)
* capture the pattern of an optional stream input prefix

* allow LiveBegins to be appended

- should have been included with #4593

* StreamQuery will parse JsValues instead of Strings

* shortcut in HttpServiceTestFixture; clean up InsertDeleteStepTest

* compatibly add withOptPrefix stage to WS input

* parsing the offset argument

* add offset parsing to input stream, but drop it on the floor

* another form of the two cases

* percolate the starting offset to the next step

* percolate the starting offset to the next step

* percolate the starting offset to the next step

* use transactionsFollowingBoundary in ContractsService if begin offset specified

* integration test for scan from offset in WS query

* tool for catching the first offset in a stream

* documentation

* add changelog entry

CHANGELOG_BEGIN
- [JSON API - Experimental] WebSocket endpoints now support an optional offset argument.
  See `issue #4509 <https://github.com/digital-asset/daml/issues/4509>`_.
CHANGELOG_END

* move offset argument doc to later

- suggested by @hurryabit; thanks

* remove stray TODO

- pointed out by @leo-da; thanks

* redesign withOptPrefix to make the usage a little easier to follow

- suggested by @leo-da; thanks
2020-03-13 12:52:17 -04:00
Nemanja
05403da7d3
GSG info on restarting the ledger and making changes (#4968)
* GSG info on restarting the ledger and making changes

CHANGELOG_BEGIN
CHANGELOG_END

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Changed the explanation for why we need to run './daml-start.sh' again

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/getting-started/first-feature.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:48:01 +01:00
Nemanja
ce54e1392d
Explaining the DAML code in GSG (#4987)
* Explaning the DAML code in GSG

CHANGELOG_BEGIN
CHANGELOG_END

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:47:47 +01:00
Nemanja
90033b05c4
Linking TS API documentation in the GSG (#4961)
* Linking TS API documentation in the GSG

* Changelog entry

CHANGELOG_BEGIN
CHANGELOG_END

* Changed the links to point to our own docs
2020-03-13 16:47:33 +01:00
Nemanja
17f6ec0839
Yarn information for the GSG docs (#4920)
* Solves #4841

* Added info for successfull daml-start.sh script run

* fix syntax

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:47:12 +01:00
Nemanja
ff926d0a0f
TypeScript lexer for TS syntax highlighting (#4900)
* Resolves #4304

Added highlighting to the application architecture section

Highlighter that works

The latest highlighter

* Added the lexer to pdf and html and restructured how conf.py is called within the theme

* Added copyright headers

* add typescript.py to srcs

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:46:23 +01:00
Shayne Fletcher
33e384869a
Change code generation scheme for DAML enums (#4975)
changelog_begin
changelog_end
2020-03-13 09:30:52 -04:00
Bernhard Elsner
757e0e841b
Remove references to DA Ledgers, DA Platform and similar from docs (#4690)
* Remove references to DA Ledgers, DA Platform and similar from docs

* Some additional amendments

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 13:02:11 +01:00
Moritz Kiefer
edd73384c4
Make client authentication in Sandbox configurable (#4965)
Currently sandbox only supports TLS if you also enable client
authentication. There is no reason for why this has to be the case and
for things like DABL we want TLS without client authentication so it’s
useful to be able to test this in sandbox. This PR introduces a
`--client-auth` flag that allows you to configure the behavior. The
default is the current one of requiring client authentication.

This PR does not yet update Java clients, however, the Haskell client
supports this already and is used to test this functionality.

I’ve also added a section in the documentation on TLS (there were no
docs at all so far).

changelog_begin

- [DAML Sandbox] When Sandbox is run with TLS enabled, you can now
  configure the requirement for client authentication via
  ``--client-auth``. See
  https://docs.daml.com/tools/sandbox.html#running-with-tls for more information.

changelog_end
2020-03-12 16:04:46 +01:00
associahedron
5b1698e553
Update packaging docs. (#4936)
* Update packaging docs.

changelog_begin
changelog_end

* Fix the code blocks

* Fix another code block

* Move comment so ordered list doesnt break.

* fix code blocks again???

* Apply suggestions from code review

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Make name collision section

* Incorporate feedback

* Small edit

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-12 12:33:53 +00:00
Leonid Shlyapnikov
19f5b86c79
Websocket stream to emit last seen offset instead of heartbeat message (#4886)
* Capture lastSeenOffset in the @volatile var

CHANGELOG_BEGIN
[JSON API - Experimental] Websocket stream now emits last seen offset instead of the heartbeat message.
``{"heartbeat": "ping"}`` is replaced by ``{"events":[],"offset":"<last seen offset>"}``. See #4510.
CHANGELOG_END

* updating docs

* moving the last seen offset into the stream, WIP

* adding in-stream state

* minor docs

* cleanup the heartbeat logic

* minot cleanup

* Change live and heartbeat msg handling + some debug logging (to be removed)

* fixing ts tests, cleaning up

* Adding todo with the reference to the follow-up ticket

* Adding todo with the reference to the follow-up ticket
2020-03-11 19:53:05 +00:00
Moritz Kiefer
ed5886051d
Support TLS in daml-helper (#4943)
This PR adds TLS support to DAML helper both via client certs and
without (although the latter is not tested so far since atm this is
not supported by sandbox). The CLI options follow the scheme used by
navigator/extractor/… with the addition that you can just pass `--tls`
which will turn on TLS without custom root certs or client certs.

changelog_begin

- [DAML Assistant] You can now connect to ledger via TLS for ``daml
  deploy`` and ``daml ledger`` commands. See
  https://docs.daml.com/deploy/generic_ledger.html for more information.

changelog_end
2020-03-11 17:58:05 +01:00
fabiotudone-da
e4ce69ea58
Rename EC auth cmdline options in line with the standard and document them. (#4930)
* Rename EC auth cmdline options in line with the standard and document them.

CHANGELOG_BEGIN
CHANGELOG_END

* 📝 Fix doc

* Auth docs: change `RSA DSA` -> `RSA Signature` (clashed with DSA algo)

As proposed by @SamirTalwar-DA

CHANGELOG_BEGIN
[Sandbox] Rename the `--auth-jwt-ec256-crt` command line option to `--auth-jwt-es256-crt` as well as `--auth-jwt-ec256-crt` to `--auth-jwt-es256-crt` and fix their docs
CHANGELOG_END
2020-03-11 13:18:47 +00:00
Robin Krom
8fe497ea5d
lanugage:docs: include generated docs on docs.daml.com (#4924)
This includes the generated docs for the typescipt libraries daml-react,
daml-ledger and daml-types in the documentation presented on
docs.daml.com. Next step is to create better readmes in this libraries.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-10 18:46:54 +01:00
Moritz Kiefer
4510bae9b6
Split upgrade models into a separate package (#4921)
* Split upgrade models into a separate package

This PR splits the upgrade example into 3 packages instead of 2 which
avoids a dependency from the model on the old model. This is explained
in the documentation.

changelog_begin
changelog_end

* Fix typo
2020-03-10 17:24:17 +01:00
nickchapman-da
944a23e302
New bazel rule -- daml_build_test -- to build a DAML project from its daml.yaml config, and setup a bazel test rule to validate the resulting .dar using daml validate-dar. (#4891)
Dependencies on other DAML projects are declared with the `dar_dict` attribute of the build rule. This attribute also declares the names by which the `.dar` files are known in the client project, corresponding to the references in the `daml.yaml` config.

The new rule is used build & test the upgrade documentation example code.

changelog_begin
changelog_end
2020-03-10 14:23:23 +00:00
Robert Autenrieth
6f8c3ad832
Add command deduplication docs (#4693)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-09 15:33:45 +01:00
Robin Krom
0e046d9eca
docs: new recommend path architecture documentation (#4795)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-09 12:15:37 +01:00
Moritz Kiefer
d4f96d9d16
Move upgrading docs out of experimental section (#4889)
I’ve added a note that you have to target LF 1.8 for this to work.

fixes #4767

changelog_begin
changelog_end
2020-03-09 10:38:58 +01:00
Gerolf Seitz
2b76d1962c
Deprecate ledger initialization with scenarios (#4864)
* Deprecate ledger initialization with scenarios

CHANGELOG_BEGIN
[Sandbox] Initializing the sandbox with scenarios is now deprecated in
favor of using DAML Script. The scenario parameter will be removed in
the near future. A warning is logged on startup.

The DAML SDK templates and quickstart guide are using DAML Script.

See the DAML Script migration guide for more information:
https://docs.daml.com/daml-script/index.html#using-daml-script-for-ledger-initialization
CHANGELOG_END
2020-03-09 09:30:18 +01:00
Moritz Kiefer
d8afe7a4cc
Support specifying sandbox/navigator/json-api/script options in daml.yaml (#4877)
changelog_begin

- [DAML Assistant] You can now specify options for
  Sandbox/Navigator/the HTTP JSON API in ``daml.yaml`` via
  ``sandbox-options``/``navigator-options``/``json-api-options``. These
  options will be picked up by running ``daml start``. This is
  particularly useful for specifying ``--wall-clock-time`` and for
  specifying a fixed ledger ID during development.

changelog_end

fixes #2993
2020-03-06 14:52:45 +01:00
Moritz Kiefer
ad55159989
Address review comments on script migration docs (#4870)
changelog_begin
changelog_end
2020-03-06 12:39:10 +01:00
Moritz Kiefer
fa968699c8
Unexperimentalize DAML script (#4856)
The only remaining thing that I wanted to get in before doing that was
overloading ``submit`` which has now happened. I’m sure we can come up
with tons of improvements but I don’t expect breaking changes to the
current state.

changelog_begin

- [DAML Script] DAML Script is no longer experimental.

changelog_end

fixes #4615
2020-03-05 20:40:15 +01:00
mergify[bot]
6defabe39e
Document migration from scenarios to DAML script (#4834)
* Document migration from scenarios to DAML script

changelog_begin
changelog_end

* Add a more general section on ledger initialization

* fix tests
2020-03-05 16:09:21 +00:00
mergify[bot]
86362ee0bf
fix typo in daml-script docs (#4840)
Redundant.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-05 15:12:53 +00:00
Moritz Kiefer
0a6be2b341
Overload submit so that it doesn’t collide with DAML script (#4831)
This introduces a `HasSubmit` typeclass (following the naming scheme
of `HasCreate`, …) and instances for `Scenario` and `Script`. This
avoids the need to hide `submit` in every single DAML script.

changelog_begin

- [DAML Standard Library] ``submit`` and ``submitMustFail`` are now
  overloaded so that they can be used in both scenarios and DAML script.

changelog_end
2020-03-05 15:43:35 +01:00
Moritz Kiefer
569a8a2192
Address upgrade doc review comments (#4811)
This PR addresses the comments from @hurryabit on #4750.

changelog_begin
changelog_end
2020-03-04 18:09:45 +01:00
nickchapman-da
a64610925c
Extend the documentation for DAML upgrade to shows project setup, build and deploy steps. (#4794)
changelog_begin
changelog_end
2020-03-04 15:23:14 +00:00
Leonid Shlyapnikov
93329ac81d
Add create-and-exercise JSON API endpoint (#4754)
* CreateAndExerciseCommand JSON decoding

* create-and-exercise endpoint WIP

* create-and-exercise endpoint + test, WIP

* create-and-exercise test

* Update docs

CHANGELOG_BEGIN

[JSON API - Experimental]
Add ``/v1/create-and-exercise`` JSON API endpoint. See #4507.

CHANGELOG_END

* Cleaning up domain JSON encoder/decoder, trying to get rid of HasTemplate

* Cleaning up domain JSON encoder/decoder, trying to get rid of HasTemplate

* Addressing code review comments
2020-03-02 20:43:58 +00:00
nickchapman-da
8ba9a2647d
Update Upgrade.daml (#4775)
changelog_begin
changelog_end
2020-03-02 18:26:36 +00:00
Moritz Kiefer
1b5140ed50
Add a first version of new upgrade docs (#4750)
This PR adds a first version of update documentation and removes the
existing docs which were talking about `damlc migrate`.
So far the docs focus on the high-level approach to upgrades taken in
DAML and give an example of how to structure upgrade contracts.

What is not covered so far (and I’d like to leave that for a separate
PR) is:

1. Technical details: How are things split up into packages, which
restrictions apply to data-dependencies, …
2. Deployment and Running the upgrade via triggers/daml script/…
3. Common patterns for handling this in UIs (e.g. “locking” old contracts)

changelog_begin
changelog_end
2020-03-02 09:54:39 +01:00
Rohan Jacob-Rao
a788822f0e
GSG: address some feedback from the workshop (#4757)
* Use yarn installation link instead of homepage

* Indentation of Messages segment

* Update git link to downloads page

* Explain why you see friends of friends in the network

* Tweak wording

* Descibe how to run new app more explicitly

* Make change to ui folder more obvious

* Add next steps

changelog_begin
changelog_end

* Fix title levels
2020-02-28 14:35:25 +00:00
Rohan Jacob-Rao
6f578d9f26
GSG: update code and make minor wording tweaks (#4746)
* Update create-daml-app code

* Remove reference to infix elem

* Remove the licenses from the code we tell users to copy

* Tweak conclusion

changelog_begin
changelog_end
2020-02-27 13:48:35 +00:00
Rohan Jacob-Rao
520643d1d2
Address some feedback on feature section and a little on the arch (#4743)
changelog_begin
changelog_end
2020-02-27 13:18:57 +01:00
Rohan Jacob-Rao
59b6afaefb
GSG: expand explanation in First Feature section (#4736)
* Tweak feature intro

* Further explain DAML workflow of messaging

* Elaborate on new DAML code and UI components

changelog_begin
changelog_end

* Explain MainView changes and conclude

* Fix indentation warning
2020-02-27 09:53:03 +01:00
Shayne Fletcher
66dd112960
Remove pragma 'daml 1.2' (#4702)
changelog_begin
- The pragma 'daml 1.2' is now optional.
changelog_end
2020-02-26 13:17:45 -05:00
Stephen Compall
79c6ee7339
add offset to live events; remove liveness marker (#4593)
* move BeginBookmark to util

* adding offsets to steps

* offsetAfter belongs in Txn, not InsertDeleteStep

* make transaction stream a ContractStreamStep.Txn stream

* add several ContractStreamStep append cases

* rewrite 'render' to emit offset in the right places

* make ContractStreamStep#append total again

* check for offset in a few tests

* revert useless whitespace changes

* missed argument

* simpler mapPreservingIds

* rewrite states for new "live" format

* remove invalidated "events" block structure assertions

* make shutdown in withHttpService deterministic, to try to catch race condition

* exhaustiveness checking somehow disabled; fixed fetch flow and all is well

* documentation and changelog

CHANGELOG_BEGIN
- [JSON API - Experimental] Remove ``{"live": true}`` marker from websocket streams;
  instead, live data is indicated by the presence of an "offset".
  See `issue #4593 <https://github.com/digital-asset/daml/pull/4593>`_.
CHANGELOG_END

* be more specific about what liveness marker may be in docs

* fix daml2ts websocket tests

* mention type rules for all cases in offset documentation
2020-02-26 10:17:21 -08:00
Leonid Shlyapnikov
d58bb4597e
Extend /v1/parties endpoint to support fetch by party IDs (#4680)
* Extend /party endpoint to allow specifying party ids

* Extend /party endpoint to allow specifying party ids

* Update docs

CHANGELOG_BEGIN

[JSON API - Experimental] Fetch Parties by their Identifiers. See #4512
``/v1/parties`` endpoint supports POST method now, which expects
a JSON array of party identifiers as an input.

CHANGELOG_END

* minor update

* minor update

* Use type alias

* Add warnings to the sync response

* test cases

* update docs, add test case for an empty input

* cleanup

* cleanup

* Addressing code review comments
2020-02-26 15:24:01 +00:00
Rohan Jacob-Rao
dde7203ca0
GSG: expand explanation of UI in architecture section (#4700)
* Copy App component from create-daml-app

* Introduce App component and start changing explanation of MainView

changelog_begin
changelog_end

* Elaborate on MainView, esp useStreamQuery

* Show where to find components and rearrange introduction of hooks

* ts

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Tweak context description

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Don't talk about []

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Address rest of comments

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-02-26 11:41:17 +00:00
Rohan Jacob-Rao
70734a6014
GSG: improve description of daml code (#4699)
* Change method of opening DAML files with VSCode

* More explanation of AddFriend choice

changelog_begin
changelog_end

* Contract not contract instance

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Remove 'instance' and explain nonconsuming better

* Fix file navigation and more wording

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-02-26 10:18:58 +00:00
Rohan Jacob-Rao
044ccc1280
GSG: Explain Sandbox and JSON API better and improve wording in intro (#4691)
* GSG: Explain Sandbox and JSON API better and improve wording in intro

Also adapt to lack of sign up.

changelog_begin
changelog_end

* Address comments
2020-02-25 15:43:10 +00:00
Rohan Jacob-Rao
f3a72cc6fc
GSG: Update code samples with latest create-daml-app (before and after feature) (#4689)
* Update files after messaging change

* Update daml code

* Update MainView before feature change

changelog_begin
changelog_end
2020-02-25 15:01:16 +01:00
Moritz Kiefer
38b7e65197
Add documentation for DAML repl and advertise it (#4678)
* Add documentation for DAML repl and advertise it

This PR adds some simple docs for ``daml repl`` and adds it to the
release notes.

changelog_begin

- [DAML Repl - Experimental] A new ``daml repl`` command that allows
  you to use the ``DAML Script`` API interactively. Take a look at the
  `documentation <https://docs.daml.com/daml-repl/>`_ for more
  information.

changelog_end

* Update docs/source/daml-repl/index.rst

Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* s/Repl/REPL/

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2020-02-25 11:16:31 +00:00
Rohan Jacob-Rao
731b2c56ea
Rework description of using the app with recent changes (#4679)
* Rework description of using the app with recent changes

changelog_begin
changelog_end

* Formatting

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Wording

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Address more comments

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-02-24 19:59:36 +00:00
Rohan Jacob-Rao
729ba80360
Try to typescript highlighting, still failing for tsx (#4664)
CHANGELOG_BEGIN
CHANGELOG_END
2020-02-24 12:14:22 +00:00
Moritz Kiefer
1bc2f9a189
Fix JWT example in sandbox auth docs (#4640)
Trailing commas are not allowed in JSON.

changelog_begin
changelog_end
2020-02-20 13:56:22 -05:00
Rohan Jacob-Rao
eed4828b08
GSG: Explain UI better in app arch section (#4639)
* Explain UI better in app arch section

Still rough but better than the void of information there currently.

changelog_begin
changelog_end

* Finish sentence
2020-02-20 18:45:56 +00:00
Rohan Jacob-Rao
77b189b675
Reword introduction and explanation of codegen (#4635)
* Reword introduction and explanation of codegen

CHANGELOG_BEGIN
CHANGELOG_END

* Say DAR instead of archive

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Remove 'i'll explain later'

* Include links to sections of this guide

* More links

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-02-20 17:36:00 +00:00
Robert Autenrieth
726b692797
Fix typo in the docs (#4632)
CHANGELOG_BEGIN
CHANGELOG_END
2020-02-20 17:44:11 +01:00
Moritz Kiefer
820563b576
Release 0.13.54 (#4627)
* Release 0.13.54

changelog_begin
changelog_end

* Update docs/source/support/release-notes.rst

Co-Authored-By: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

* update version

Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
2020-02-20 16:42:00 +00:00
Rohan Jacob-Rao
87a8a2548e
Update to changes in create-daml-app (#4619)
* Update MainView in App Arch section

* Update Feed to MessageList

* Update MessageEdit and MainView components and description in First Feature section

CHANGELOG_BEGIN
CHANGELOG_END

* Underline length

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-02-20 13:21:58 +00:00
nickchapman-da
f22ea41251
release 0.13.53 (#4601)
* release 0.13.53

changelog_begin

changelog_end

* Update docs/source/support/release-notes.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/support/release-notes.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-02-19 14:35:04 +00:00
Rohan Jacob-Rao
b9afc4e512
GSG: Update message choice to check for friendship (#4566)
changelog_begin
changelog_end
2020-02-18 16:00:57 +01:00
Stefano Baghino
8df29ac19e
Add more tests to default run of Ledger API Test Tool (#4561)
* Add more tests to default run of Ledger API Test Tool

Furthermore, drop TimeIT, which is a sandbox-only property (and tested already as part of its integration tests)

CHANGELOG_BEGIN
[DAML Ledger Integration Kit] Ledger API Test Tool default tests modified. Use --list for the updated list of default tests. Time service test dropped from the suite.
CHANGELOG_END

* Address https://github.com/digital-asset/daml/pull/4561#discussion_r380635979

* Address https://github.com/digital-asset/daml/pull/4561#discussion_r380636989

* Optimize imports

* Only run semantic tests on Canton
2020-02-18 13:59:46 +00:00
Rohan Jacob-Rao
96c10258f1
Minor edits on GSG (#4560)
* Fix UI intro para

* Tweak UI explanation

* Address some feedback about the intro text

* More changes to wording about DAML

* Small wording fixes to feature section

changelog_begin
changelog_end
2020-02-18 12:52:20 +00:00
Rohan Jacob-Rao
558f0d5042
New getting started guide (WIP) in experimental section of docs (#4548)
* Start drafting new quickstart guide

* Show how to run the app

* Very rough instructions for playing with the app

* Explain core of User template

* Start explaining UI code

* Example of daml react hook (useQuery for allUsers)

* Talk about daml2ts and start describing the new feature

* Start talking about DAML for posts feature

* Add ui file referenced in text

* Start describing changes to UI for Post feature

* Rework feature section wording as Messaging instead of Posts

* Write about additions to MainController

* Talk about new components before the view and controller (bottom up style)

* Describe additions to MainView (may change if we inline MainView into MainController)

* Adapt to create-daml-app removing MainController

* Fix code snippet and try to highlight tsx but fail

* Split guide into sections and rename some sections

* Improve start of app arch section

* Minor edits to code snippets and wording

* Update setup instructions with codegen step

* Update UI components in 'before' code

* Move and update section explaining TS codegen

* Copy in new DAML files

* Update UI code for messaging feature and some of the explanatory text

* Start reworking DAML feature section

* Redo DAML feature section

* Edit initial section

* Edit intro para of arch section

* Edit start of DAML explanation

* Edit template explanation

* Minor edit to UI explanation

* Improve wording of DAML explanation

* Rework sig/obs explanation

* Update User.daml file from create-daml-app and label AddFriend choice

* Explain AddFriend choice better

* Move new GSG to experimental features section

* Undo accidental change to vscode settings

changelog_begin
changelog_end

* Copyright headers

* Revert unwanted change

* Remove typescript highlighting which doesn't work

* Tweak explanation of code generation

* Remove driven
2020-02-17 17:59:05 +00:00
Stephen Compall
eee815d3c3
json-api: add live-data boundary marker to WS contract streams (#4465)
* Inserts alias

* ContractStreamStep, extending InsertDeleteStep with a boundary

* partitionBimap, an IDS utility for partitionMap on both inserts and deletes

* make the flow setup of acsFollowingAndBoundary a little clearer

* use partitionBimap to simplify websocket response stream

* make the flow setup of transactionsFollowingBoundary a little clearer

* acsFollowingAndBoundary becoming a ContractStreamStep producer

* insertDeleteStepSource also becomes a ContractStreamStep producer

* porting StepAndErrors to ContractStreamStep

* remove Acs constructor of ContractStreamStep

- it's an interesting idea for future potential features, but not useful
  right now so just a needless complication

* adapt convertFilterContracts to presence of LiveBegin marker

* adapt removePhantomArchives to presence of LiveBegin marker

* test that live marker is emitted in the right place

* document liveness marker

* add changelog

CHANGELOG_BEGIN
- [JSON API - Experimental] Add ``{"live": true}`` to WebSocket streams
  to mark the beginning of "live" data.  See `issue #4461
  <https://github.com/digital-asset/daml/issues/4461>`_.

  This marker is a placeholder feature; `issue #4509 bookmarks in query
  streams <https://github.com/digital-asset/daml/issues/4509>`_ will
  obsolete this marker, after which it will no longer be emitted.  When
  building features on the marker, be aware of this forthcoming
  replacement.
CHANGELOG_END

* be a little more prepared for offsets
2020-02-14 10:41:41 -05:00
Moritz Kiefer
514b8596a4
Clarify SDK version in DAML studio multi-package docs (#4518)
changelog_begin
changelog_end
2020-02-14 12:11:03 +00:00
Moritz Kiefer
71ddad381e
Improve docs around state-driven apps (#4496)
changelog_begin
changelog_end
2020-02-13 11:18:18 +01:00
Moritz Kiefer
8015119c81
Fix release notes for 0.13.52 (#4497)
changelog_begin
changelog_end
2020-02-13 09:11:23 +00:00
nickchapman-da
626a89eead
prepare release 0.13.52 (#4491)
changelog_begin
changelog_end
2020-02-12 15:01:25 +00:00
Moritz Kiefer
e7b8cdba89
Require explicit time mode for DAML script and DAML trigger (#4484)
This should provide a better migration path for people that still rely
on static time by forcing them to make this explicit. Given that both
DAML script and DAML triggers are still experimental, I’m not marking
this as a breaking change

changelog_begin

- [DAML Script - Experimental] The time mode must now always be
  specified explicitly. Use ``--static-time`` to recover the previous
  default time mode.

- [DAML Triggers - Experimental] The time mode must now always be
  specified explicitly. Use ``--static-time`` to recover the previous
  default time mode.

changelog_end
2020-02-12 11:16:25 +01:00
Stephen Compall
d9deb950ef
expand documentation on WebSockets subprotocols to a more-visible section (#4463)
* expand documentation on WebSockets subprotocols to a more-visible section

CHANGELOG_BEGIN
CHANGELOG_END

* combine reference in websocket section to auth section

* resection

* subprotocols sometimes called protocols

- suggested by @hurryabit; thanks
2020-02-10 20:05:03 +00:00
Moritz Kiefer
1dc40ca239
Support multiple-packages in damlc ide (#4445)
* Support multiple-packages in `damlc ide`

changelog_begin

- [DAML Studio] You can now open DAML Studio in the root of a
  multi-package project instead of opening it separately for each
  package. Take a look at the documentation for details on how to set
  this up.

changelog_end

There are a few caveats here:

1. You need a ``daml.yaml`` in the root of your project directory. I
think this is somewhat sensible but we should add a warning to VSCode
if you open it in a directory that does not have a ``daml.yaml`` (in a
separate PR).

2. Changes are not picked up accross dependencies. This is a larger
undertaking and given the current setup simply impossible (we don’t
know that the source files of one package belong to the DAR referenced
in the ``dependencies`` field of the other package. We can make this a
bit better by at least detecting that the ``.dar`` has changed but
let’s do that separately.

3. Since ``daml init`` runs once on startup, it will run in the root
directory instead of initializing the package db of the individual
packages. This is fixable but will conflict with #4391 so let’s
address this separately.

I’ve added docs to the daml studio section that explain the caveats.

* Use the proper sdk version in lsp-tests
2020-02-10 12:20:56 +00:00
Leonid Shlyapnikov
a194ce2a34
Wrap streaming API events in JSON object (#4453)
* Wrap streaming API events in json object

CHANGELOG_BEGIN

[JSON API - Experimental] wrap Streaming API events in JSON object:
   ``{ "events": [ E1, E2, ... ] }``
   See: 4384

CHANGELOG_END

* cleanup
2020-02-07 17:17:42 -05:00
Leonid Shlyapnikov
98ab189e3e
Encode tuples as records in the JSON API docs, add a new test (#4452)
tuples are formatted as records in the response, so this way input format
matches the output

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-07 13:46:36 -05:00
Stephen Compall
8710673e71
with archived responses from WS streams, include template ID alongside contract ID (#4439)
* move InsertDeleteStep to util

* turn append cid argument into a typeclass

* use Cid for appendForgettingDeletes as well

* add secondary data to the deletes in InsertDeleteStep with new covariant tparam

* make StepAndErrors hold ArchivedContracts so ws archives look like exercise archives

* add changelog

CHANGELOG_BEGIN
- [JSON API - Experimental] The format of ``archived`` responses from WebSocket endpoints
  has changed to include template IDs, similar to exercise responses.
  See `issue #4383 <https://github.com/digital-asset/daml/issues/4383>`_.
CHANGELOG_END
2020-02-07 11:24:15 -05:00
Leonid Shlyapnikov
fb6d8afd1f
Rename JSON API endpoints, add version prefix (#4440)
* Rename JSON API endpoints, add version prefix. Combining two breaking changes.

CHANGELOG_BEGIN

[JSON API - Experimental] Rename JSON API endpoints. See #4289 and #3145
    /command/create => /v1/create
    /command/exercise => /v1/exercise
    /contracts/lookup => /v1/fetch
    /contracts/search => /v1/query
    /contracts/searchForever => /v1/stream/query
    /contracts/lookupForever => /v1/stream/fetch
    /parties => /v1/parties

CHANGELOG_END

* minor update

* fix typo in the logging

* experimental disclosure update

* experimental disclosure update

* experimental disclosure update
2020-02-06 16:30:47 -05:00
Stephen Compall
2a2479a3fd
rename "contracts" to "events" in JSON API exercise response (#4436)
* rename "contracts" to "events" in JSON API exercise response

CHANGELOG_BEGIN
- [JSON API - Experimental] Exercise response field "contracts" renamed to "events".
  See `issue #4385 <https://github.com/digital-asset/daml/issues/4385>`_.
CHANGELOG_END

* more events in doc

- pointed out by @leo-da; thanks
2020-02-06 20:13:46 +00:00
Leonid Shlyapnikov
0583f57de6
Fetch by key stream test and doc (#4393)
* Remove phantom archive when streaming events filtered by contract key

* Add fetch test cases, WIP

* Add fetch test cases, WIP

* Add fetch test cases, WIP

* Add fetch test cases, WIP

* Test case to validate phantom archive filter for stream/fetch

* Use `scan` instead of `statefulMapConcat` to filter out phantom archives

advantage(???) immutable state vs mutable

* make `com.digitalasset.http.WebsocketEndpoints.handleWebsocketRequest` public

so DABL can call it directly, `private[http]` does not work since DABL
is under com.projectdabl, see #4190

* Fixing typos

* Scalafmt

* Scalafmt

* Removing unused function

* Update docs

* Remove unused type alias

* CHANGELOG_BEGIN

[JSON API - Experimental]
- Added streaming version of fetch by key: ``/stream/fetch``. See #4075.

CHANGELOG_END

* Address code review comments

* Add test case with todo to address consistent handling of empty requests

* Fixing merge conflicts

* Addressing code review comments

* Addressing code review comments

Use `partition` instead of consecutive intersect and diff
2020-02-06 18:45:53 +00:00
Leonid Shlyapnikov
c15cf3457e
CHANGELOG_BEGIN (#4434)
[JSON API - Experimental]
Added a command line option to allow overriding default TTL.
``--default-ttl <value>`` Optional Time to Live interval to set if not provided in the command. Examples: 30s, 1min, 1h. Defaults to 30 seconds

CHANGELOG_END
2020-02-06 12:36:36 -05:00
Stephen Compall
b85637115f
accept a list of {templateIds, query} as input to searchForever (#4363)
* add SearchForeverRequest with one-or-many JSON model

* the least structured way to flatten a query union into a single stream

* add somewhere for indices to go in StreamQuery

* unzipMap utility

* doc Positive

* collect indices for SearchForever predicate, and use only one Map

* interface for rendering positions

* finish propagating positives from the predicate to the rendering phase

* add matchedQueries to every `created` in the searchForever results

* test that matchedQueries indices are included in query stream blocks

* document query union

* add changelog

CHANGELOG_BEGIN
- [JSON API - Experimental] ``/contracts/searchForever`` accepts multiple queries,
  and includes with each ``created`` result the ``matchedQueries`` indicating which
  queries matched.
  See `issue #4363 <https://github.com/digital-asset/daml/pull/4363>`_.
CHANGELOG_END

* remove unused unzipMap
2020-02-06 10:23:38 -05:00
Gary Verhaegen
47bd131f15
add copyright headers to yml files (#4407)
We seem to have forgotten about them in the copyright scripts.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-06 12:54:07 +01:00
Moritz Kiefer
0f03751a35
Release 0.13.51 (#4399)
changelog_begin
changelog_end
2020-02-05 11:10:55 +00:00
Stephen Compall
1c8bb9968a
ensure archive of a key happens to left of create of same key in each WebSocket result block (#4390)
* ensure archive of a key happens to left of create of same key in each WebSocket result block

CHANGELOG_BEGIN
- [JSON API - Experimental] In websocket endpoints, if a 'created' and 'archived' contract
  in the same result array share a contract key, the 'archived' is guaranteed to occur
  earlier in the array than the 'created'.
  See `issue #4354 <https://github.com/digital-asset/daml/issues/4354>`_.
CHANGELOG_END

* by key I mean contract key

- suggested by @hurryabit; thanks
2020-02-04 15:59:13 -05:00
Andrew J. Stone
cfd300c336
Fix doc inconsistency regarding party reference (#4337)
In the integrity concepts, a party is defined as `C`, but referenced
later as `A`. As the rest of the docs use `A` for the party and `C` for
the contract, this seems to be a mistake. This corrects that
inconsistency.

This commit also clarifies a sentence and fixes a typo.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-02 11:10:11 +01:00
Nemanja
e87735a228
Updated roadmap for Jan. 2020 (#4183)
* Updated roadmap for Jan. 2020

* Removed Canton update

* Wording fixes

CHANGELOG_BEGIN
Removed previous roadmap (September 2019)
Added new one for January 2020
CHANGELOG_END
2020-02-01 16:17:42 +01:00
Leonid Shlyapnikov
a754a2aa22
Add fetch by key websocket stream, part 1 of 2 (#4212)
* Add fetch by key stream websocket stream, WIP

* Add fetch by key stream websocket stream, WIP

* new formatting rules

* minor documentation cleanup

* refactoring required for the `lookupForever` stream

* Extracted `StreamQuery` typeclass

* Extracted `StreamQuery` typeclass

* Fix typo

* minor cleanup

* Using polymorphic `A: WebSocketService.StreamQuery` to get `lookupForever` functionality

* Remove unused methods

* Cleanup

* cleanup

* cleanup

* Merge remote-tracking branch 'origin/master' into leo-4075-fetch-by-key-stream

# Conflicts:
#	ledger-service/http-json/src/main/scala/com/digitalasset/http/WebSocketService.scala

* Rename the endpoint so it is compliant with #4289

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-31 21:49:45 +00:00
Rohan Jacob-Rao
a5339cda7f
Release 0.13.50 (#4292)
* Release 0.13.50

changelog_begin
changelog_end

* force clean build on Windows

apparently our cache is borked again …

* undo windows changes

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-01-30 21:45:29 +00:00
Stephen Compall
7882080207
warn on unknown template IDs in searchForever (#4312)
* in searchForever, warn on unknown template IDs as long as at least one is known

* remove unused resolveTemplateId

* factor out WS request parts in WS integration test

* factor out IOU create

* test early template ID warning in searchForever stream

* document warnings case for searchForever

CHANGELOG_BEGIN
- [JSON API - Experimental] Precede stream with warnings of unknown template IDs, if any,
  rather than failing outright.
  See `issue #4290 <https://github.com/digital-asset/daml/issues/4290>`_.
CHANGELOG_END
2020-01-30 16:13:40 -05:00
Shayne Fletcher
9a628ccb9b
Adjust with suggestions from review feedback (#4261)
changelog_begin
changelog_end
2020-01-30 11:31:08 -05:00
Robin Krom
a1a56002a3
release 0.13.49 (#4279)
* release 0.13.49

CHANGELOG_BEGIN
CHANGELOG_END

* Rearrange release notes

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-01-30 17:27:50 +01:00
Richard Kapolnai
325e07e120
Minor clarifications in intro docs about transaction consequences (#4169) 2020-01-30 11:21:38 +01:00
Robin Krom
d9dffc13c4
release 0.13.48 (#4269)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-29 19:22:41 +01:00
daravep
215f751acf
Minor update to daml reference docs (#4243)
Before, we didn't mention in the docs that sum-types need to derive from
(Eq,Show) if they are to be used as arguments of templates or choices.
Now we do.

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-29 16:30:23 +01:00
Martin Huschenbett
34ac1b0cb8
Release DAML SDK 0.13.47 (#4258)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-29 15:24:54 +01:00
Shayne Fletcher
a56caa0190
daml2ts : Explain DAML/TypeScript mappings (#4196)
changelog_begin
changelog_end

Co-authored-by: Shayne Fletcher <shayne.fletcher@digitalasset.com>
2020-01-27 12:25:13 -05:00
Stefano Baghino
b87ff49e95 Document consumability qualifiers in the reference docs (#4134)
* Document consumability qualifiers and their privacy implications in the reference docs

CHANGELOG_BEGIN
[Documentation] Documented consumability qualifiers in the DAML reference docs, along with their privacy implications
CHANGELOG_END

* Fix WARNING: Title underline too short.

* Fix DAML compile errors on reference docs code

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369706887

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369707047

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369707740

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369707972

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369708826

* Review and fix according to improvements part of #4164

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369709216

* Grammar fix

* Address https://github.com/digital-asset/daml/pull/4134#discussion_r370195737

* Address https://github.com/digital-asset/daml/pull/4134#discussion_r370337305

* Address https://github.com/digital-asset/daml/pull/4134#pullrequestreview-347806117
2020-01-24 15:50:13 +00:00
Leonid Shlyapnikov
9ab419f96b CHANGELOG_BEGIN (#4192)
[JSON API - Experimental] Rename ``argument`` field to ``payload`` in the ``command/create`` request. See #4189.

CHANGELOG_END
2020-01-24 09:04:03 +01:00
Leonid Shlyapnikov
78b29852d3
JSON API documentation update (#4173)
Document error handling

Document query store

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-23 14:54:12 -05:00
Gerolf Seitz
1866374bbf
Remove the doc sections on the rxjava bots (#3872)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-23 13:55:44 +01:00
Robin Krom
8e1e91dcf6
release 0.13.46 (#4171)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-22 20:15:57 +01:00
anticlimactic
4978901f71 Fixed typo in glossary.rst (#4063)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-22 14:29:46 +01:00
Robert Autenrieth
3f95c2ec13
Change sandbox JWT format (#4070)
* Introduce new JWT payload format
... the reader still supports old formats

CHANGELOG_BEGIN
[Sandbox] The sandbox uses a new payload format for authentication tokens (JWTs).
          The old format is deprecated, but still works.
[JSON API] The HTTP JSON API now uses the same payload format for authentication tokens as the sandbox.
           The old format is deprecated, but still works.
CHANGELOG_END

* Add helper function for getting token party

* Support sandbox tokens in JSON API

* Add warning for deprecated formats

* Update documentation

* Add explicit test for new format

* Update JSON API documentation

* Fix test
2020-01-22 14:26:57 +01:00
Moritz Kiefer
a771bf6627 Release 0.13.45 (#4154)
* Release 0.13.45

changelog_begin
changelog_end

* Update docs/source/support/release-notes.rst

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2020-01-22 09:20:38 +00:00
Richard Kapolnai
600066691a
Fix minor issues in docs (#4151)
* Change Oblique to opaque.

* Fix docs: unfinished sentence about contract keys

* Update 3_Data.rst

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-21 23:19:35 +01:00