Commit Graph

748 Commits

Author SHA1 Message Date
Stephen Compall
cc21c78be2
Scala ecosystem: discourage Identifier name in scala primitive (#1570)
* Primitive.LegacyTemplateId replaces 2-tuple TemplateId.unapply; 3-tuple variant introduced

* ensure the suggested replacements are well-typed and behaved

* suggest LegacyTemplateId for 2-valued form
2019-06-11 17:31:28 -04:00
Leonid Shlyapnikov
8ed703e14d Removing damlc dependency (#1588)
quickstart-scala example does not buld DAR from SBT
2019-06-11 18:17:51 +00:00
Beth Aitman
e6c1d1e414 Suggestions for demo instructions (#1580) 2019-06-11 11:25:27 +01:00
nickchapman-da
19449affb5
Ledger App Demos (#1572)
* chat ledger-app, first cut

* pre-demo improvements to nim-console

* Valuable instance for Text

* nim-console/demo.md
2019-06-10 15:08:57 +01:00
Michał Majcherski
9b5f152f18
windows: better language-support build / test coverage (#1548) 2019-06-07 17:29:07 +02:00
Michał Majcherski
90c854f3bf
windows: language-support java codegen tests (#1542) 2019-06-06 16:19:39 +02:00
Martin Huschenbett
5396f42b3a
Drop support for DAML-LF 1.3 from damlc (#1445)
* Drop support for DAML-LF 1.3 from damlc

This means `damlc` now only supports versions allowing arbitrary expressions
as contract keys. This is very helpful for the upcoming new template
de/re-sugaring underpinning generic templates.

* Unpin a few DAML-LF target versions in tests

* Fix golden tests

* Adapt changelog to rebase

* Rename DAML-LF scenario tests to 1.dev

* Update tests to --target 1.dev

* Fix release notes
2019-06-03 14:00:25 -04:00
nickchapman-da
47e6d9ab05
Haskell ledger bindings (#1460)
* use with syntax in Daml

* attend to code review comments

* move ledger services implementation to own sub-module

* use ledger reset service when running tests for haskell-ledger-bindings

* expose LL.ClientCall in high level interface

* cancel streaming gRPC calls when attached stream is closed

* fix modification to gRPC-haskell so existing interface in preserved

* ClientCall and clientCallcancel were already available on HighLevel interface
2019-05-30 15:00:42 +01:00
Remy
f84e7d79d2 Add enum type to daml-lf (#1397)
* add enum type to daml-lf dev

* Address Francesco's comments

* Address Martin's comments

* fix daml-lf proto version history
2019-05-29 12:15:01 +00:00
Gerolf Seitz
82f81a7588 Test codegen against the latest DAML-LF version (#1446)
I'm refurbishing the DAML-LF 1.3 specific tests to run against the
latest DAML-LF version (by removing the explicit target version in the
daml_compile target).
Going forward we only "reify" specific DAML LF versions when breaking
changes or new features are introduced, and we need to test the old
behavior specifically (just like we did for DAML LF 1.0 and 1.1).
2019-05-29 11:30:38 +00:00
Martin Huschenbett
6cb8c3bc94
Add back the Java codegen integration tests for DAML-LF 1.0 (#1418)
I accidentally deleted them at some point and nobody noticed.
2019-05-28 12:36:03 +02:00
Martin Huschenbett
34d436d77d Drop support for DAML-LF 1.1 from damlc (#1231)
* Drop support for DAML-LF 1.1 from damlc

Part of #853.

* Fix docs test

* Add show party test back

* Update release notes

* Remove target version from Java codegen test
2019-05-27 16:07:35 +00:00
Gabor Aranyossy
be0a8110a9
using LedgerId domain type (#1403)
* getting a compiler SOE

* /ledger/... compiles

* all compiles

* fmt
2019-05-27 17:01:17 +02:00
Martin Huschenbett
a25a641c35
Check in DAR file for Java codegen test against DAML-LF 1.1 (#1406)
This is a prerequisite for dropping DAML-LF 1.1 support from the compiler.
2019-05-27 16:33:31 +02:00
Nick Smith
54cfc6d316
Fixes #1340 - Add Scaladocs generation to the Bazel rules. (#1341)
* Fixes #1340 - Add Scaladocs generation to the Bazel rules.
2019-05-27 12:59:19 +02:00
Stephen Compall
aa6bbe8de6 compile Scala codegen output removing ContractId tparam constraints (#1350)
* ValuePrimitiveEncoding.Mapped, mixin for the "axiom" parts of mapped and xmapped

* remove ValuePrimitiveEncoding.mapped

- it was okay with 1 inductive case, but now there will be 4, so just
  mixin Mapped instead

* mark members of ValuePrimitiveEncoding.Mapped final

- mixins are easier to get right if you mark everything final

* add Maps to random tests

* replace <: Template[A] with : TC in ValuePrimitiveEncoding#valueContractId

- no current subclass uses this context bound, but it may be useful for
  encodings that wish to make ContractId encodings dependent on the type
  parameter

* replace : TC with no bound in ValuePrimitiveEncoding#valueContractId

- fixes #1325
- can reintroduce : TC with #822

* stub test for generating with #1315's liberated contract IDs

- commented out because we still want to test codegen with stable LF
  only

* undo useless changes

* ContractId#apply is unbounded
2019-05-24 18:01:32 +00:00
Gabor Aranyossy
ff088efd94
porting API services to used Index Service v2 (#1362)
* moving to index service v2

* damlonx does not depend on v2 index service anymore

* leger -> ledger

* transacion id fix
2019-05-24 19:18:51 +02:00
Remy
294abecf5d daml-lf remove LedgerIdString (#1376) 2019-05-24 12:08:28 +00:00
Remy
4f18b1afa7 DAML-LF internal type safety (#1192)
* Rename Value's ContractId to VContractId

* daml-lf: a bit more about PartyId

* daml-lf: Concatenable MatchingStringModule

* daml-lf make clear type used for Scenarios only

* daml-lf create ContractId, LedgerId, TransactionId

* sandbox-sql conversion util

* LedgerName -> LedgerString

* futher type cleanup in the sandbox

* daml-lf add test for LedgerString

* fixing tests

* a bit more safety in the DB

* Address Stephen's comments

* fix rebase

* More fixes for StringModule

* change length of LedgerString (256 -> 255)
2019-05-24 09:53:29 +00:00
nickchapman-da
7ee7931407
nim-console Ledger App (#1342)
* Use closable Stream in Haskell ledger bindings

* move PastAndFuture abstraction into ledger interface code

* distinguish past/future transactions in return of Ledger.getTransactionsPF

* first cut: nim-console running against a ledger

* remove flaky failing test
2019-05-23 15:56:12 +01:00
Leonid Shlyapnikov
67da43cff5
Document the meaning of Option in Contract#agreementText (#1319)
* Documenting `agreementText`

* Code review suggestion

Co-Authored-By: Francesco Mazzoli <f@mazzo.li>
2019-05-23 08:00:42 -04:00
gaborh-da
4259ad28bc Expose a testable ledger view (#1236) 2019-05-21 12:29:07 +02:00
Leonid Shlyapnikov
4c6ea2875d Add test cases to validate the received agreement text, #1159 (#1259) 2019-05-21 08:09:20 +00:00
Leonid Shlyapnikov
3d91ac6734 Compile codegen-sbt-example as part of the bazel build, #1254 (#1261)
Fix codegen-sbt-example compilation, sandbox API changed.
2019-05-21 07:13:03 +00:00
Leonid Shlyapnikov
f31980c18f Add Scala codegen bazel rule: dar_to_scala (#1202)
* Removing unused/broken daml.bzl rules, adding Scala codegen rule

Scala codegen rule: dar_to_scala follows the same approach
as dar_to_java with a few differences:
- dar_to_scala supports multiple dars as an input
- dar_to_scala does not try to compile the generated scala (separation
  of responsibilities)

* Using dar_to_scala to compile quickstart-scala example

* Fixing formatting

* Add dependency to examples-quickstart-scala-bin

So if example does not compile, it can't be published.

* Fixing the path to the jar executable

* Changing scala codegen rule to rely on zipper instead of jar

JDK's jar creates srcjar with timestamped files, zipper doesn't
timestamp files. This means we can create reproducible/deterministic/
cacheable srcjars

* Addressing code review comments, wrong var name
2019-05-20 14:13:30 +00:00
Stephen Compall
53058001e6 add createAnd syntax to prepare CreateAndExercise commands from Scala codegen contracts (#1197)
* add createAnd syntax to prepare CreateAndExercise commands from Scala codegen contracts

* open-style ExerciseOn typeclass

* GADT-style ExerciseOn works perfectly well, so let's go with that instead

* testing implicit conversion + ExerciseOn TC lookup

* use scalatest-style typesafe === to avoid Anys

* many more ExerciseOn tests

* support ExerciseOn polymorphism in Primitive.exercise

* generate ExerciseOn references in Scala codegen, permitting `createAnd` to combine with exercise* methods

* refactor testCreateContractAndReceiveEvent to support other commands

* compare create and createAnd's command generation behavior in a simple test

* bazel style

* test CreateAndExercise from Scala codegen against sandbox

* release note for Scala codegen create-and-exercise support
2019-05-20 07:43:08 +00:00
Gerolf Seitz
c645348ca1
Expose a contract's agreement text on the Ledger API (#1151)
* Added agreement_text field to the CreatedEvent in Ledger API.
* Changed java bindings + java codegen
* Changed utilities for scala codegen
* Made necessary changes in Sandbox to propagate the agreement text from ContractInst to the CreatedEvent
* Made changes to the navigator to show the agreement text in the contract details page when it is set and not empty

Fixes #1110
2019-05-17 11:22:05 +02:00
Gabor Aranyossy
f48b7c764e introducing WriteService in Sandbox (#1193)
* introdocing WriteService in Sandbox

* changing submit to return java CompletableStage

* introduced TimeModelChecker interface

* removing whitespaces

* doc updates

* dependency order fix
2019-05-17 08:59:19 +00:00
Leonid Shlyapnikov
b5dec5aa3b Remove //language-support/scala/sandbox-control and references, #950 (#1203)
the class referring to sandbox-control has not been used itself.
2019-05-17 07:27:11 +00:00
Andreas Herrmann
a6809310e8
Update to Bazel 0.24 (#567)
* bazel: 0.23.1 -> 0.24

* bazel-deps: Fix for Bazel 0.24.0

* bazel no longer supports + on dicts

Replace by dict.update.

* Fix junit classpath issue

* azure: Update MacOS image to Mojave

* Windows: --noincompatible_windows_escape_jvm_flags

* rules_scala: Support escape_jvmflags

* rules_scala: separate jvm_flags by TAB

* Document --noincompatible_windows_escape_jvm_flags
2019-05-16 18:04:30 +02:00
nickchapman-da
8510e6afc5
Haskell ledger bindings (#1181)
* Bindings & tests for more ledger services

* fix hardcoded package id in test

* language-support/hs/bindings/examples/nim-console

* make hlint happy

* headers & format

* README

* increase timeouts; track location of GPRC Deadline Exceeded.

* Update language-support/hs/bindings/examples/nim-console/README.md

Co-Authored-By: Neil Mitchell <35463327+neil-da@users.noreply.github.com>

* rename: Mes --> Logger, mes --> log, tagMes --> tagLog (etc)

* replace isOpen with ==Open

* Avoid fragile hardcoded PackageId in testcase
2019-05-16 16:45:54 +01:00
Leonid Shlyapnikov
b57246642c
Build quickstart-scala as part of the bazel build cycle, #675 (#1138)
Set up exports instead of loading `variables.bzl` with transitive deps
2019-05-16 10:21:52 -04:00
Gabor Aranyossy
e70cbfe65c eliminating some mutable state (#1130)
* no var no problem

further refactor

introduced InfraState

a bit less vars

encapsulating closes

SandboxServer starts automatically

rebase fixup

collecting state into a single object

some cleanup

removing exposed materializer

LedgerBackend is closed in SandboxServer

changed ownership of Ledger

fixing perf tests

fixing some compile errors

formatting

removing unused method

fixing integration test to use correct dar file

fixing issue with PostgresFixture and SandboxResource

Fix integration tests on Windows

* fixing rebase artifacts
2019-05-16 08:52:14 +00:00
Leonid Shlyapnikov
3cb958f656 Changes recommended by @jost.berthold (#1168) 2019-05-15 22:59:18 +00:00
gleber
3eb6f83b3a
ledger-api-intgration-tests: Cleanup ledger ID handling. (#1129)
* ledger-api-intgration-tests: Cleanup ledger ID handling.

This changes nothing in the logic of tests. It is a preparation for moving of
most of the tests to use Dynamic ledger ID mode for tests, which is a
preparation for running these tests against remote Ledger API endpoints.

* sandbox: Rework LedgerIdMode and move it up into common.
2019-05-15 17:05:16 +02:00
Leonid Shlyapnikov
90c2a11c30
Scala ecosystem SDK doc (#1025)
* Scala ecosystem SDK doc (#675)

* Improving quickstart-scala error handling, #675
2019-05-15 10:09:33 -04:00
Gerolf Seitz
a5cf706040 Less logging in tests (#1145)
* Less DEBUG logging in java codegen tests

* Add logback-test.xml for ledger/sandbox tests
2019-05-15 08:58:08 +00:00
Nick Smith
6f6f3337c7
Fixes 895: Improve DA Bazel rules for building javadocs. (#896)
* Fixes 895: Improve DA Bazel rules for building javadocs.

Extend the da_java_library Bazel macro to also build the Javadoc for the
target. Add the Javadoc artefacts to the release procedure.
2019-05-14 09:40:30 +02:00
Neil Mitchell
ed431b4717
Move Tuple and Either types to DA.Types (#1099)
* Add a helper function to qualify things with respect to a module

* Supress some warnings I saw when building

* Move Tuple* and Either to daml-prim:DA.Types, so they have a nice name for Java users (instead of GHC.Tuple or DA.Internal.Prelude)

* Add copyright header

* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update the daml-lf translation of tuple types

* Fix up the scala bindings for how to use types

* Clarify what action people need to take following the release notes

* Fix an expected test

* Clarify the changelogs even more

* Run ScalaFmt

* Clean up the release notes a bit

* Use the changelog from Beth

* Update the release notes again

* Update docs/source/support/release-notes.rst

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Fix up the scenario error messages
2019-05-13 16:36:21 +01:00
Gerolf Seitz
17df4e78e1
Java Codegen: generate methods for CreateAndExerciseCommand (#1107)
The Java Codegen now generates methods for creating a
CreateAndExerciseCommand for a particular choice given a template.

Contributes to #1092.
2019-05-13 16:11:10 +02:00
Gerolf Seitz
8158269b7d
Remove ExercisedEvent in Event oneof. (#1067)
* Remove ExercisedEvent in Event oneof.

The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.

HOWEVER: The Java Bindings used to use the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures,
1) Event is now and interface and is only used in the Transaction class.
2) there is a new interface TreeEvent, which is used in the TransactionTree class.

* CreatedEvent implements Event and TreeEvent
* ExercisedEvent implements TreeEvent
* ArchivedEvent implements Event

Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).

Fixes #960.
2019-05-13 14:36:13 +02:00
Remy
2e3a87934b Daml lf type safty (ChoiceName, VarName, FieldName, ConstructorName) (#983)
* daml-lf: make DefinitionRef more typesafe

* daml-lf: Identifier -> DefinitionRef

* daml-lf: remove unsafe apply and copy methods from DottedName

* daml-lf: create identifier

* daml-lf: make ChoiceNames Identifiers

* daml-lf: cleanup TVar

* daml-lf: FieldNames & VariantConstructors -> Identifiers

* bazel fmt

* daml-lf: VarName -> Identifier

* daml-lf: drop return inside Ref.scala

* daml-lf Identifier -> Name

* daml-lf DefinitionRef -> Identifier

* daml-lf make iface more type safe
+ address Francesco's comments

* daml-lf: remove unsafe unapply from MatchingStringModule

* fix navigator

* Address Stephen's Comments
2019-05-13 11:17:12 +00:00
nickchapman-da
c1de0abcd6 haskell-ledger-bindings, test connect against sandbox (#1023)
* haskell-ledger-bindings, test connect with sandbox

* use System.Time.Extra.timeout instead of rolling own

* fix module name to match hierachical path

* increase timeout to 10s, fix macOS CI?

* delete-trailing-whitespace

* dont specify daml version for daml_compile rule

* unalign module imports

* replace xxx with undefined
2019-05-09 17:31:06 +00:00
Michał Majcherski
9610d74b50
windows: back to official rules_scala repo (#1040) 2019-05-09 13:53:47 +02:00
Moritz Kiefer
90550cc801
Remove broken timestamp test (#1026)
This test only worked by chance since in older JDK versions
java.time.Instant.now() didn’t have nanoseconds precision. As
evidenced by the test after this, nanoseconds are lost during a
roundtrip so this test breaks on newer JDK versions that increased the
precision. See https://bugs.openjdk.java.net/browse/JDK-8068730 for
more information.
2019-05-09 11:17:46 +02:00
Leonid Shlyapnikov
0ca414f09c
quickstart-scala daml assistant template cleanup (#614) (#1007) 2019-05-08 11:18:22 -04:00
Leonid Shlyapnikov
6cc9e685e5 Add quickstart-scala template to DAML Assistant (#991)
* Add quickstart-scala template to DAML Assistant , #614

Removing the rule to create a quickstart-scala.tar.gz, it is not needed

* Return non-zero error code if failures detected, #614

* Reading project name from `daml.yaml`, #614

Removing Versions.scala.template
2019-05-08 06:57:15 +00:00
Leonid Shlyapnikov
8534e2837f
quickstart-scala DAML Assistant template (#745)
* Add quickstart-scala IOU example, DAML Assistant template, #614

* Move all scala examples under language-support/scala/examples

* Removing target dirs which don't get excluded by the glob, #614
2019-05-07 11:41:29 -04:00
Gerolf Seitz
bac5c4a6f4 Java Bindings: Properly convert CreateAndExerciseCommand (#982)
The conversion of the CreateAndExerciseCommand in the Command base class
was missing. This also adds a missing test for that.

Fixes #979.
2019-05-07 17:04:48 +02:00
Gerolf Seitz
6ac1e5cf28
Java Codegen: Removing some dead/unused code (#971) 2019-05-07 14:59:20 +02:00
Gerolf Seitz
2c04e1fd6d
Java Codegen: Generate types with multiple name components (#946)
If a variant itself is not serializable, but the synthesized record for
one of its constructors is, then said record is returned by the
interface reader in the set of type declarations, when the variant type
itself is not.
When constructing the InterfaceTree in preparation of the codegen, we
previously rejected such a situation.

We now generate Java code for such a synthesized record, as it is a more
generally correct way of interpreting DAML LF (i.e. the DAML compiler
could decide tomorrow to create such multi-component record names for
regular records).

In any case, we consider this to be an edge case, as the synthesized
record for the variant constructor cannot be used directly either from
DAML or the Ledger API.
2019-05-07 11:12:42 +02:00
Remy
0489c6e0a5
Daml lf type safty (Party & PackageId) (#761)
* daml-lf: split SimpleString into Party and PackageId

* daml-lf remove parameter from DefinitionRef
2019-05-06 20:40:43 +02:00
Martin Huschenbett
1af740ced8 Remove a useless dependency on daml-prim from a sandbox-control test (#948) 2019-05-06 18:57:25 +02:00
Nick Smith
d725d50be9 add result of exercise to transaction -- fixes #479 (#583)
Modify the DAML Engine, Ledger API and Sandbox to pass the result of the
exercise as a field of the transactions.
2019-05-06 14:33:44 +02:00
Gerolf Seitz
b38ac29532
Attempt at fixing flaky CodegenLedgerTest (#929)
* Increase call timeout to 40 seconds
* Run test exclusively
* Add logback-test.xml and set level to DEBUG

Contributes to #808.
2019-05-06 12:48:20 +02:00
Martin Huschenbett
f098b0e4be
Remove a deprecated package database build rule (#913)
The rule was used in only in one place and that place can be updated
to a newer rule.
2019-05-04 15:32:05 +02:00
Gerolf Seitz
ecf6ece8c4
CommandService returns useful data for successful submissions (#875)
Submitting a command via the CommandService now returns either the
transaction id (SubmitAndWaitForTransactionId), the flat transaction
(SubmitAndWaitForTransactionResponse), or the transaction tree
(SubmitAndWaitForTransactionTreeResponse).

This means that users don't have to wade through the transaction stream
to retrieve the resulting transaction. This is particularly useful in
combination with #479.

Fixes #406
2019-05-03 16:01:41 +02:00
nickchapman-da
549cf086e1 Haskell ledger bindings (#879)
* HL types for Ledger API. Command Submission & Completion services.

* whitespace

* remove renamed file that came back after bad merge

* delint

* adapt to change in transaction_service.proto
2019-05-03 10:37:08 +00:00
Gerolf Seitz
f4d8e134e3
Add TransactionService methods for looking up flat transactions (#830)
This change is needed in preparation of #406, where we want to return a
transaction tree and flat transaction after a SubmitAndWaitForTransaction(Tree).
2019-05-03 09:03:12 +02:00
Martin Huschenbett
df230912c7
Drop DAML-LF 1.0 support from compiler (#863)
* Drop DAML-LF 1.0 support from compiler

This will enable us to add `Functor`, `Applicative` and `Monad` instances
for `(->) r` in the `daml-stdlib`. We'll do this in a separate PR.

* Remove codegen test for DAML-LF 1.0
2019-05-02 21:35:06 +02:00
nickchapman-da
15ea5ef8b4 haskell-ledger-bindings: TransactionService, GetTransactions (#816)
* haskell-ledger-bindings: TransactionService, GetTransactions

* passify linter

* passify humans linters!

* format!
2019-05-01 14:29:23 +00:00
Stephen Compall
157fab963b
daml-lf: move EnvironmentInterface from Scala codegen to interface library (#781)
Also move Interface and InterfaceType out of the reader subpackage; they
belong with the rest of the data model at the iface root.

The specific mechanics of reading a Dar all the way to producing an
EnvironmentInterface are left to Scala codegen's Codegen and Java
codegen's CodeGenRunner; there's no consensus or great stability on the
best way to tie these pieces together, but all the pieces might as well
be available in the interface library at least.

Inspired by a query on Slack by @leonelag regarding reading the
codegen-relevant parts of dalfs and dars; thanks!

* daml-lf: move EnvironmentInterface to interface library from Scala codegen

* daml-lf: move Interface out of reader subpackage

* language-support/java: deal with moving Interface out of reader subpackage

* document Interface and EnvironmentInterface

* missed copyright header in reader package.scala

* extractor: deal with moving Interface out of reader subpackage

* navigator: deal with moving Interface out of reader subpackage
2019-04-29 17:01:01 -04:00
nickchapman-da
b2e8df5c6a haskell-ledger-bindings, LedgerIdentity (#755)
* haskell-ledger-bindings, LedgerIdentity

* copyright headers

* address review comments

* format

* fix haskell indentation
2019-04-29 14:02:25 +00:00
Stephen Compall
0ba1e5b386 increase ledger-api IT timeout; daml-lf, language-support/scala: remove long-deprecated symbols (#741)
* remove long-deprecated symbols from daml-lf and language-support scala libraries

* remove useless usage of 2-parameter TemplateId constructor

* grow ledger-api-integration-tests to account for usual 300s-ish runtime

* buildifier
2019-04-26 21:05:26 +00:00
Gabor Aranyossy
cc32ee5025
adding missing tests around Sandbox's CLI module (#668)
* introducing CliSpec

* updating sandbox sdk docs

* fixing the missing code block

* adding missing copyright headers

* making allow-dev hidden

* HardCoded -> Predefined

* updated changelog
2019-04-26 10:12:23 +02:00
nickchapman-da
43abaee299
example of using haskell-grpc (#700)
example of using haskell-grpc
2019-04-25 18:23:32 +01:00
Francesco Mazzoli
14f6728219
parametrize iface types only by type... (#678)
...rather than by "field with type". in preparation to enums (#105)
2019-04-25 17:25:23 +02:00
Stefano Baghino
7ac438e87b
Remove //language-support/js (#691)
The JavaScript ecosystem support is being spun off in its own
repository. The new home is https://github.com/digital-asset/daml-js

For further details, here is the counterpart issue in the new repo:

https://github.com/digital-asset/daml-js/issues/1
2019-04-25 14:30:25 +02:00
Leonid Shlyapnikov
cf3227938c Release codegen front-end shaded binary, #615 (#617)
* Release codegen front-end shaded binary, #615

* Fix bazel formatting
2019-04-19 14:24:57 +00:00
Leonid Shlyapnikov
4458a81e83 Unify Scala and Java Codegen Inputs (#585)
* Extract codegen-common module, #166

* Scala Codegen Main using the same option parser as Java Codegen, #166

There is one important difference, Scala Codegen does not allow mapping
dars to different package names, all dars have to be mapped to the same
package name.

Replace Scala Codegen println's with scala logging, respecting the
configured codegen verbosity

* Fix bazel formatting

* Update the release dry run script

* Releasing codegen-common

* Improving Scala Codegen error reporting (code review)

* Addressing codereview comments

* Make it explicit that we skip not supported option
2019-04-18 19:04:57 +00:00
Gerolf Seitz
7f8dbfeca0 Add CreateAndExercise command throughout the stack (#563)
* Add release notes entry

* Add CreateAndExercise command to Java Bindings data layer

* Add CreateAndExercise command to DAMLe

The CreateAndExerciseCommand allows users to create a contract and
exercise a choice on it within the same transaction. Users can use this
method to implement "callable update functions" by creating a template
that calls the update function in a choice body.

Fixes #382.

* Add CreateAndExercise command handling to the sandbox

* Add CreateAndExercise command to the Ledger API
2019-04-18 16:05:16 +00:00
Leonid Shlyapnikov
f39b7a5d3f Update Scala Codegen SBT Example (#558)
* Update scala codegen sbt  example to use the latest codegen binaries

Use DAR to generate Scala code, no reason to unzip DALFs.

* Add support for `DA.sdkVersion` system property.

To override the default sdkVersion:
```
> sbt -DDA.sdkVersion=100.12.6 compile
```

* Simplify the way examples run
2019-04-18 13:49:53 +00:00
Martin Huschenbett
7d346e2299 Rename DA.Private.TextMap into DA.TextMap (#573)
* Rename DA.Private.TextMap into DA.TextMap

Also clean up the code a bit.

* Add Ord instance for TextMap back

* Fix language server test
2019-04-17 17:51:36 +00:00
Remy
e6dbb07921
language-support: fix ScalaCodeGenIT test (#425) 2019-04-16 19:03:15 +02:00
Leonid Shlyapnikov
d0d691765b
Remove compiler option that turned off fatal-warnings (#549)
* Remove compiler option that turned off fatal-warnings

The deprecated calls have been already addressed by someone
else.

* Remove `-deprecation` it is enforced throught common_scalacopts
2019-04-16 12:27:39 -04:00
Gerolf Seitz
f1b077dd1a
Remove blocking call in Bot.wire (#521)
The call to blockingGet can lead to no progress being made in certain
scenarios. Therefore I am removing the blocking call and replacing it
with a regular "doOnSuccess".
2019-04-16 11:53:29 +02:00
Leonid Shlyapnikov
bdb5160403
Multiple fat DARs scala/codegen support, #109 (#366)
Add Dar Traverse and Equal, replace manually written test cases with
scalaz law checks;
Add test case for multiple DARs support;
Enforcing non empty list of input files
2019-04-15 17:12:07 -04:00
moritzkiefer-da
ec46b8cec5 Add codegen to integration tests (#494) 2019-04-15 17:53:05 +02:00
gleber
aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* Add buildifier targets.

The tool allows to check and format BUILD files in the repo.

To check if files are well formatted, run:

    bazel run //:buildifier

To fix badly-formatted files run:

    bazel run //:buildifier-fix

* Cleanup dade-copyright-headers formatting.

* Fix dade-copyright-headers on files with just the copyright.

* Run buildifier automatically on CI via 'fmt.sh'.

* Reformat all BUILD files with buildifier.

Excludes autogenerated Bazel files.
2019-04-12 13:10:16 +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
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
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
Stefano Baghino
fa5c704e7e
Map Protobuf's 64 bit integers to strings in JS (#324) 2019-04-09 15:19:32 +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
Leonid Shlyapnikov
0aea22a507
delete scala/codegen-sql-support and all related tests (#294) 2019-04-08 12:41:09 -04: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
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
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
Robin Krom
a8b2d30b3d
Stdlib package (#229)
language: ship daml-stdlib as a package
2019-04-05 18:11:13 +02:00
Nick Smith
3183973ab9
Fixes #226 java-codegen: Exapnd List integration tests (#244) 2019-04-05 12:50:31 +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
Stefano Baghino
f275b0c471 Add verbosity option for Java codegen (#218)
Allows users to supply the argument -V or --verbosity with a number from 0 to 4 for additional logging.

Also, the first and last log message is logged as a warning, when it really
should just be on INFO level.
2019-04-05 10:54:42 +02:00
Stefano Baghino
da93a86104 Document IDE support for language-support/js
Closes #67
2019-04-05 14:00:33 +11:00
Brian Healey
55fb9a9baf #233 remove changelogs from bazel files 2019-04-04 16:51:56 -04:00
Brian Healey
0205a1a932 #233 remove changelogs 2019-04-04 16:08:52 -04:00
Francesco Mazzoli
9c7357c7de update all references of old repo to new repo 2019-04-04 16:20:07 +02:00
Gabor Aranyossy
ab72aab696 fixes inconsistent help about Sandbox port
changing ports to use 6865 everywhere

no need for default ports

addressing missed outdated ports

changed more ports from 7600 to 6865

dealt with more 8080s
2019-04-04 13:03:48 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00