Commit Graph

3116 Commits

Author SHA1 Message Date
Martin Huschenbett
667a63a9b1
Add location information to DAML-LF produced by damlc (#390)
* Add location information to DAML-LF produced by damlc

This is required to get error locations in the scenario view. Rigth now,
the location information for `create`/`exercise` still points to the
template/choice. I'll fix that in a separate PR.

* Fix test expectations

* Fix more tests
2019-04-11 21:44:48 +02:00
moritzkiefer-da
14cb5be2d0
Make "damlc test" exit with non-zero exit code on failed scenarios (#394)
fixes #291
2019-04-11 20:44:49 +02:00
Nicolas Mattia
a059340cec
Set src_strip_prefix and expand deps in assistant (#408)
The `daml-assistant` BUILD file was missing an `src_strip_prefix` field
and abtracted away the dependency list for two of its targets. The
latter is not strictly needed and may lead to too many dependencies
being specified for the targets.
2019-04-11 18:16:26 +02:00
Jussi Mäki
b77cf2c56b
DamlOnX reference implementation (#348)
* Add participant-state and participant-state-index APIs and reference implementations

This adds the (still WIP) interfaces and the in-memory reference implementations
of participant-state and participant-state-index.

See issue #137.

* Pass ledgerId through to getLedgerEnd method

This is needed in the daml-on-x implementation of the
transaction service.

* Add api-server-damlonx and the reference server

This is the initial version of the ledger-api server built on top of
the participant state APIs.

While functionally complete (modulo test services), it has only yet
been tested with the semantic tester. The server and the participant
state APIs are still under active development.

See issue #137.

* Apply scalafmt and copyright headers to new damlonx code

* ledger/damlonx: Fix build errors after merge from master

* ledger/participant-state: separate out the reference impl

* ledger/participant-state-index: separate out reference impl

* ledger/damlonx: Refactoring

- Refactor participant-state into multiple modules
- Introduce structured offset and update id types (vector of ints)
- Properly parse ledger feature flags

* ledger: Disable failing semantic test. Decrease grouping duration.

* scalafmt, fix after merge

* Add missing copyright headers

* ledger/damlonx: Add Simon's comments

* ledger/damlonx: Remove UpdateId, use Offset in both state and state-index.

* ledger/damlonx: scalafmt

* damlonxserver: review participant-state interface

Includes adding issue links for postponed fixes.

* daml-on-x-server: review reference implementation

Fixme's added to https://github.com/digital-asset/daml/pull/348 and
extra issues creaed in https://github.com/digital-asset/daml/milestone/4

* ledger/damlonx: Use SimpleString

* ledgre/damlonx: Backtrack on SimpleString change

See issue #398

* daml-on-x-server: drop unused 'index.impl.reference.package.scala'

* daml-on-x-server: add note on potential transient contracts bug

* ledger/participant-state*: post-merge fixes
2019-04-11 18:05:08 +02:00
Neil Mitchell
a55c9cf7e5
Make records with less fields still abstract (#397) 2019-04-11 16:53:47 +01:00
Remy
14fdafede8
daml-lf fix Value spec (#401)
* daml-lf fix Value spec
2019-04-11 17:51:02 +02:00
Jussi Mäki
e73ad8b957
Add client_server_test bazel rule (#365)
* Add client_server_test bazel rule

This adds a generic mechanism for constructing a test that launches
a TCP server and runs a test-suite against it. The rule orchestrates
passing the port number from the server to the client via a temporary
file and takes care of killing the server when the client process exits.

Still to be done is figuring out a good way to pass additional arguments
to the server and client programs (where these arguments could be other
bazel rules).

* Add missing copyright headers

* Add support for arguments to client_server_test

Note that this does not support passing in labels (":my_data_file"),
nor does it support "$(location :my_data_file)" string macros.

* Add data attribute to client_server_test

* Add support for location expansion in client_server_test args

* client_server_test: Address code review

* client_server_test: Bump waiting for port file write to 5s
2019-04-11 17:31:54 +02:00
Jonas Chevalier
6f90fda6d1
infra: VSTS agent improvements (#369)
* infra: replace the debian image by ubuntu 16.04

be closer to what the azure vmImage is using

* infra: limit access to the PAT token
2019-04-11 17:11:14 +02:00
Fran
78d77d0a2e
Add a daml-sdk-head script. (#404) 2019-04-11 16:49:02 +02:00
Shayne Fletcher
a1221d66f4
update ghc-lib (windows fix) (#393)
Contains https://github.com/digital-asset/ghc-lib/pull/57
2019-04-11 09:34:46 -04:00
Nicolas Mattia
911de53a74
Drop DA src_strip_prefix (#389)
This prefix, used in da-hs-daml-cli, should not be needed. As it happens
I am surprised it doesn't break the build.
2019-04-11 14:46:10 +02:00
zimbatm
7c01a91a24 pull request template: add note on external contributions (#386) 2019-04-11 14:43:51 +02:00
Jussi Mäki
1f2246c822 Do not divulge contracts to observers in nonconsuming exercises (#325)
* Do not divulge contracts to observers in nonconsuming exercises

Disables support for non-default ledger feature flags, as they
are meaningless since ledger server logic does not respect the flags.
Instead of large refactoring to add support for the old flag settings,
it is best to disallow the deprecated flags, and later on phase out the
flags completely.

Re-enables test_divulgence_of_token in sandbox semantic tests.

Fixes #157.

* purge LedgerFlags entirely...

...since we only support one version of them anyway, and clearing them

* updated release notes
2019-04-11 14:41:35 +02:00
Nick Smith
03d3d909a0
Fix #152 java-codegen: Document parameterized types. (#290)
* Fix #152 java-codegen: Document parameterized types.

Explain the sources that the Java Code Generator creates for
parameterized DAML types including the implications for converting
between Java Bindings Value types and Java native types.
2019-04-11 14:36:14 +02:00
Michał Majcherski
08bd36a10c Windows CI (#364)
* ci: remove the old Jenkins files

* WORKSPACE: remove unuset this_breaks_windows

* ci: add Windows builds to Azure Pipeline
2019-04-11 14:26:55 +02:00
Fran
61d8459494
Simplify daml install & some refactoring. (#379)
* Get rid of channels.

* Refactor version code.

* Remove --initial flag.

* Update daml-assistant/daml-project-config/DAML/Project/Types.hs

Co-Authored-By: fmota-da <francisco.mota@digitalasset.com>
2019-04-11 13:58:49 +02:00
Martin Huschenbett
be7ce7174f
Turn off -Woverlowed-literals in damlc (#375)
* Turn off -Woverlowed-literals in damlc

This flag does not play well with location information obtained via `-ticky`.
Also, the error message you get from overflowed literals suggests to use
`-XNegativeLiterals`, which is a bad idea since it changes the meaning of
`(-1)` from `\x -> x - 1` to `negate 1`.

* Fix module name in test

Co-Authored-By: martin-drhu-da <31696042+martin-drhu-da@users.noreply.github.com>
2019-04-11 13:52:22 +02:00
Fran
0a906867ab
Use isWindows for runtime checks. (#381) 2019-04-11 13:13:45 +02:00
Jost Berthold
27e01d5148
HOTFIX damlc: make ghc-options public, refactor (#373)
* HOTFIX damlc: make ghc-options public, refactor

* refactor `--ghc-options` again to support repetition and space-separated options

With this change, it is possible to repeat `--ghc-option bla`, and also to space-separate
multiple ghc options in one instance, like `--ghc-options "--flag1 -flag2 argument"`
2019-04-11 20:58:55 +10:00
Shayne Fletcher
c2e4c5ebef
More contract key tests (#372)
* rename Register to ContractKeyTests and more tests

* switch to 'i' for signatory for clarity

* more experimental testing

* useless comment
2019-04-11 06:57:02 -04:00
Fran
69b5454b9d
Set script-mode to true in da-capsule script. (#378) 2019-04-11 12:55:02 +02:00
Fran
92cfc27f56
Avoid symbolic links altogether on windows. (#377)
* Only handle and test symbolic links on unix.

* Don't create a symbolic link on windows.
2019-04-11 12:09:34 +02:00
moritzkiefer-da
fa4067ad1b
Move POM file generation to Bazel rules (#374)
* Move POM file generation to Bazel rules
2019-04-11 11:24:52 +02:00
Fran
c6fc75d17b Switch to unix-compat for now. (#376) 2019-04-11 10:20:23 +01:00
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