Commit Graph

142 Commits

Author SHA1 Message Date
Francesco Mazzoli
10fcab8040
move ContractTransactionChecks to ledger-api-integration-tests (#339) 2019-04-11 10:22:34 +02:00
Shayne Fletcher
c90169cddf
A tiny contract key test (#367)
* test comment

* ignore if the DAML-LF version is 1.2
2019-04-10 16:21:15 -04:00
Remy
07858455c1
Fix DAML runtime for the new DAML-LF type Map (#204)
* add a test for daml-lf/interface
* fix scala code gen
* fix extractor
* fix navigator backend/frontend
* key of Map are strings in proto/json
2019-04-10 21:30:33 +02:00
Anup Kalburgi
aee5af8f0c Removing python check (#361) 2019-04-10 19:37:34 +01:00
Jonas Chevalier
851881e455
pull-request template: fix relative links (#351)
the relative link was being resolved to
https://github.com/digital-asset/daml/pull/CONTRIBUTING.md on the new
pull request. Point to the absolute URLs instead.
2019-04-10 17:58:25 +02:00
david-md-da
e165f1df00
Tag errors as errors rather than debug messages (#360) 2019-04-10 17:49:43 +02:00
david-md-da
159b0bca4d
Added tracking of telemetry opt-out (#357) 2019-04-10 17:45:17 +02:00
Gabor Aranyossy
094b4b6959
Sandbox Sql fixture (#247)
* SandboxSQL fixture + fixing various issues

WIP - playing around with Resources to support Sandbox Fixture with Postgres

Sandbox with Postgres fixture works - LedgerIdentityServiceGivenIT PASSES

adding guards for empty collections in PostgresLedgerDao

CommandCompletionServiceITi passed for both fixtures

fixing EventID formatting problem

another formatting fix

changed wrong autoCommit behaviour

CommandStaticTimeIT passed on both ledgers

rolling back transaction on duplicates

dealing with duplicate commands in postgres

fixing mismapped record_time

adding extra logging for fatal errors

disabling sql support as it's not finished yet

cleanup

removed unnecessary test classes

cleanup

formatting

* ADT was missing Product with Serializable

* fixed the compilation error
2019-04-10 17:04:47 +02:00
Beth Aitman
233b814469
Move protobuf docs into rst format (#334)
* Attempt to move template to rst

* Removing pandoc from export

* Get rst tables working

* Move proto comments into rst format

* More tidying up proto docs to work in rst

* Remove unnecessary whitespace

* Add back some necessary whitespace

* Correcting rst whitespace, again

* Remove processing script

* Clean up proto files

* Remove broken link from pdf toc

* Reinstate post-process script

* Try to fix process script

* Fix permissions issue
2019-04-10 16:42:35 +02:00
Leonid Shlyapnikov
a8e32f6735
Add Universal Archive Reader to parse DARs and DALFs, #109 (#359)
Clean up DAR Reader errors.
2019-04-10 10:35:59 -04:00
Stephen Compall
3974ebe4b1
clean up the static types of LF transaction nodes in Engine (#206)
* introduce WithTxValue aliases for common GenNode type applications

* use WithTxValue aliases in more places

* more WithTxValue factoring
2019-04-10 20:42:16 +07:00
Gaël Deest
f564fc3e90
Building c2hs (#355)
* Getting c2hs to build

* Build c2hs on CI

* Update 3rdparty/haskell/BUILD.c2hs

Co-Authored-By: gdeest-da <42969625+gdeest-da@users.noreply.github.com>

* Highlight changes in c2hs-package.bzl
2019-04-10 15:12:08 +02:00
Robert Autenrieth
aa1f6f65fc
Update Navigator customizable table views docs (#342)
A new config schema version was introduced recently.
This updates the example snippet in the docs to the new version.
2019-04-10 15:05:48 +02:00
Francesco Mazzoli
287f46a095
make transaction coder stack safe again (#350) 2019-04-10 14:54:10 +02:00
Andreas Herrmann
c55273f622
Build grpc fat_cc_library on Windows (#352)
* fat_cc_library Windows support

* Add fat_cc_library to Windows CI

* Add dynamic library to error message

Addressing review comment https://github.com/digital-asset/daml/pull/352#discussion_r273905183
2019-04-10 14:42:27 +02:00
Jonas Chevalier
7c08c86d63
fmt.sh: format and lint checks (#349)
* load dev-env in ./build.sh

one less thing for the user to do

* fmt.sh: extract platform-agnostic checks
2019-04-10 14:22:35 +02:00
Gerolf Seitz
403919f3c7
Improve SDK installations instructions a bit (#354)
I'm moving the sentence to follow the instructions of the installer
output to a separate bullet, so that it is a bit harder to miss this
quite important point.
2019-04-10 13:56:52 +02:00
Jost Berthold
1d50cd6ca6
HOTFIX damlc: allow for passing options to the underlying GHC (#346)
* HOTFIX damlc: allow for passing options to the underlying GHC

As `damlc` is based on GHC, it "understands" all options that GHC understands.
This PR introduces a way to use GHC options that are not exposed by the `damlc`
driver, by passing any number of `--ghc-option CUSTOM_OPTION` on the command line.

The code uses the GHC function which parses options inside files, so
prohibiting a few options that we would not want to expose (package db, output
file, etc).

All warnings that GHC emits during flag processing are presented to the user.

If an option contradicts a DAML compiler setting, the compilation will be
aborted with a GHC exception (calls makeDynFlagsConsistent internally).

* HOTFIX damlc: small clean-up
2019-04-10 21:48:08 +10:00
Fran
292d2b40b4
Moving to new version logic in daml-assistant. (#337)
* Use global SDK version for release tarballs.

* Use semver for sdk versions.

* Update daml-assistant/BUILD.bazel

* Code comments pt 1

* Switch to lens

* Update daml-assistant/BUILD.bazel
2019-04-10 12:06:38 +02:00
Stefano Baghino
e775b4974e
Amend the Node.js bindings Ledger API values representation (#338)
Finishes the work started in #324:

- drops deprecated `name` in identifiers, adopting `moduleName` and `entityName`
- use string to represent `timestamp`s to avoid a loss of precision
- use string for `date`s too for consistency and future-proofness

The work unconvered a quite serious bug caused by the lack of coverage
on the validation of timestamps: the model was expecting timestamps to
be of type timestamp, whereas in Ledger API values they are represented
by numbers.
2019-04-10 10:47:29 +02:00
Beth Aitman
7c154227ce
Add missing link to rst primer (#328) 2019-04-10 10:27:37 +02:00
Robert Autenrieth
0224e321e4
Navigator: remove test dependency on git revision (#345)
Makes sure tests are not rerun on each commit.

Fixes #243
2019-04-10 10:20:23 +02:00
Shayne Fletcher
ed8ed6e91a
new ghc-lib : contract key syntax (#343) 2019-04-09 17:24:11 -04:00
Martin Huschenbett
1db23f9568 Fix projection on sum-of-product types (#340)
Fixes #310.
2019-04-09 20:25:33 +01:00
Martin Huschenbett
6a1659047f
Inline all aliasing let bindings generated during conversion to DAML-LF (#336)
* Inline all aliasing let bindings generated during conversion to DAML-LF

Inlining the aliases generated for record wildcards is a prerequisite for
the maintainer clauses of our contract keys syntax to work.

Inlining all other aliases doesn't seem to be a bad idea as well.

* Address Neil's comments
2019-04-09 19:46:25 +02:00
Gary Verhaegen
e2aecc2877
build with full history (#333) 2019-04-09 18:19:07 +01:00
Gary Verhaegen
5384ac887b remove Jenkins build file (#335) 2019-04-09 19:00:59 +02:00
zimbatm
430a85649c add more Azure Pipeline agents (#230)
* nix: add the more providers to terraform
* docs: make tarballs more reproducible
* ci: use the linux-pool pool
* ci: tweak the nix installation

handle the case where the user is root and on ubuntu

* infra: terraform fmt

* infra: add Azure Pipeline agents

* ci: only enable linux-pool for internal PRs
2019-04-09 18:59:37 +02:00
Leonid Shlyapnikov
737fc06bfe
Implement Functor for Dar, #109 (#305) 2019-04-09 12:52:30 -04:00
Jussi Mäki
1a4e6b8a7e
Add support for scala source jars (#332)
This adds an implicit "<target>_src" to every
scala library target. It assumes the sources of the
library are under 'src/main/scala'.
2019-04-09 17:41:42 +02:00
Florian Klink
e9b128ea68 windows dev-env: remove wget (#331)
This also removes the manifest-change tests, as the test was testing a
wget update.
2019-04-09 16:24:51 +01:00
Martin Huschenbett
b373e0d1c0
Clean up alias inlining logic during conversion to DAML-LF (#330)
Currently, the logic for when to inline let bindings is duplicated in two
places. This PR centralizes it in one place. It is also a preparation for
doing more of this inlining, which is a prerequisite for our intended
surface syntax for contract key maintainers to work properly.
2019-04-09 16:58:08 +02:00
Martin Huschenbett
497716fe25
Change pull request template to allow for ticking the check boxes (#322)
Currently, the pull request template displays a list of `[ ]` items instead
of a list with check boxes. This PR changes it to dispaly check boxes.
2019-04-09 16:12:21 +02:00
Martin Huschenbett
82e6a11421
Allow for record wildcards in key expression (#320)
* Allow for record wildcards in key expression

Right now, instances of `TemplateKey` must define `key` to be something like
```
key this = ...
```
With this change, we can also write
```
key Foo{..} = ...
```
and even
```
key this@Foo{..} = ...
```

This is required for the desugaring of the surface syntax for contract keys.

* Clean up
2019-04-09 16:00:42 +02:00
Beth Aitman
0c84153a1b
Update multi-party pattern using flexible controllers (#326) 2019-04-09 15:48:27 +02:00
Fran
651593097f
Add filepath checks to tarball extraction. (#323) 2019-04-09 15:27:19 +02:00
Neil Mitchell
a1d64deff9
Fix proto3-suite on Windows (#316)
* Add filepath as a dependency of proto3-suite

* Make path splitting work on Windows

* Add directory as a dependency

* Avoid generating new files each time with proto-buf

* Add the libraries to Bazel too
2019-04-09 14:20:10 +01:00
Stefano Baghino
fa5c704e7e
Map Protobuf's 64 bit integers to strings in JS (#324) 2019-04-09 15:19:32 +02:00
Fran
18c7ca2bbf
Move daml-assistant logic out of daml-project-config. (#302)
* Move daml-assistant logic out of daml-project-config.

* Add DamlHelper versions of required and requiredE.
2019-04-09 15:09:10 +02:00
Beth Aitman
4183a2fa17
Clarify some stdlib stuff (#317)
* Clarify some stdlib stuff

* Improve stdlib phrasing
2019-04-09 14:55:41 +02:00
Stefano Baghino
3945c0d9b9
Format PR checklist items as checkboxes (#321) 2019-04-09 14:45:11 +02:00
Stefano Baghino
d07d450f6a
Add PR template (#315)
* Add PR template

* Update .github/pull_request_template.md

Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
2019-04-09 14:02:17 +02:00
Fran
36c846d32c
Handle symbolic links in tarball installs. (#314) 2019-04-09 13:17:43 +02:00
Fran
bd671336d0
Prevent crash when .daml/sdk is missing. (#312) 2019-04-09 11:52:13 +02:00
Beth Aitman
9d6c7af0fc
Tidying up proto docs (#303)
* Tidying up proto docs

* Fix typo

Co-Authored-By: bethaitman-da <42940582+bethaitman-da@users.noreply.github.com>

* Add extra newline
2019-04-09 11:11:11 +02:00
Leonid Shlyapnikov
dc273159eb Implement legacy DAR support, #308 (#309)
* Implement legacy DAR support, #308

if MANIFEST.MF is not present filter zip entries by .dalf extension,
expect one main DALF and one optional *-prim* DALF, fail in other cases

* Implement legacy DAR support, #308

if MANIFEST.MF is not present filter zip entries by .dalf extension,
expect one main DALF and one optional *-prim* DALF, fail in other cases

* comments, naming
2019-04-09 10:48:49 +02:00
Stefano Baghino
7467925aa1
Fetch status.proto from remote, simplify JS gRPC codegen (#285)
* Fetch status.proto from remote, simplify JS gRPC codegen

Fetch the `status.proto` file (part of the standard gRPC distribution)
from a distribution channel. _Moreover_, use the recently introduced
`proto_gen` rule to simplify how the gRPC code for the Node.js bindings
are generated (and remove the need to have `google/rpc/status.proto`
locally in the repository.

* Add plugin_runfiles option to proto_gen

This allows use to add additional files to the bazel sandbox so that
plugins can refer to them. This will subsequently be used by the
protoc-gen-doc plugin.

Also, pass the plugin options via --name_opt parameter.

* Add missing status.proto dependency /language-support/java and /ledger

* Build proto docs using the proto_gen rule

To make this work, I had to turn on the bazel build flag
`--protocopt=--include_source_info` because we cannot turn enable this
flag only for specific build rules.

* Make /ledger-api/grpc-definitions:docs public again

* Revert to the old style of passing plugin arguments to --name_out=options:path

* Suppress output of unzipping

* Fix link for google.rpc.Status in proto-docs
2019-04-09 10:30:01 +02:00
Francesco Mazzoli
685904d9f2
release -sources jars for java, when available (#301)
see #300, does not solve it entirely since scala sources are still
not present
2019-04-09 09:35:44 +02:00
Martin Huschenbett
2e08e2a9d7
Change contract key maintainers to have template argument in scope (#298)
* Change contract key maintainers to have template argument in scope

More precisely, change the contract key type class we desugar the surface
syntax to such that the maintainers function has the template argument
in scope instead of the key. The compiler rewrites all references to the
template argument into references to the key and fails whenever that is
not possible.

* Add TemplateKey class to desugaring module

* Make template key check slightly more lenient

* Fix TODO descriptions
2019-04-09 09:14:03 +02:00
Robin Krom
9bf7f9ef24
language: load the local project database (#293) 2019-04-08 22:21:29 +02:00