Commit Graph

473 Commits

Author SHA1 Message Date
Sofia Faro
09013eb501
Add eager timeouts to the polling functions used in daml start and assistant integration tests. (#12361)
* Add timeouts to polling funcs in daml start.

This PR adds timeouts to some polling functions used in daml start and
the assistant integration tests, and also early exits based on a process
exit status. E.g. waitForHttpServer will make sure some process is
still running, instead of waiting to timeout.

The effect of this is that now whenever there is some error in a
subprocess, daml start and the integration tests will finish early
instead of running forever (or timing out in bazel).

changelog_begin
changelog_end

* missing a readPortFile instance
2022-01-12 10:01:56 +00:00
Sofia Faro
ca33990005
Use canton port file in daml start and tests. (#12324)
changelog_begin
changelog_end
2022-01-10 15:14:54 +00:00
Moritz Kiefer
2783b7bdad
Support user management in create-daml-app (#12089)
fixes #11998

changelog_begin
changelog_end
2022-01-07 12:45:13 +00:00
Sofia Faro
8fdc871048
Make daml start integration tests use canton. (#12292)
* Make daml start integration tests use canton.

(Haven't fixed the hot reload test yet.)

changelog_begin
changelog_end

* remove vestigial message

* re-enable hot reload tests for sandbox-kv
2022-01-07 10:13:57 +00:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
Sofia Faro
994b2317a1
Add a test for daml start --sandbox-canton (#12223)
Part of #11831

changelog_begin
changelog_end
2021-12-21 17:14:32 +00:00
Sofia Faro
830497ae34
Add --sandbox-canton option in daml start (#12192)
* --sandbox-canton option for daml start

changelog_begin
changelog_end

* hlint

* Move getFreePort to da-hs-base

* Use flag' not switch
2021-12-21 12:39:11 +00:00
Moisés Ackerman
ba0c6c9841
Set --enable-scenarios to False by default (#12156)
* Set --enable-scenarios to False by default

changelog_begin
changelog_end

* Enable scenarios for shake test

* Add --enable-scenarios=yes for //compiler/lsp-tests

* Add enable_scenarios arg to rules_daml/daml.bzl helpers

* daml_compile
* daml_build_test
* daml_test

* Add enable_scenarios to ledger/test-common helper da_scala_dar_resources_library

* Add --enable-scenarios=yes for //ledger/test-common

* Remove unused scenario in //ledger/test-common PingPong test

* Add --enable-scenarios=yes for //daml-lf/tests

* Add --enable-scenarios=yes for //language-support/java tests

* Add --enable-scenarios=yes for group-chat example

* Add --enable-scenarios for //ledger/sandbox-perf LargeTransaction test

* Add --enable-scenarios=yes for //docs tests

* Add --enable-scenarios=yes for //daml-lf/scenario-interpreter tests

* format bazel

* Add --enable-scenario=yes for 'daml_doc_test's

* Add --enable-scenarios=yes for DamlDocTestIntegration

* Add --enable-scenarios=yes for DamlcTest

* Add --enable-scenarios=yes for Test/DataDependencies

* Add --enable-scenarios=yes for daml-ghc-deterministic.sh

* Add --enable-scenarios=yes for Test.IncrementalBuilds

* Add --enable-scenarios=yes for tests:memory-bond-trading and tests:memory-examples

* Add --enable-scenarios=yes for daml-assistant/integratio-tests
2021-12-20 19:31:06 +01:00
Stefano Baghino
52110e31a3
Remove Extractor (#12188)
* Remove Extractor

Extractor is being removed after a long time being in Labs status.

This should improve the flakiness on CI.

🔥

changelog_begin
Extractor has been removed from the SDK
changelog_end

* Remove Extractor documentation

* Remove Extractor from CODEOWNERS

* Remove Extractor references in Daml-LF build files

* Remove Extractor references in the Daml SDK assistant

* Remove Extractor from the SDK

* Remove Extractor reference from CONTRIBUTING.md
2021-12-17 13:43:23 +00:00
Stefano Baghino
42adfdc857
Get rid of deprecated components (#12167)
* Get rid of deprecated components

Removes:
- mentions of the Node.js bindings
- mentions of the Scala bindings
- usage of the Scala codegen as an SDK tool
- Java bindings "reactive components"

changelog_begin
The Node.js bindings are no longer supported as part of the Daml SDK
The Scala bindings are no longer supported as part of the Daml SDK
The Java bindings reactive components are no longer supported as part of the Daml SDK
The `daml codegen` command has dropped support for Scala
changelog_end

* Fix typo noticed by @cocreature

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

* Address https://github.com/digital-asset/daml/pull/12167#issuecomment-995714093

* Remove quickstart-scala from the SDK tarballs

* Fix failing codegen test

* Address https://github.com/digital-asset/daml/pull/12167#pullrequestreview-833991243

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-12-16 16:55:19 +00:00
Sofia Faro
8b05a533ce
Refactor daml start options, add true/false to yes/no/auto flags. (#12169)
* Refactor daml start & add true/false to yesNoAuto.

- Refactor the way we pass arguments to daml start. We were relying on
  positional arguments with newtypes, but this is super cumbersome. I
  changed it to a RecordWildCards-style approach, where we don't need
  quite so many newtypes, and no more positional arguments.

- "--start-navigator" flag had some custom logic to accept "true" and
  "false". I don't see why we can't just accept "true" and "false"
  anywhere we use the "yes/no/auto" flags, so I just changed that and
  got rid of the custom logic.

- The way "auto" was handled for this flag was incorrect, since "auto"
  is supposed to be equivalent the default, i.e. not passing any
  flag. I changed it so auto is equivalent to not passing an argument.
  (I.e. it looks in daml.yaml for the start-navigator option).

changelog_begin
changelog_end

* dont pass in shutdownStdinClose to runStart
2021-12-16 14:40:36 +00:00
Remy
58e69ade1a
LF: replace "dev" LF version by "1.dev" in bazel files (#11894)
the more consistent, as asked by Moritz in review of #11820

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 12:23:17 +00:00
Moritz Kiefer
132c277bda
Add a Canton sandbox to the SDK (#11881)
This is only the first step so we have something to use in tests,
eventually `daml sandbox` should map to this Sandbox.

part of #11831

changelog_begin
changelog_end
2021-11-26 11:27:41 +01:00
Moritz Kiefer
63d855f202
Pass damlc build logs through daml logger (#11485)
* Pass `damlc build` logs through daml logger

This gives us some timings which can be useful in some
circumstances (I want timings around data-dependencies next).

I also changed the default log level to INFO. The `damlc build` output
doesn’t get any noisier from that.

Example output:

```
2021-11-01 15:25:17.16 [INFO]  [build]  []
Compiling foobar to a DAR.

2021-11-01 15:25:17.80 [INFO]  [build]  []
Created .daml/dist/foobar-0.0.1.dar
```

changelog_begin
changelog_end

* Adjust scenario service log level

changelog_begin
changelog_end

* Adjust tests

changelog_begin
changelog_end

* delete comment

changelog_begin
changelog_end
2021-11-02 12:10:09 +00:00
Moritz Kiefer
fd973e6b86
Drop assistant integration tests for relative/absolute DAML_PROJECT (#11461)
Let me provide some justification:

1. We used to have a bug around this in the assistant. This got fixed
in https://github.com/digital-asset/daml/pull/7142 together with unit
tests. https://github.com/digital-asset/daml/pull/7150 then added an
integration test. Finally
https://github.com/digital-asset/daml/pull/8032 as part of refactoring
also added a test for absolute paths.
2. As shown in https://github.com/digital-asset/daml/issues/11218
those tests together currently take more than 50s (locally without
load).
3. On the other hand, they don’t really seem to add any meaningful
coverage over the unit tests.

So overall, those tests don’t seem to test anything particularly
useful that isn’t tested elsewhere while they are very slow so
deleting them seems like the best strategy.

changelog_begin
changelog_end
2021-10-29 09:04:11 +00:00
Moritz Kiefer
17776f3496
Factor out npm install step of create-daml-app tests (#11294)
* Factor out npm install step of create-daml-app tests

This PR speeds up the create-daml-app tests by 30s or so by factoring
out the install of the unchanged npm deps into a genrule which we then
feed in again. This is a bit ugly but given how frequently we run
those tests I do think it is worth the uglyness.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-10-20 14:24:30 +02:00
Moritz Kiefer
6b65a72577
Merge npm install steps in create-daml-app tests (#11287)
This cuts about 20s of the test time locally with no meaningful loss
in test coverage (imho).

changelog_begin
changelog_end
2021-10-19 15:32:44 +02:00
Moritz Kiefer
cb1fb6f7bf
Reuse sandbox & JSON API across daml ledger tests (#11214)
Speeds them up by more than 2x and reduces flakiness. I also added a higher
timeout to the allocate party call since that seems to still be
sometimes too slow if lots of things run in parallel.

changelog_begin
changelog_end
2021-10-13 11:19:44 +02:00
John Sullivan
7a4963b43d
add --max-inbound-message-size flag to daml ledger export (#11087)
Add support for `--max-inbound-message-size` flag to the [Ledger Export](https://docs.daml.com/tools/export/index.html) tool.

CHANGELOG_BEGIN

- [Daml Assistant] Add support for `--max-inbound-message-size` flag to the Ledger Export tool.

CHANGELOG_END
2021-09-30 12:17:53 +02:00
Robin Krom
87ecf1fe63
daml-ledger: better errors for non-json responses. (#11055)
This fixes #10985.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-29 11:46:54 +02:00
Moritz Kiefer
04f322e2aa
Bump resources for daml-ledger tests (#10984)
changelog_begin
changelog_end
2021-09-22 13:11:14 +00:00
Moritz Kiefer
b748fd6b67
Support TLS in Daml Helper --json-api requests (#10709)
This PR accepts the --tls flag but rejects the flags to set certs
because those don’t really make sense here (or are at least not easily
settable).

Unfortunately no great way to test this without a huge amount of test
infrastructure to setup a custom TLS reverse proxy for tests.

If someone has an idea to add a reasonable test, I’m all ears.

changelog_begin

- [Daml Assistant] The `daml ledger` commands now accepts `--tls` in
  combination with `--json-api` to access a JSON API behind a TLS
  reverse proxy.

changelog_end
2021-09-01 08:45:42 +02:00
nicu-da
7cc698948c
Add multiple ways of specifying deduplication [KVL-1047] (#10601)
CHANGELOG_BEGIN
ledger-api - Command deduplication period can now be specified by setting `deduplication_offset` instead of `deduplication_time` (only valid for v2 WriteService). This change is backwards compatible.
CHANGELOG_END

* Propagate the enriched deduplicationPeriod instead of deduplication duration

* Update the Haskell bindings for the new deduplication period

* Calculate the deduplicateUntil using the new deduplication period for backward compat

* Use consistent naming for deduplication_period

* Cleanup command timeout extraction from deduplication period

* Add the required deduplication_offset to deduplication instead of deduplication_start

* Update haskell bindings to support deduplication_offset

* Add support for deduplication_offset in the ledger-api

* Remove the timestamp-based deduplication from our models to simplify upgrade for users

* Add optional conformance test for offset based deduplication

* Remove buf rule for FIELD_SAME_ONEOF as our change is backwards compatible

* Disable FIELD_SAME_ONEOF buf check for commands file

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* Update comment for deduplication period

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-08-25 05:58:03 -07:00
Gary Verhaegen
f8c0a35940
rewrite trigger docs to follow gsg (#10509)
* rewrite trigger docs to follow gsg

Per #10419 point 4, I've rewritten the Triggers section to build upon
the Getting Started Guide instead of inventing its own example.

Compared to #10395, this has a lot more explanations as this page must
now serve the dual purpose of being a possible "next step" from the GSG
and being the main reference page for triggers. It's also lost the "next
steps" section, which I think is a bit of a shame, but it doesn't really
make sense here.

There's also no easy way for people not interested in the GSG to follow
along; should we expose the "completed GSG" as a tempate?

CHANGELOG_BEGIN
CHANGELOG_END

* keep copy-trigger as a template

* fix copy-trigger project name

* make up gsg-trigger template

* remove awkward sentence, fix existing typo

* update code to use when{,Some}

* add  to

* swap emitCommands and getCommandsInFlight

* typo

* insist on state-correction perspective

* fix copy-trigger tests

* add back copy-trigger to whitelist

* add gsg-trigger to whitelist
2021-08-17 13:28:07 +00:00
Samir Talwar
4b8b67a1b5
Upgrade Scalatest to v3.2.9. (#10576)
* Upgrade Scalatest to v3.2.9.

Because of some coupling we also have to upgrade Scalaz to the latest
v7.2 point release, v7.2.33.

The Scalatest changes are quite involved because the JAR has been broken
up into several smaller JARs. Because Bazel expects us to specify all
dependencies and doesn't allow transitive dependencies to be used
directly, this means that we need to specify the explicit Scalatest
components that we use.

As you can imagine, this results in quite a big set of changes. They
are, however, constrained to dependency management; all the code remains
the same.

CHANGELOG_BEGIN
CHANGELOG_END

* http-json-oracle: Fix a Scalatest dependency.

* ledger-api-client: Fix a Scalatest dependency.
2021-08-12 23:19:35 +00:00
Moritz Kiefer
34fa5a0a7c
Support running daml navigator without a config file (#10532)
No reason to force the existence of a config file if you can start
without one.

fixes #10516

changelog_begin

- [Navigator] Navigator will now start with an empty config if no
config file exists and it is run outside of a project.

changelog_end
2021-08-10 11:15:55 +00:00
nicu-da
35641b7f62
Add submission id to the GRPC api [KVL-999] (#10467)
* Add optional submission id to commands.proto

This allows to propagate a submission id. If no id is submitted (the submission id is empty) then we generate a new submission id

CHANGELOG_BEGIN
Add optional submission_id to the commands.proto.
CHANGELOG_END

* Update haskell bindings to include the submission id

* Code review - rename submission id extractor

* Code review - update comment and remove braces from if block

* Fix braces
2021-08-06 08:54:54 +02:00
Stefano Baghino
bb4641756f
Daml assistant capitalization (#10140)
changelog_begin
changelog_end

- DAML -> daml
- Assistant -> assistant

The capitalization of the latter fixed one occurrence of a capitalized 'A'
which was inconsistent with the vast majority of uncapitalized 'a's.
2021-06-29 14:32:44 +02:00
Sofia Faro
fdab1e68d7
Parallelize daml-assistant integration tests. (#9802)
* Parallelize daml-assistant integration tests.

This mainly involves avoiding changing the working directory or the environment while inside tests.

AFAIK the daml start tests can't be parallelized without starting up a sandbox instance each time, which seems bad. These tests could be separated from the rest...

The magic number "2" was picked via experimentation:

```
1 threads -> 306 s
2 threads -> 199 s
3 threads -> 198 s
4 threads -> 195 s
```

changelog_begin
changelog_end

* buildifier-fix
2021-05-26 13:05:39 +00:00
Moritz Kiefer
88c83ec476
Mark //daml-assistant/daml-helper:test-deployment as flaky (#9769)
Fails a bit too often to waste people’s time with restarts.

changelog_begin
changelog_end
2021-05-21 09:57:19 +02:00
Moritz Kiefer
f5a03b3af6
Stop leaking Sdk installations from assistant integration tests (#9751)
Each of these installations is about 1gb so it’s not that unlikely
that this plays a significant factor in our out of disk space errors.

Although I think we cleanup partially so I’m not sure how large the
part of the SDK installation is that gets leftover.

changelog_begin
changelog_end
2021-05-20 20:20:12 +02:00
Moritz Kiefer
5f954da841
Fix flakiness in hot reload tests (#9748)
I started looking into failures in the integration tests and this
seems by far the most prevalent one (maybe even the only one but that
needs more investigation). The issue here is that sometimes waiting
40s isn’t enough. On the other hand, sometimes we wait unnecessarily
long which is also bad.

The fix in this PR is to wait until we see the "reload complete"
message which should be exactly the right amount of time to wait.

changelog_begin
changelog_end
2021-05-19 18:48:00 +00:00
Moritz Kiefer
142767c421
Split daml test-script code into a separate library (#9674)
Currently we have the following dependency chain:

1. The compiler depends on the scenario service for daml test
2. The scenario service depends on Daml Script
3. Daml Script depends on the Sandbox code only for daml test-script

The last one can easily be split. The scenario service does not care
about this code.

This means that now if we change ledger code, at least not all
compiler tests are going to rerun.

Verified that this actually breaks the dependency fully via

```
bazel query 'somepath(//compiler/damlc/tests:packaging, //ledger/participant-integration-api/...)'
```

changelog_begin
changelog_end
2021-05-13 12:58:31 +02:00
Sofia Faro
4a460973a2
Block concurrent SDK installations. (#9640)
* Block concurrent SDK installations.

Fixes #9612

changelog_begin
- [Daml Assistant] The assistant will now avoid
  installing SDK versions concurrently, waiting
  for the previous installation to finish before
  starting the next installation (if still
  necessary). This fixes a bug where the SDK
  would become corrupted because two
  installations were started concurrently.
changelog_end

* Remove filelock from stack-snapshot.yaml

* Update windows snapshot pin

* Add message if file lock is not immediately available.
2021-05-11 16:36:19 +00:00
Moritz Kiefer
f0f8027a47
Set supported jdbc driver names at compile time (#9489)
* Set supported jdbc driver names at compile time

This is mainly to unblock the work on Oracle support in the Ledger API
but I think it’s a sensible thing in general. For the Ledger API,
moving the dependency to the top-level is apparently rather
tricky. Because the SDK bundles everything into a single megajar,
Sandbox depending on the oracle library does also result in the JSON
API and the trigger service will also have the oracle library in scope
and will support Oracle in CE which they should not.

This PR simply hardcodes the list of supported drivers to address
that. Not pretty but does the job.

changelog_begin
changelog_end

* format

* Address review comments

changelog_begin
changelog_end
2021-04-26 09:19:31 +02:00
Andreas Herrmann
98d97e11ff
Don't duplicate export script option parsing (#9432)
* Don't duplicate export script option parsing

Forward all flags to the wrapped executable instead of handling them in
daml-helper with optparse-applicative.

changelog_begin
changelog_end

* Fix hlint warning

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-04-16 13:53:10 +00:00
Andreas Herrmann
5e652bb2f8
Add daml export script command to Daml assistant (#9414)
* rename "dump" to "export"

* Add Daml export command to assistant

* Make daml export script a subcommand of daml export

* daml-assistant IT for daml export script

* Expose export as daml ledger command (hidden for now)

Add Haskell side parser for ledger export flags

changelog_begin
* [Daml export] New feature: Use ``daml ledger export script`` to
  generate a Daml script that will reconstruct a given ledger state.
  This is an early access feature.
changelog_end

* Update integration test

* Remove daml export - it's daml ledger export now

* integration-test set ledger port

The integration tests don't configure the port in the project config,
but on the command-line, and they don't use the default value.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-04-16 10:53:49 +00:00
Robin Krom
f84b6abc05
daml build: add a --access-token-file for remote dependencies (#9358)
* daml build: add a --access-token-file for remote dependencies

This adds a `ledger.access-token-file` field in the `daml.yaml` project
file and a `--access-token-file` flag to `daml build` to authorize
querying/fetching of remote dependencies.

CHANGELOG_BEGIN
[daml build] A new flag `--access-token-file` is added for the `daml
build` command. It allows the specify the path to an access token to
authenticate against the ledger API. This is needed if the project
depends on a remote Daml package hosted on such a ledger. Alternatively,
the path to the token can also be specified in the `daml.yaml` project
file under the `ledger.access-token-file` field.
CHANGELOG_END
2021-04-08 23:20:52 +02:00
Moritz Kiefer
e84c954973
Expose Oracle support in the EE trigger service (#9342)
* Expose tho Oracle support in the EE trigger service

This PR builds on the previous PR that did all the actual work on
Oracle support and exposes it in the enterprise edition. This PR only
releases the enterprise edition via the SDK tarball. I’ll add
artifactory publishing separately.

changelog_begin
changelog_end

* Update daml-assistant/daml-sdk/validate.sh

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-04-08 14:50:47 +02:00
Robin Krom
2b1f882a9d
daml-ledger: new list-packages command (#9325)
Fixes #9196.

This adds a new command `daml package list` which fetches all
available packages from the ledger and prints package name/versions to
stdout.

CHANGELOG_BEGIN
[daml packages] A new `daml packages list` command has been added to
list packages deployed on a remote Daml ledger.
CHANGELOG_END
2021-04-07 13:23:56 +02:00
Robin Krom
4d0c6dbb6b
daml ledger: better error messages for missing host/port args (#9322)
Fixes #9187.

Instead of `daml: Must be called from within a project` you will get now
`daml: This command needs to be either run from within a project  or the argument --host needs to be specified.`

CHANGELOG_BEGIN
CHANGELOG_END
2021-04-06 15:06:24 +00:00
Robin Krom
b4bda47e7d
remote pkgs: resolve package names in data dependencies via ledger (#9270)
* remote pkgs: resolve package names in data dependencies via ledger

This implements part 3) of #8976.

This adds the ability to specify package names/versions in daml.yaml in
the data-dependencies stanza. They are being resolved via the project
ledger and a daml.lock lock file.

CHANGELOG_BEGIN
  [remote dependencies] Package names and versions, as well as package
  ID's are allowed in the `data-dependencies` list of `daml.yaml`. These
  packages are fetched from the project ledger. The auto-generated
  `daml.lock` file keeps track of the package name/version to package
  ID's resolution and should be checked in to version control of the
  project.
CHANGELOG_END

* added docs

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

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

* Update docs/source/daml/reference/packages.rst

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

* suggestions

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-03-31 15:37:36 +02:00
Stefano Baghino
3fa05804bf
Make non-repudiation integration exclusive to enterprise edition (#9219)
* Make non-repudiation integration exclusive to enterprise edition

Closes #9182

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/9219#discussion_r599578614

* Address https://github.com/digital-asset/daml/pull/9219#pullrequestreview-618605511

* Add aliases for CE test targets, thanks to @S11001001 for the feedback

* Uh, turns out you need a main...

* Address https://github.com/digital-asset/daml/pull/9219#discussion_r599717526

* Add missing dependency for Oracle
2021-03-24 20:25:47 +01:00
Moritz Kiefer
615f4e4bae
Support passing sandbox port via --sandbox-option --port (#9208)
--sandbox-port has caused confusion several times and cannot be
specified in daml.yaml which is a bit annoying. There isn’t really any
good reason not to support --sandbox-option --port since we can pick
up the port via the port file either way.

This change is fully backwards compatible.

changelog_begin

- [Daml Assistant] The sandbox port can now also be configured via
  `--sandbox-option=--port=12345` instead of `--sandbox-port`. Other
  tools like Navigator, the JSON API and Daml Script will pick up the
  modified port automatically.

changelog_end
2021-03-23 13:31:07 +01:00
Robin Krom
f89aa294e5
damlc pkg: use cache for already present packages (#9193)
* damlc pkg: use cache for already present packages

This only downloads packages from a remote ledger, if the package is not
already present in the dependency db as a normal dependency.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-22 13:57:38 +01:00
Robin Krom
8c64f120da
pkgid data deps (#9153)
* damlc: Allow package IDs in data-dependencies.

This is the next step outlined in issue #8976. If package id's are
present in the `data-dependency` section of the daml.yaml file, we try
to fetch them (and their transitive dependencies) from the default
ledger of the project.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-18 12:17:38 +01:00
Moritz Kiefer
98c2651998
Support fetching SDK EE tarball in the assistant (#9146)
* Support fetching SDK EE tarball in the assistant

This PR adds an `artifactory-api-key` field to `daml-config.yaml`. If
this is set, we will download the SDK EE tarball if it exists, falling
back to GH releases on 404s (for old releases).

changelog_begin

- [Daml Assistant] The assistant now supports an `artifactory-api-key`
  field in `daml-config.yaml`. If you have a license for Daml Connect
  EE you can specify this and the assistant will automatically fetch
  the EE edition which provides additional functionality.

changelog_end

* Hardcode first EE snapshot

changelog_begin
changelog_end
2021-03-16 14:17:50 +01:00
Moritz Kiefer
5cb857d902
Release EE SDK tarballs and installer (#9086)
* Release EE SDK tarballs and installer

As before, no way of testing this. I’ll do a snapshot afterwards.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Rename EE artifacts

changelog_begin
changelog_end
2021-03-11 14:49:48 +01:00
Moritz Kiefer
e04bd91eda
Move Daml Profiler to EE version of sandbox/sandbox-classic (#9054)
* Move Daml Profiler to EE version of sandbox/sandbox-classic

This splits Sandbox targets into EE/CE targets and exposes the option
in the EE version. The option still exists in the CE option for now
until we have released EE artifacts to not break users that might know
about it without an alternative.

There is also a small test that makes sure that this actually works
since classpaths are dumb and it didn’t work at first.

changelog_begin
changelog_end

* Fix publish target

changelog_begin
changelog_end

* Publish transitive dep

changelog_begin
changelog_end

* I hate bash

changelog_begin
changelog_end
2021-03-09 19:35:14 +01:00
Moritz Kiefer
5197374cab
Build SDK EE tarball (#9049)
* Build SDK EE tarball

This sets up the infrastructure to build an SDK EE tarball and allows
for swapping out all files included in the tarball depending on the
edition. As an example, this includes the JSON API with (partial)
Oracle support in the EE tarball.

This PR does not yet address publishing this artifact to Artifactory.
I’ll tackle that in a separate PR.

changelog_begin
changelog_end

* Build in temp dir because Windows is stupid

changelog_begin
changelog_end

* directories are bad

changelog_begin
changelog_end

* Navigator resources are actually needed

changelog_begin
changelog_end
2021-03-08 17:48:00 +01:00
Robin Krom
55b52f1249
daml start: less scary colors for rebuild message (#8929)
We change the color from red to yellow to inform about the possibility
to rebuild and also output the success message in green.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-24 11:32:59 +01:00
Moritz Kiefer
777749539c
Draw the rest of the Scala 2.13 owl (#8852)
* Draw the rest of the Scala 2.13 owl

Not quite but pretty close and this switches us over from inclusions
to exclusions which makes it much easier to track.

Ledger API test tool should be fixed by #8821. Non-repudiation needs a
tiny bit of work since unwrapArray doesn’t work the same on 2.13 but
shouldn’t be hard to fix.

changelog_begin
changelog_end

* Fix ScriptService tests

Those tests were all dumb. They asserted on a fixed order while the
function to sort the things was broken so we ended up with the random
Map order which is unsurprisingly not the same.

This is easily fixed by fixing the sort function.

There is also a second issue with query not sorting.

changelog_begin
changelog_end

* Turns out if you fix one test the next one breaks

And clearly nobody ever tested this or give this a second thought.

changelog_begin
changelog_end
2021-02-15 19:20:24 +00:00
Moritz Kiefer
773ddada04
Upgrade nixpkgs (#8190)
* Upgrade nixpkgs

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* No ibazel

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Switch agent pool

changelog_begin
changelog_end

* .

* .

changelog_begin
changelog_end
2021-02-08 11:12:07 +00:00
Andreas Herrmann
a226324afa
Use cliopts.Http for OAuth 2.0 middleware (#8671)
* Use cliopts.Http for OAuth 2.0 middleware

changelog_begin
- [OAuth 2.0 Middleware] You can now configure the address that the
  middleware listens to using the ``--address`` flag.
  The port that the middleware listens to is now configured using the
  ``--http-port`` flag, use 0 to dynamically choose a free port.
  You can now configure a port file where the chosen port will be
  written to using the ``--port-file`` flag.
changelog_end

* Add test-case for OAuth 2.0 middleware port file

* Don't forget to close source

* Fix integration test

* Update triggers/service/auth/src/main/scala/com/daml/auth/middleware/oauth2/Config.scala

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

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-01-29 09:32:07 +00:00
Moritz Kiefer
e0c5abd647
Switch to GHC 8.10.3 (#8394)
* Switch to GHC 8.10.3

changelog_begin
changelog_end

* Update bazel-haskell-deps.bzl

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

* Comment on rules_haskell patch

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2021-01-25 11:53:53 +00:00
Andreas Herrmann
5706f5e15d
Drop early access tag on trigger service and auth middleware (#8611)
* add livez endpoint to auth middleware

* Add OAuth 2.0 middleware to Daml SDK

* unhide trigger service auth flags

changelog_begin
- [Triggers] The trigger service now supports authorization through an
  auth middleware. The feature is enabled using the `--auth` and
  `--auth-callback` command-line flags. Please refer to the
  Authorization chapter of the trigger service documentation for further
  instructions.
- [OAuth 2.0 middleware] Daml Connect now includes an implementation of
  the auth middleware API that supports OAuth 2.0 Authorization Code
  Grant. Please refer to the Auth Middleware and OAuth 2.0 Auth
  Middleware chapters of the documentation.
changelog_end

* drop early access flag on triggers

Daml triggers, the trigger service, and the auth middleware are no
longer marked as early access features.

changelog_begin
- [Triggers] Daml Triggers and the Trigger Service are no longer in
  early access status.
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-01-22 17:02:24 +01:00
Robin Krom
1cac3aa073
fix: check for CI env variable before prompting (#8605)
To avoid prompting the user to set the PATH variable on CI, we check the
`CI` environment variable and do nothing if set.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-22 16:44:40 +01:00
Robin Krom
03e3d1b20c
fix: assistant: parsing of parties field failed. (#8593)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-21 17:56:31 +01:00
Robin Krom
c5852e8cd4
fix: project parties are not required (#8524)
* fix: project parties are not required

This fixes a bug in daml assistant. `daml deploy` would fail if there
were no project parties listed in the daml.yaml project config file. Now
project parties are not required anymore.

Fixes #8487.

CHANGELOG_BEGIN
CHANGELOG_END

* added an integration test
2021-01-18 10:47:07 +01:00
Robin Krom
55b4a3d433
assistant: move cache to new cache folder. (#8522)
We use the new cache folder specified with `DAML_CACHE` defaulting to
`.cache/daml` as a new cache folder for the assistant to store available
versions etc.

This does not migrate an existing cache folder and just starts a new
one.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-15 17:24:30 +01:00
Robin Krom
32ca8fb831
telemetry: use an extra cache directory for telemetry (#8439)
* telemetry: use an extra cache directory for telemetry

If the sdk's `.daml` directory is not writable, telemetry fails and
kills the IDE. We add a new assistant environment variable "DAML_CACHE".
If set, this directory is used for telemetry cache data.

Fixes #8396.

CHANGELOG_BEGIN
CHANGELOG_END

* try creating directory

* check for already existing machine id file

* set DAML_CACHE to read-only in assistant integration tests
2021-01-15 11:44:18 +01:00
Moritz Kiefer
22ce940954
Upgrade scalafmt and enable trailing commas (#8437)
This PR updates scalafmt and enables trailingCommas =
multiple. Unfortunately, scalafmt broke the version field which means
we cannot fully preserve the rest of the config. I’ve made some
attempts to stay reasonably close to the original config but couldn’t
find an exact equivalent in a lot of cases. I don’t feel strongly
about any of the settings so happy to change them to something else.

As announced, this will be merged on Saturday to avoid too many conflicts.

changelog_begin
changelog_end
2021-01-09 11:37:37 +01:00
Moritz Kiefer
3a8f5e8aaa
Port //language-support/scala to Scala 2.13 (#8442)
The one thing that is still missing is making the generated Scala code
from the codegen compatible with Scala 2.13 so the examples are
excluded for now.

changelog_begin
changelog_end
2021-01-08 20:28:15 +01:00
Robin Krom
859d8f44d9
fix: navigator regression: create empty config file. (#8440)
* fix: navigator regression: create empty config file.

For backwards compatibility, `daml ledger navigator` needs to create an
empty `ui-backend.conf` file when invoced outside a project directory.
Otherwise, navigator will fail to start.

CHANGELOG_BEGIN
CHANGELOG_END

* integration test
2021-01-08 17:56:37 +01:00
Bernhard Elsner
cda93db944
Daml case and logo (#8433)
* Replace many occurrences of DAML with Daml

* Update docs logo

* A few more CLI occurrences

CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END

* Fix some over-eager replacements

* A few mor occurrences in md files

* Address comments in *.proto files

* Change case in comments and strings in .ts files

* Revert changes to frozen proto files

* Also revert LF 1.11

* Update get-daml.sh

* Update windows installer

* Include .py files

* Include comments in .daml files

* More instances in the assistant CLI

* some more help texts
2021-01-08 12:50:15 +00:00
Moritz Kiefer
94fed84647
Support DAML_PROJECT in daml codegen java (#8416)
* Support DAML_PROJECT in daml codegen java

fixes #8406

We need to resolve the DAR path relative to the project
root. Otherwise, we’ll just fail to find the file if daml codegen java
is invoked from a different directory.

changelog_begin
changelog_end

* Fix test

changelog_begin
changelog_end

* fmt lalala

changelog_begin
changelog_end

* fix another test

changelog_begin
changelog_end
2021-01-06 16:38:47 +01:00
Robin Krom
f2b53d49e6
assistant: get the latest sdk version form docs.daml.com (#8393)
* assistant: get the latest sdk version form docs.daml.com

We get the latest sdk version from docs.daml.com/latest instead of
github.com. Getting the latest release from github proved to be tricky
because github defines 'latest' by the tag timestamp.

CHANGELOG_BEGIN
CHANGELOG_END

* hlint
2021-01-05 14:31:41 +01:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
Robin Krom
de9771810d
navigator: ignore project parties flag (#8348)
* navigator: ignore project parties flag

This adds a flag '--ignoreProjectParties' to navigator such that
parties specified in the daml.yaml file are ignored and the
`PartyManagementService` is queried for parties instead.

This is part of #6099.

CHANGELOG_BEGIN
CHANGELOG_END

* add flag to

* add flag to daml ledger navigator

* Update navigator/backend/src/main/scala/com/digitalasset/navigator/config/Arguments.scala

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>

* remove config file from daml ledger navigator command

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2020-12-21 16:57:29 +01:00
Robin Krom
ca83649468
hotreload: archive active contracts (#8192)
* hotreload: archive active contracts

Fixes #8162. This archives all active contracts on the ledger when a
hotreload is performed. A hidden command `reset` is added to `daml
ledger` to perform the reset against a running sandbox.

CHANGELOG_BEGIN
CHANGELOG_END

* don't reset when no parties are allocated

* hlint

* reuse tokenFor

* remove unused imports

* add applicationId to token

* remove readAs field from command

* use uuid as cmdId

* remove token from reset command

* batch cmds in size of 100

* remove comment about todo, remove readAs from token
2020-12-18 17:00:09 +01:00
Sofia Faro
b70770ebe7
Disable daml assistant's update-check by default. (#8341)
Also disables auto-install on Windows, since installation-related
errors range from "simple error message" to "program hangs forever",
and users can bypass "daml install" by downloading the new installer.

changelog_begin

- [DAML Assistant] The update-check is disabled by default for
  newer installations. In addition, auto-install is disabled by
  default on Windows. See here for instructions on how to
  configure these settings manually: https://docs.daml.com/tools/assistant.html#global-config-file-daml-config-yaml

changelog_end
2020-12-18 13:10:29 +00:00
Robin Krom
fa9b470249
install script: check available disk space (#8317)
* install script: check available disk space

This fixes #6993. We check that /tmp offers enough space to extract the
sdk tarball and fail otherwise. An alternative extraction directory can
be set by setting the TEMPDIR environment variable.

CHANGELOG_BEGIN
CHANGELOG_END

* don't remove user specified directory

CHANGELOG_BEGIN
CHANGELOG_END

* Update daml-assistant/get-daml.sh

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2020-12-16 18:15:01 +01:00
Moritz Kiefer
0d27c33da3
Disable create-daml-app-tests with default project name (#8277)
These are basically identical to create-daml-app-tests-proj-name
except for the fact that they use the default project name and they
are super slow so we don’t want to run them twice.

changelog_begin
changelog_end
2020-12-14 14:25:17 +01:00
Moritz Kiefer
7e05dc7932
Upgrade rules-scala and scalatest (#8187)
This is necessary to at least attempt an upgrade to 2.13 and
generally, I want to keep our rulesets up2date. rules-scala forces the
version of scalatest so we have to bump that at the same time.

This requires changes to basically all Scala test suites since the
import structure has changed and a bunch of things (primarily
scalacheck support) got split out.

Apologies for the giant PR, I don’t see a way to keep it smaller.

changelog_begin
changelog_end
2020-12-08 06:59:23 +01:00
Sofia Faro
c3d99c1695
Dont look for daml.yaml during SDK install. (#8167)
* Dont look for daml.yaml in SDK install.

Unless you're running "daml install project".

Fixes #5720

changelog_begin
changelog_end

* use pattern synonym for raw install target
2020-12-04 13:07:30 +00:00
Samir Talwar
9976b4cd50
Bazel: Factor out logic around Protobuf JARs. [KVL-714] (#8084)
* kvutils: Use ScalaPB to generate a Scala JAR for daml_kvutils.proto.

* Bazel: Delete the unused `da_java_binary` rule, and inline `_wrap_rule`.

* Bazel: Factor out Java/Scala protobuf class generation into a helper.

CHANGELOG_BEGIN
CHANGELOG_END

* daml-lf/archive: Use `proto_jars`.

* Bazel: Remove the visibility modifier from `proto_jars`.

It's too confusing. Just make everything public.

* daml-lf/archive: Push protobuf source tarballs into `proto_jars`.

* Bazel: Add comments to the various parts of `proto_jars`.

* daml-assistant: Do unpleasant things with `location` in Bazel.
2020-11-27 08:34:53 +00:00
Moritz Kiefer
037ff64e96
Bump timeout in integration tests (#8059)
changelog_begin
changelog_end
2020-11-25 10:47:01 +00:00
Robin Krom
dabd55d0b0
assistant integratin tests: speed and cleanup. (#8032)
CHANGELOG_BEGIN
CHANGELOG_END
2020-11-24 19:05:02 +01:00
Robin Krom
936a0862fb
daml codegen: Add deprecation warning for scala. (#8033)
This fixes #8022. This adds a deprecation warning for the scala codegen.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-23 13:27:49 +01:00
Robin Krom
5bfff4e9ba
sandbox: fail on already existing port-file. (#7929)
Fixes #7806. This aligns the port file behaviour of the sandbox with the
HTTP JSON API.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-17 11:08:37 +01:00
Robin Krom
dae3c5caef
daml ledger: add a max-inbound-message-size flag for grpc (#7954)
* daml ledger: add a max-inbound-message-size flag for grpc

This new flag allows to set the maximal accepted inbound message size
when using gRPC to interact with a legger.

CHANGELOG_BEGIN
CHANGELOG_END

* added a test
2020-11-13 00:16:06 +00:00
Moritz Kiefer
07d5a19d50
Cleanup trigger service endpoints (#7950)
* Cleanup trigger service endpoints

fixes #6333

changelog_begin

- [Trigger Service]

  Endpoints have been rearranged to be more consistent:

  | New endpoint              | Old endpoint       | Functionality                |
  |---------------------------|--------------------|------------------------------|
  | GET `/v1/triggers`        | `/v1/list`         | List triggers                |
  | POST `/v1/triggers`       | `/v1/start`        | Start trigger                |
  | GET `/v1/triggers/:id`    | `/v1/status/:id`   | Trigger status               |
  | DELETE `/v1/triggers/:id` | `/v1/triggers/:id` | Stop/delete trigger          |
  | POST `/v1/packages`       | `/v1/upload_dar`   | Upload DAR                   |
  | GET `/livez`              | `/v1/health`       | liveness check               |

changelog_end

* Fix integration tests

changelog_begin
changelog_end
2020-11-12 11:23:28 +01:00
Robin Krom
a491002483
daml ledger: implementation of ledger commands via json api (#7885)
* daml ledger: implementation of ledger commands

Implementation of the remaining daml ledger commands via HTTP JSON
service endpoints instead of gRPC.

Fixes #4824 .

CHANGELOG_BEGIN
[daml assistant] `daml ledger` commands can now also be run against the JSON API instead of the gRPC API.
CHANGELOG_END
2020-11-09 16:24:45 +01:00
Robin Krom
e865ea7d5b
assistant: prompt users to automatically update PATH (#7910)
* assistant: prompt users to automatically update PATH

We ask the Max/Linux users on installation if we should update their
PATH environment variable to point to the assistant binary and
automatically do so when the answer is affirmative.

CHANGELOG_BEGIN
CHANGELOG_END

* set .profile insetad .bashrc

* add a case for sh

* fix tests

CHANGELOG_BEGIN
CHANGELOG_END

* use imports only on nix systems

* update windows updatePath function for YesNoAuto flag.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-06 17:07:40 +01:00
Robin Krom
ab3cce3e55
assistant tests: Testing hot-reload (#7871)
* assistant tests: Testing hot-reload

This adds a test to the assistant integration tests for testing the
hot-reload feature.

CHANGELOG_BEGIN
CHANGELOG_END

* hlint
2020-11-04 15:57:12 +01:00
Robin Krom
25edd9fd10
daml start: rerun the initialization script on rebuild (#7841)
We rerun the initialization script for every rebuild. In addition we fix
a potential bug that would lead to a wrong sandbox port when trying to
re-upload the package.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-02 10:41:05 +01:00
Robin Krom
2e22b5f5f2
daml ledger: Infrastructure for tests (#7794)
* daml ledger: Infrastructure for tests

This adds infrastructure for testing `daml ledger` and moves one test
from the assistant integration tests to the newly created tests.

CHANGELOG_BEGIN
CHANGELOG_END

* Update libs-haskell/test-utils/DA/Test/HttpJson.hs

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update libs-haskell/test-utils/DA/Test/HttpJson.hs

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>

* small fixes

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-10-30 21:35:29 +01:00
Moritz Kiefer
4cc34c6be9
Fix error handling in ledger-upload-dar (#7842)
Currently we catch the exception and then print out "DAR upload
succeeded.". That’s clearly not what is intended here.

changelog_begin

- [DAML Assistant] `daml ledger upload-dar` now exits with a non-zero
  exit code on failures and no longer prints "DAR upload succeeded"
  in error cases.

changelog_end
2020-10-29 17:10:37 +00:00
Robin Krom
5bc70df1f2
fix: don't build before uploading a dar (#7838)
This makes sure the dar doesn't get build two times on reload.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-29 17:47:06 +01:00
Martin Huschenbett
2adf2c428e
Refactoring: Use map in download helper for fetch-dar (#7784)
The `downloadAllReachablePackages` function, which is part of the
implementation of `featch-dar`, uses an associative list when a `Map`
seems more appropriate. More appropriate in both runtime complexity as
well as code complexity. This has caught my eye while reviewing some
code nearby and I thought I have a minute to spare to improve it.

This PR replaces the associative list with a `Map`.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-23 15:07:30 +02:00
Robin Krom
cf85751c3c
daml assistant: cleanup of daml ledger commands (#7777)
* daml assistant: cleanup of daml ledger commands

This is a cleanup of the Helper/Ledger.hs module in preparation for
further implementations of `daml ledger` commands against the JSON API.
In particular the module Compiler/Fetch.hs is removed from daml-compiler
and its contents moved over the Helper/Ledger.hs. Some renaming and
reorganization is done for clarity.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-22 17:07:43 +02:00
Robin Krom
2be6b4a265
language: daml ledger commands against JSON API (#7700)
* language: `daml ledger` commands against JSON API

This is the first step in offering the JSON API to run `daml ledger`
commands. First, only the `list-parties` command is implemented. The
other `daml ledger` commands will follow in separate PR's.

CHANGELOG_BEGIN
[Assistant] The `daml ledger list-parties` command can now query the
ledger via the HTTP JSON API instead the gRPC API for known parties on
the ledger.
CHANGELOG_END
2020-10-21 16:32:26 +02:00
Moritz Kiefer
e09c31899d
Connectify user-facing output (#7624)
Together with #7615, this overs all items in #7612.

changelog_begin
changelog_end
2020-10-09 15:45:02 +02:00
Robin Krom
51e53ce006
language: Rebuild/redeploy on key press (#7562)
This makes the `daml start` process listen for a key-press. When 'r' is
pressed, the package is re-build, the new package uploaded to the
in-memory sandbox and the codegen re-run.

Note: While we clean previous outputs of the code generation, there is
currently no way to drop previously uploaded packages from the in-memory
sandbox. However, it will take many re-uploads until this will become a
problem.

CHANGELOG_BEGIN
[daml start] You can now press 'r' (or 'r' + 'Enter' on Windows) in the
  terminal where `daml start` is running to rebuild the DAR package and
  generate JavaScript/Java/Scala bindings and upload the new package to
  the sandbox. This frees the user from killing and restarting `daml
  start`.
CHANGELOG_END
2020-10-08 17:10:25 +02:00
Moritz Kiefer
d2da2a7b88
Undamlify assistant output (#7611)
In preparation for the renaming, we are stripping the DAML prefix. It
is still called SDK and the sdk-version variable keeps existing.

changelog_begin
changelog_end
2020-10-08 16:57:43 +02:00
Robin Krom
b639d43ffa
language: fix: broken npm scope name from project config (#7579)
This fixes the parsing of the npm-scope field of the project config,
where a space is accidentally introduced.

CHANGELOG_BEGIN
[Codegen] Fix for an accidentally introduced space in the npm scope of
genreated JavaSript libraries when it was parsed from the daml.yaml
project config.
CHANGELOG_END
2020-10-06 16:46:06 +02:00
Robin Krom
6a328212f2
language: automatic ts codegen for daml start (#7516)
This executes the code generations specified in the daml.yaml
configuration file on every invocation of `daml start`
and hence frees the user of doing it manually.

CHANGELOG_BEGIN
- [DAML Assistant] The `daml start` now runs all the code generators
specified in the `daml.yaml` project configuration file under the
`codegen` stanza. This frees the user of doing so manually on every
change to the DAML model.
CHANGELOG_END
2020-10-02 15:43:06 +02:00
nickchapman-da
7c038119aa
Improve the user error message if the upload-dar command fails. (#7510)
* Improve the user error message if the upload-dar command fails.

In particular we want to catch the case of a gRPC timeout exception which we know can occur if the DAR is too large. But it seems helpful to catch any exception, and shows what we caught along with the helpful message.

* use safe-exceptions
2020-09-29 14:24:53 +00:00
Sofia Faro
e9cd92f061
Deprecate the "daml 1.2" version header. (#7513)
* changelog_begin

- [DAML] The "daml 1.2" version header is now deprecated.

changelog_end

* fix some line numbers

* fix some more locations
2020-09-29 13:14:59 +00:00
Martin Huschenbett
afdfec53dd
Deprecate specifying the template in daml new positional (#7490)
We deprecate specifying the template when calling `daml new` via a
positional argument, as in
```sh
daml new foo skeleton
```
The new syntax is
```sh
daml new foo --template skeleton
```
Whenever the former version is used, we now print a not that it is
deprecated and that the latter version is the recommended way.

CHANGELOG_BEGIN
[DAML Assistant]
- Deprecate specifying the template for `daml new` via a positional
  argument.
CHANGELOG_END
2020-09-25 12:39:49 +00:00