Commit Graph

1426 Commits

Author SHA1 Message Date
Beth Aitman
5daf3f55f3 Improve java install step (#1997) 2019-07-03 21:50:38 +02:00
Shayne Fletcher
96cfa3e346 Add Development.IDE.Core.Debouncer to library other-modules (#1998) 2019-07-03 19:05:54 +00:00
gleber
3dac96f8d3 Ledger API Test Tool: skip semantic tests on unsupported Ledger API. (#1976)
Semantic tests will be skipped if the specified Ledger API endpoint does not
implement TimeService.

This teaches MultiLedgerFixture to deal with cancelled tests.

This improves Ledger API Test Tool reporter to deal with cancellations better.
2019-07-03 18:27:25 +00:00
Brian Healey
ecbe0b15b5 resolve daml warnings for language-support (#1995)
* resolve daml warnings for language-support

* resolve warnings for generated very large archive daml
2019-07-03 17:48:42 +00:00
Moritz Kiefer
79f44e703c Implement debouncing of diagnostics (#1991)
Previously, we emitted diagnostics notifications as soon as we got
them. This resulted in a lot of flickering due to diagnostics getting
cleared briefly when typing only to immediately reappear.

Now, we buffer them for 0.1s so that a new event restoring the
same diagnostics for a slightly modified file will overwrite the
initial clear of diagnostics for the new document version.
2019-07-03 17:30:59 +00:00
Leonid Shlyapnikov
d06191e85d
Defining first endpoints for ledger-service/http-json (#1749) 2019-07-03 12:01:46 -04:00
Neil Mitchell
4dc9cd0020 Clean up hie-core (#1992)
* Split off addRelativeImport from modifying the session

* Switch located imports to adding their own relative imports

* Delete the unused getGhcDynFlags

* Make runGhcEnv no longer need to consult import paths

* Call runGhcEnv directly

* Move getSrcSpanInfos out to Spans

* Remove a redundant import

* Make findImports in Either rather than ExceptT

* Move getImports over to the right place

* Switch to liftEither
2019-07-03 15:38:57 +00:00
Neil Mitchell
a2ba883092 Make Haddock work for hie-core (#1990) 2019-07-03 15:21:12 +01:00
Neil Mitchell
ea3e0a863c Hide some hie-core modules (#1987)
* Hide some hie-core modules

* Make bazelifier happy
2019-07-03 13:37:13 +00:00
nickchapman-da
f3ae835d30
Hlb optional offset in command completion (#1989)
* dont drop error info when not StatusOk

* CommandCompletionService supports optional offset; adapt tests
2019-07-03 14:32:46 +01:00
Gerolf Seitz
a449d86ee0
Initial Ledger API Server (#1978)
* Add external offset column to parameters

We only ever need to use the external offset when restarting the api
server from a persistent data store to resume the ReadService state
update stream from the last processed offset.

In the PostgresIndexer we then need to store the external offset while
adding a new ledger entry.

* Allow disabling the jmx reporter in metricsmanager

* Implement PostgresIndexer component

* Introduce read-only Ledger and Dao

* SandboxEventIdFormatter treats transactionId as opaque string

* Introduce LedgerBackedIndexService

This can be reused both in the Sandbox and the ApiServer

* Implement PostgresIndex component

* Reference Service based on kvutils-v2 and postgres(index|indexer)

* Disable conformance test for ReferenceServer
2019-07-03 15:25:22 +02:00
Moritz Kiefer
a5fdc51662 Restart on nix compression errors (#1986)
We have seen this error on CI at least 2 times so lets restart
automatically when we encounter it.
2019-07-03 12:00:43 +00:00
Neil Mitchell
ad1e8cafbf Fewer orphan instances in hie-core (#1984)
* Get rid of orphan usage in Convert

* Get rid of orphan usage in AtPoint

* Delete one entirely unused orphan

* Remove a comment that is no longer true
2019-07-03 13:01:26 +02:00
Neil Mitchell
2e45ff3c57 Standalone pieces for hie-core (#1982)
* Add a .gitignore just for the hie-core piece

* Add standalone pieces to make hie-core work with a global Cabal install

* Add more things to .gitignore, PR suggestion

* Add copyright header
2019-07-03 11:51:46 +01:00
Moritz Kiefer
330ee17be6 Make Priority in hie-core independent of DAML (#1983) 2019-07-03 10:03:16 +00:00
Moritz Kiefer
3b64291a92 Cleanup moduleImportPaths now that file paths are normalized (#1980) 2019-07-03 09:55:40 +00:00
Michał Majcherski
54c59ea473
windows dev-env printing the root cause in case of failure after clean install (#1981) 2019-07-03 11:16:49 +02:00
Martin Huschenbett
3ffa2232a9 Allow shadowing of type variables in DAML and DAML-LF (#1962)
* Allow shadowing of type variables in DAML and DAML-LF

We relax the DAML-LF type checker to allow for shadowing of type variables.
This does not need big changes since the substitution we use already avoids
name capture. The test for alpha equivalence converts to de Bruijn indices
on the fly and is hence not a problem either.

We inline type synonyms during the conversion from GHC Core to DAML-LF. This
requires alpha renaming. The cheapest way to get this, is to use the unique
names of type variables instead of their surface names.

This fixes #1915.

* Fix Scala test

* Relax memory constraints for bond-trading test
2019-07-03 08:57:43 +00:00
Michał Majcherski
5702df7808
windows: fixed client_server_test setup (#1958) 2019-07-03 09:59:29 +02:00
Remy
f100750386 daml-lf: create value version 5 for enum types (#1917)
* lf-encoder: minor fix for let expression

* extractor: add test for enum types

* navigator: a small test for enum type

* daml-lf: create value version 5 for enums

* formatting

* daml-lf: fix version timeline

* extractor: fix enum support
2019-07-03 07:16:52 +00:00
Anup Kalburgi
5a153f9e96
Visual choice node (#1977)
now visual graph with template choices
2019-07-02 18:06:15 -04:00
Moritz Kiefer
995ee82fd0 Fix race condition in termination of scenario service (#1974)
Previously we sometimes ended up declaring the expected exit of the
scenario service as an unexpected exit. This PR addresses this by
adding a new variable that we set to True before we ask the scenario
service to exit by closing stdin.
2019-07-02 15:07:33 +00:00
Gabor Aranyossy
7e7c5f08cc started centralizing api Test utils (#1863)
* Centralises testing utilities around:

* transaction filters
* offsets
* parties

* fixed CommandCompletionServiceIT

* overriding the party in commands helper

* fxied wrong filter usage in TransactionServiceLargeCommandIT

* fixing CommandTransactionChecks

* fixing broken tests
2019-07-02 15:06:52 +00:00
Beth Aitman
29299d55e9 Docs fixes based on Mopinion feedback (#1973)
* Remove old introduction page

* Add PATH instruction links

* Changes based on quickskstart feedback

* Small fixes

* Fix link
2019-07-02 14:39:45 +00:00
Moritz Kiefer
5087cc4be2
Bring release instructions up to date and inline test plan (#1972) 2019-07-02 15:53:37 +02:00
Robert Autenrieth
b50ee984a0
Implement a PostgreSQL package store (#1818)
Adds a PostgreSQL package store to the sandbox.

Previously, packages were only stored in memory and
specified as CLI arguments. So if a user uploaded a
package at run time, he needed to add the package to
the CLI when restarting the sandbox.
2019-07-02 15:43:43 +02:00
Moritz Kiefer
c66211d034
Document Haskell profiling and default to -fprof-auto (#1971) 2019-07-02 14:51:09 +02:00
Stefano Baghino
2bb9276ba7 Replace download shield in README (#1968) 2019-07-02 13:48:46 +01:00
Moritz Kiefer
c2a3d6ea28
Allow controlling the gRPC message limit via daml.yaml (#1970)
* Allow controlling the gRPC message limit via daml.yaml

We have had to raise that in the past since it caused issues on large
projects so it makes sense to make it configurable.

* Update unreleased.rst

Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
2019-07-02 14:22:35 +02:00
Andreas Herrmann
2c153fd7c7 Buildifier: Exclude ./node_modules (#1969)
This directory contains generated files by rules_nodejs which can throw
off buildifier.
2019-07-02 10:41:03 +00:00
Fran
365ac2f94c
Use published extension by default in daml studio. (#1965)
* Use published extension by default in daml studio.

* Implement suggestions.

* Add release notes.
2019-07-02 11:29:19 +01:00
Florian Klink
1cd5bb2492 infra: move index.html outside gcp_cdn_bucket module (#1716)
* infra: gcp_cdn_bucket: update comment

The cache retention can be configured, while the comment suggests its
hardcoded.

* infra: don't create index.html inside gcp_cdn_bucket module

We might want to add a different index.html per bucket, so move that
code outside the module and into the bucket-specific terraform files.

Also add bucket-specific index.html files.
2019-07-02 11:14:21 +01:00
Stefano Baghino
4774e75eb8 The completion stream RPC defaults to the ledger end as offset (#1961)
* The completion stream RPC defaults to the ledger end as offset

Fixes #1913

Relevant changes are propagated to the Java bindings (including
deprecating a method that would now return a nullable ledger end).

* Refactor completionStream method

* Address review comments

- ignore command creation results
(https://github.com/digital-asset/daml/pull/1961#discussion_r299089539)
- avoid re-connecting to the client for every command
(https://github.com/digital-asset/daml/pull/1961#discussion_r299092328)
- move offset field optionality to domain object
(https://github.com/digital-asset/daml/pull/1961#discussion_r299090451)

* Improve tests
2019-07-02 10:02:43 +00:00
Moritz Kiefer
6bef12f98b
Remove release/sdk.yaml (#1966)
It was only used for the old assistant.
2019-07-02 11:33:06 +02:00
Anup Kalburgi
37e616d0a1
Adding example for quickstart (#1796)
adding quickstart example for visual
2019-07-01 11:45:54 -04:00
Moritz Kiefer
6bd76d80e1 Use the default dar path in the quickstart-java example (#1963) 2019-07-01 15:43:53 +00:00
Moritz Kiefer
b748fab0f9
Fix running the IDE on damlc (#1956)
* Fix running the IDE on damlc

There were two issues:

1. Missing include paths.
2. Files where the module name does not match the file name.

I’ve fixed both and added a test that we can load the damlc Main.hs.
2019-07-01 17:30:13 +02:00
Moritz Kiefer
af795d14ca Combine all artifacts output by damlc in .daml (#1959)
Fixes #1241
2019-07-01 15:07:30 +00:00
Gabor Aranyossy
2bb8263a5e adapting docs to match state as is regarding not supporting dalf files (#1951)
* adapting docs to match state as is regarding not supporting dalf files

* patching release notes instead

* validating for ZIP files in Cli parser

* guarding for parsing non zipped archives

* Update release-notes.rst

* Update unreleased.rst

Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>

* Update unreleased.rst

* Update release-notes.rst

* Update release-notes.rst
2019-07-01 13:36:56 +00:00
mziolekda
02e94ec845 provide party and package management in KVUtils and participant-state v1 (#1553)
* provide asynchronous interfaces for party and package management on the participant-state

* provide submission id for correlating req with resp on Write- and ReadService

* add asynchronous party allocation in KVUtils

* start conversion of the package upload and party allocation to synchronous paradigm

* implement synchronous versions of party allocamtion and packacge update

* document recent changes and unify concepts between v1 and v2 versions of
the participant-state interface

* scala formatting

* address review comments
2019-07-01 12:57:33 +00:00
Robin Krom
e578f91efb
language: upgades: generate upgade code from dalfs (#1940)
* language: upgades: generate upgade code from dalfs

This switches the `migrate` command to read dalf files instead source to
generate upgrade code. The dalf files are read, data types are converted
back to haskell source, and from this we can generate generic instances
again.

There are two known issues that we want to address next:
  - Duplicate generic instance definitions will make the build fail.
  I.e this only works for data declarations that have no generic
  instances
  - Data declarations of the form `data Foo = Foo ()` can not be
  converted back to haskell source.
2019-07-01 14:44:53 +02:00
Andreas Herrmann
93d8e01db2
Update rules_haskell and static GHC (#1515)
* Update rules_haskell and static GHC

Remove patches that have been upstreamed or are no longer required.
Update still required patches to match the new rules_haskell version.

Previously we patched rules_haskell to coerce GHC into using static
Haskell libraries in most places. In particular we moved hs-libraries
entries into extra-libraries entries in the package configuration files.
A much cleaner approach is to compile GHC with a static RTS, then GHC
will by itself choose to load static Haskell libraries.

* Remove haskell_cc_import

* da-hs-daml-cli -> daml-cli

* da-hs-damlc-app -> damlc-app
2019-07-01 13:26:19 +02:00
Moritz Kiefer
6919b07186
Implement LSP request cancellation (#1954)
* Implement LSP request cancellation
2019-07-01 13:04:37 +02:00
Fran
074dadaf12 Use install script in integration test for unix. (#1952)
* Use install script in unix integration test.

* Fix waitForProcess
2019-07-01 09:21:04 +00:00
Gabor Aranyossy
709112e92b fixing issue of returning inclusive ledger offsets with completions (#1932)
* fixing issue of returning inclusive ledger offsets with completions

* changelog update

* removed TODO

* fixing haskell tests
2019-07-01 07:45:26 +00:00
Neil Mitchell
3b4c5a6597
More code actions for hie-core (#1948)
* Push the suggestion work further up

* Make LspFuncs an argument to the handlers

* Actually pass around the contents of the buffer to suggestAction

* Make suggestAction do sensible figuring out if you remove the next line too

* Better indentation

* Code action to add GHC extensions as required

* Deal with extra arguments to LSP handler
2019-07-01 08:30:37 +01:00
Andreas Herrmann
9da78116d6 Mask async exceptions in updateFileDiagnostics (#1944)
* Mask async exceptions in updateFileDiagnostics

* lsp-tests remove flaky flag
2019-07-01 07:14:31 +00:00
Stefano Baghino
3dc0c02766
Add contract key support to Scala bindings and navigator (#1950)
* Expose the contract key in the Scala bindings

* Expose contract keys on the navigator

* Update release notes

* Remove ui-backend.conf file from navigator scenario

Addresses https://github.com/digital-asset/daml/pull/1950#discussion_r298814223

* Fix broken docstring reference to DamlLfDefRef

Addresses https://github.com/digital-asset/daml/pull/1950#discussion_r298814301
2019-06-30 20:57:55 +02:00
Shayne Fletcher
cc0e39c89e Make the README a little prettier (#1949)
* Make the README a little prettier

* Remove vscode.png

* Image float right

* Go back to regular title; scale image 75%
2019-06-28 22:14:40 +00:00
Neil Mitchell
51beadd39f
Add "Remove import" code action (#1945)
* Add a code action

* Update comments

* Remove logging, since its too verbose

* Fix a few warnings, add a final case

* Add an example of what the code action matches
2019-06-28 18:37:08 +01:00