Commit Graph

14 Commits

Author SHA1 Message Date
Gerolf Seitz
a2d785e3ee
Use com.daml as root package (#5343)
Packages com.digitalasset.daml and com.daml have been unified under com.daml

Ledger API and DAML-LF DEV protos have also been moved from `com/digitalasset`
to `com/daml` on the file system.
Protos for already released DAML LF versions (1.6, 1.7, 1.8) stay in the
package `com.digitalasset`.

CHANGELOG_BEGIN
[SDK] All Java and Scala packages starting with
``com.digitalasset.daml`` and ``com.digitalasset`` are now consolidated
under ``com.daml``. Simply changing imports should be enough to
migrate your code.
CHANGELOG_END
2020-04-05 19:49:57 +02:00
Moritz Kiefer
3ed21c26c7
Validate token parties on submit and query in DAML script (#5297)
This adds a validation step when running DAML script over the JSON API
to ensure that the party in the token matches the party that is passed
as an argument to `submit/query`.

changelog_begin
changelog_end
2020-03-31 14:16:16 +02:00
Moritz Kiefer
0c5166dd8c
Support running DAML script over the JSON API (#5211)
* Support running DAML script over the JSON API

This is still in a somewhat messy state and some things don’t
work (documented in a comment) so I deliberately didn’t add this to
the documentation. However, there are tests and the PR is already
pretty large so I’d like to move the rest to separate PRs to not turn
this into more of a review nightmare than it already is.

changelog_begin
changelog_end

* Address review comments
2020-03-27 11:04:40 +00: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
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
Samir Talwar
a99156252d
libs-scala/ports: Wrap socket ports in a type, Port. (#4784)
* libs-scala/ports: Wrap socket ports in a type, `Port`.

* sandbox: Use `Port` for the API server port, and propagate.

CHANGELOG_BEGIN
CHANGELOG_END

* extractor: Use `Port` for the server port.

* ports: Make Port a compile-time class only.

* ports: Allow port 0; it can be specified by a user.

* ports: Publish to Maven Central.
2020-03-03 08:59:15 +00:00
Moritz Kiefer
2fb53497d4
Support authentication in DAML script (#4637)
changelog_begin

- [DAML Script - Experimental] Support running DAML scripts against an
authenticated ledger. The token is passed via ``--access-token-file``.

changelog_end
2020-02-20 17:52:57 +00:00
Samir Talwar
e203fdea90
resources: Pull out the shutdown hook logic into ProgramResource. (#4356)
It's not trivial, so it's almost certainly less error-prone to just
define it once.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-04 09:32:35 +00:00
Andreas Herrmann
6e25d10fe2
daml test-script (#3918)
* Start on daml test-scripts

* Run all `Script a` as test cases

* LedgerClient: Expose PackageManagementClient

To enable DAR uploads

* Upload the DAR to the ledger

* Start sandbox if no ledger specified

* Format daml test-script

* Fix deprecation warning on ActorMaterializer

* Add test-case //daml-script/tests:test_daml_script_test_runner

* Add daml test-script command

CHANGELOG_BEGIN

- [DAML Script - Experimental] Allow running DAML scripts as test-cases.
  Executing ``daml test-script --dar mydar.dar`` will execute all
  definitions matching the type ``Script a`` as test-cases.
  See `#3687 <https://github.com/digital-asset/daml/issues/3687>`__.

CHANGELOG_END

* daml-test-script enable logging

* Remove outdated TODO comment

* daml script-test More elaborate test-caseo

Compare to expected output and add failing test-case

* daml test-script Don't abort on test-failure

Before the test runner would abort on the first failed test-case. This
occasionally introduce additional test-failures if the sandbox was
torn down half-way through execution.

* ./fmt.sh

Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
2020-01-03 15:01:36 +01:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
Gary Verhaegen
2b3693bf4d
restore 0.13.38 logging defaults for daml jars (#3819)
CHANGELOG_BEGIN
- [Sandbox] Restore 0.13.38 logging behaviour.
- [Navigator] Restore 0.13.38 logging behaviour.
- [Extractor] Restore 0.13.38 logging behaviour.
- [Internals] As of 0.13.39, we merged a number of internal JAR files in
  the SDK tarball to reduce its size. These jars used to be standalone
  JARs you could invoke as e.g. ``java -jar sandbox.jar <args>``. As a
  result of merging the jars, they lost their individual ``logback.xml``
  configuration file. Although running the jars directly was (and is
  still) not supported, note that you can now achieve the same behaviour
  with e.g. ``java -Dlogback.configurationFile=sandbox-logback.xml -jar
  daml-sdk.jar sandbox <args>``.
CHANGELOG_END
2019-12-12 14:02:23 +01:00
Moritz Kiefer
6a09ea7755
Support starting a DAML script from a JSON input value (#3490)
This uses the format for LF values that we already use elsewhere.

There is one annoying part in this PR where I had to duplicate the
logic for converting to the types used in the interface reader since
it is not exposed but hopefully we can get rid of this soon in a
separate PR.

fixes #3470
2019-11-18 14:42:14 +01:00
Moritz Kiefer
d1ce57398a
Cleanup conversions in DAML script and fix value translation (#3467)
This cleans up the remaining conversions in DAML script and fixes the
bug fixed in #3458 for DAML triggers by switching to the
ValueTranslator.
2019-11-14 15:30:46 +01:00
Moritz Kiefer
b3ae6560d7
Add an initial version of DAML script (#3428)
The code still needs a fair amount of cleanup but it seems to work and
there is a test so I’d like to do the cleanup in-tree after merging
the current state
2019-11-12 18:02:14 +01:00