Commit Graph

98 Commits

Author SHA1 Message Date
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
Bolek@DigitalAsset
64707a6804
web ide: secure docker containers through networks (#304)
This pr addresses security concerns regarding the web ide docker container.
The bulk of the changes involve managing and coordinating docker
networks so that the proxy runs on internal docker network as well as
external one, while the web ide containers run only on the internal
network.
2019-04-08 19:31:13 +00:00
Francesco Mazzoli
f786210169
do not wait for 2 seconds before shutting down the server (#292)
* do not wait for 2 seconds before shutting down the server

should fix #178, will validate with @jberthold-da

* refactor & comment
2019-04-08 19:36:19 +02:00
Leonid Shlyapnikov
0aea22a507
delete scala/codegen-sql-support and all related tests (#294) 2019-04-08 12:41:09 -04:00
Robin Krom
91577a138d
language: fix: Include the main file in dar sources. (#295)
This adds the main daml file to the file dependencies packaged in the
dar. In addition, we now only use relative file paths in the dar
packaging.
2019-04-08 18:39:36 +02:00
Nick Smith
098120e7a9
Fixes #257 java-codegen: Reorganize Java Codegen ITs (#258)
* Fixes #257 java-codegen: Reorganize Java Codegen ITs
2019-04-08 16:26:34 +02:00
Gabor Aranyossy
c730a13237
fixing PostgresDaoSpec (#289) 2019-04-08 15:56:56 +02:00
moritzkiefer-da
4c4b945f10
Rewrite integration tests in Haskell (#286)
* Expose daml-helper as a library

* Rewrite integration tests in Haskell
2019-04-08 15:49:58 +02:00
Gaël Deest
2572eca983
Build gRPC on Windows with GHC's internal Mingw toolchain (#284)
* Adding patch to get GRPC to build on Windows with GHC's MingW

* Build gRPC on Windows CI
2019-04-08 15:32:46 +02:00
Gerolf Seitz
6c50e13b16
Describe escaping rules in Java codegen docs (#281) 2019-04-08 15:05:01 +02:00
Martin Huschenbett
ace1b5efd3
Remove all traces of the long gone value restriction (#256)
* Remove all traces of the long gone value restriction

We remove the value check since it has only been used by one `damli` command.
We also remove the constant folding from the DAML-LF simplifier. It is more
likely to diverge from the semantics of the interpreter than to do any good.

* Make hlint happy
2019-04-08 14:54:30 +02:00
Gerolf Seitz
ad122cdb34
Fixes the missing margin between codeblocks and headings (#282)
Contributes to #147
2019-04-08 13:44:52 +02:00
Francesco Mazzoli
eb318756ff
decode key expressions in scala correctly. fixes #177 (#214)
* decode key expressions in scala correctly. fixes #177

replaced a `foldRight` with a `foldLeft`, projections were decoded
backwards.

* remove ContractKeysSimple -- superseded by ContractKeys
2019-04-08 11:59:49 +02:00
Gabor Aranyossy
8b9f2e5860
Sandbox - active contracts streaming + transaction validation (#197)
* draft of active contracts streaming - still WIP

dumping todos for Robert

Sandbox: fix getActiveContractSnapshot

Sandbox: Add comment on thread usage

Sandbox: Add jdbcuser and ledgerid CLI arguments

Sandbox: enable SQL ledger

Sandbox: fix ledgerEnd

Sandbox: Add postgres snapshot test

Sandbox: Refactor SQL ACS

Update ACS in the same transaction as updating ledger_entries

wip CommandTransactionIT

small refactoring of Postgres Ledger creation

removing jdbc user from CLI args as it should rather be part of the jdbc url

using a thread factory for the connection accessor thread

removing timestamps from contracts table

using Akka test helpers

handling failures as rejections

removing unnecessary fields from ActiveContractsCheck

minor cleanup

small optimisation in storing Anorm queries as constants

making ContractDataParser thinner

formatting

cleanup

PostgresLedger does not need initial contracts anymore

add docs to getStreamingConnection

configured streaming connection pool to grow and shrink dynamically

crashing on set jdbcUrl CLI arg

rolling back in case of an exception

adding some docs

adding some comments

minor renaming

Add runSQL comment

* wip ActiveContracts

* fixup

* creating class ActiveContractsManager to be explicit on responsibility

* cleanup

- Remove obsolete code introduced in this PR

* scalafmt

* changed wrong autoCommit behaviour

* formatting

* amended comment on denormalisation

* disabling failing assert for now
2019-04-08 11:56:14 +02:00
Gerolf Seitz
7e1c6a3565
Use DarReader for fat-dar reading in java-codegen (#261)
Now that the DarReader supports reading fat-dars (#220), we ought to
make use of it and remove our custom code.
2019-04-08 11:46:20 +02:00
Florian Klink
db787857aa Remove custom truststore remains (#280)
* nix: remove mkJavaTrustStore

this isn't used anymore

* build.ps1: remove custom non-existing da-truststore\cacerts argument
2019-04-08 11:19:44 +02:00
moritzkiefer-da
1b89882449
Hide LaTeX warnings (#278)
* Hide LaTeX warnings

Currently LaTeX warnings make up about half of our Bazel output which
makes it tricky to find the output that you actually care
about. @bame-da said that he doesn’t care about the warnings so
probably nobody else cares either :)

* Add -halt-on-error
2019-04-08 11:10:03 +02:00
moritzkiefer-da
84b1076d6d
Do not use docker for daml integration tests (#277)
Docker causes a few issues for us here which imho outweigh the
benefits for us atm:

1. It is quite slow since we have to rebuild the image everytime. We
could fix this by caching the image somewhere but even that is
somewhat annoying since Azure does not provide local caches so we
would have to push the image to some external service and fetch it
everytime which is still somewhat slow.

2. It does not work on MacOS (even if you have docker on MacOS it is
not going to work since you will try to install the MacOS release
tarball in a Linux docker container).

On the other hand, DAML assistant allows us to specify the
installation directory and we get a fairly clean environment on CI so
the additional isolation we get from Docker is not that important for us.
2019-04-08 10:38:11 +02:00
Nick Smith
3d9731162b
Java codegen daml lf map (#201)
* Fixes #184 java-codgen: Correct num. of type params for DamlLf Map primitive.
2019-04-08 08:31:23 +02:00
Anup Kalburgi
eed24b01ae Vs code flexible controllers (#264)
* Adding choice as keyword

* VS code addning extra spaces
2019-04-06 10:31:34 -04:00
Brian Healey
4d7f455168
HOTFIX rename COPYRIGHT so github correctly shows apache2 license for repo (#274) 2019-04-05 22:10:47 -04:00
Brian Healey
abede0923b
Apache2 badge (#272) 2019-04-05 20:48:32 -04:00
Brian Healey
559b5304cf
apache2 license github detects (#273)
apache2 license
2019-04-05 19:20:51 -04:00
Robin Krom
39083bf04a language: fix: redundant glob in BAZEL rule (#263) 2019-04-05 17:37:26 -04:00
Brian Healey
550dde579c
Azure badges for daml (#267)
* Azure badges for daml

* Azure badges for damli correct linkwqs
2019-04-05 16:43:18 -04:00
Shayne Fletcher
a95b386b5b
check Foldable.concat doesn't clash with Prelude.concat (#265)
* check Foldable.concat doesn't clash with Prelude.concat

* it is not neccessary to use the NoImplicitPrelude ext

* protect against a reasonable (future) optimization from giving a false positive
2019-04-05 16:09:37 -04:00
moritzkiefer-da
473cb6c11d
Enforce MacOS compatibility with 10.13 (#260)
* Enforce MacOS compatibility with 10.13
2019-04-05 21:45:08 +02:00
moritzkiefer-da
fd156c33df
Add daml start (#254)
* Add daml start
2019-04-05 19:34:23 +02:00
Shayne Fletcher
d5243008b9
Desugaring now is in terms of DA.Internal.Desugar (#236)
* desugaring now is in terms of `DA.Internal.Desugar`

* update haddock parse to account for `DA.Internal.Desugar`

* update ghc-lib release
2019-04-05 13:22:50 -04:00
Robin Krom
a8b2d30b3d
Stdlib package (#229)
language: ship daml-stdlib as a package
2019-04-05 18:11:13 +02:00
Martin Huschenbett
b14bf471f0
Remove empty scaffolding for potential static authorization checker (#251)
* Remove empty scaffolding for potential static authorization checker

* Make hlint happy
2019-04-05 17:48:17 +02:00
Martin Huschenbett
7c3cd8840b
Remove DefValueInfo data type (#252)
This was used by the old DAML-LF based record constructor/projection
inliner. We'bve recently replaced by an inlining mechanism which is part
of the conversion from GHC Core to DAML-LF.
2019-04-05 16:47:08 +02:00
Beth Aitman
be177b39d9
Make it clearer which are end user and contrib sections (#253) 2019-04-05 16:35:22 +02:00
Michał Majcherski
c3e33df9f9 windows: build script with dev-env init; windows dev-env readme cleanup (#250) 2019-04-05 14:37:42 +01:00
Beth Aitman
8ab830a93d
Add mention of cd to setup instructions (#245)
* Add mention of cd to setup instructions

* Making instructions unambiguous

* Even clearer instructions

Co-Authored-By: bethaitman-da <42940582+bethaitman-da@users.noreply.github.com>
2019-04-05 14:40:15 +02:00
Neil Mitchell
caae2b0aa3
Merge pull request #248 from tweag/nm-drop-shorten-dir
Drop rules_haskell patch shortening source-dirs
2019-04-05 13:37:57 +01:00
moritzkiefer-da
eaa4a1ab47
Fix IS_FORK variable (#246)
Without this PR, this variable ends up being set to the string
"variables['System.PullRequest.IsFork']" which meant that we never
uploaded to the Bazel cache.
2019-04-05 14:24:23 +02:00
Beth Aitman
52ce976792
Update Java example instructions to use new repository (#216)
* Update instructions to use new repository

* Update instructions on second page as well
2019-04-05 13:12:42 +02:00
Nick Smith
3183973ab9
Fixes #226 java-codegen: Exapnd List integration tests (#244) 2019-04-05 12:50:31 +02:00
Nikola Knežević
79f8bf0a58 Simplify profile_zsh.sh (#212)
Rely on zsh features to simplify profile_zsh.sh file.

- Remove `DADE_REPO_ROOT` as it is not needed anywhere, `dade-assist` redefines
  it already.
- `${0:A:h}` gives the absolute path of the folder *this* file resides in, no
  need for `cd`, `dirname`, and `pwd` combo.
- Use simple process redirection (`<`), as it is more robust than the one in
  bash, and works better than `<<<`
2019-04-05 12:45:34 +02:00
Nicolas Mattia
e63fbce7fa Drop rules_haskell patch shortening source-dirs
We used to have a workaround for the command line length limit on
Windows, which exceeded when building ghc-lib. The ghc-lib package was
recently split into two smaller packages and this workaround is not
needed anymore.
2019-04-05 12:42:29 +02:00
Nicolas Mattia
117f043698 Fix daml-lf-ast build on Windows (#237)
* Update rules_haskell

This updates to the latest rules_haskell, which fixes a few issues on
Windows. Most importantly it flags a few Windows libraries as "system"
libraries, preventing Hazel to fail because they are not provided
through Bazel.

* Fix the streaming-commons build on Windows

This modifies our custom streaming-commons BUILD file to make it work on
Windows. In particular it swaps some system libraries, passes the
`-DWINDOWS` flag and enables the build of an extra module.

* Clean up bazel_tools BUILD file

This wraps a very long line for legibility.

* Fix shared object issues on Windows

* This fixes rules_haskell to use the correct Windows path separator on Windows.
    GHC expects the LD_LIBRARY_PATH variable to be a list of semi-colon separated
    paths, as opposed to a list of colon separated paths:
    51fd357119/compiler/ghci/Linker.hs (L1646-L1650)

* This fixes the name of Haskell shared objects on Windows. By default
    Bazel's cc_library generates '.so' files, whereas GHC expects a `.dll`
    (or a few other extensions, non of which are `.so`):
    51fd357119/rts/linker/PEi386.c (L684)

* Build daml-lf-ast on Windows CI
2019-04-05 12:39:23 +02:00
Robert Autenrieth
fcc8a43394 Navigator: Remove unused Makefile targets
... and fix the "start-frontend" target
2019-04-05 12:10:55 +02:00
Robert Autenrieth
b98fe6312f Navigator: Update readme files
The files contained outdated information on
building and publishing Navigator.
2019-04-05 12:10:55 +02:00
Neil Mitchell
5c2680afbe
Merge pull request #234 from digital-asset/HOTFIX-remove-changelogs
Issue #233 remove changelogs
2019-04-05 10:21:13 +01:00