Commit Graph

662 Commits

Author SHA1 Message Date
Michał Majcherski
e6c7421580
windows: CI agent diagnostics (#1146) 2019-05-15 11:59:56 +02: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
Moritz Kiefer
41968cb4f7 Fix filename of Data.Conduit.Tar.Extra (#1143)
Somehow, I managed to accidentally use the weird . syntax in the
filename instead of moving it to the proper location.
2019-05-15 09:40:55 +01:00
Martin Huschenbett
0851a00f20 Don't expose TextMap type via the Prelude anymore (#1144)
This is not the perfect fix since the definition `data TextMap` is still
living in the wrong module, see issue #1142. However, this PR forces people
to import `DA.TextMap` when they want to use the `TextMap` type, which is
the desired behaviour for the future.
2019-05-15 08:34:44 +00:00
Gabor Aranyossy
60b608288d removing println (#1140) 2019-05-15 07:44:54 +00:00
Shayne Fletcher
c135ccfa6b Upgrade to ghc-lib-0.20190514.1 (#1139)
* Upgrade to ghc-lib-0.20190514.1

* Whitespace fix.
2019-05-15 06:34:58 +00:00
Gary Verhaegen
8ae2ba014d small tweaks to docs generation (#1126)
- Set reasonable timeout. We want this to run once per hour, so it
  should never run for longer than that.
- Fix gcp deploy command to target the right directory. That somehow got
  lost in the manual changes between the PR and what I was manually
  running on CI.
- Keep the not-found page intact, so as to not break 404 responses.
- Retry up to ten times to install nix packages, for each version. Nix
  package download can be a bit flaky, especially when we download large
  collections of packages (e.g. texlive), and Bazel is very unforgiving
  towards flaky nix downloads so instead we now preload all the packages
  before invokin Bazel.
2019-05-14 20:52:54 +00:00
Moritz Kiefer
ad10f98020
Fix SDK integration tests on Windows (#1125)
* Fix SDK integration tests on Windows

* Switch to Haskell-based tar extraction
2019-05-14 21:55:45 +02:00
Neil Mitchell
41697cecbd
Support CPP in the IDE (#1131)
* Hide ghc-boot by default

* Add support for CPP

* Delete redundant comment
2019-05-14 20:00:19 +01:00
Remy
c7df212d42 Daml lf type safty (Decimal) (#1098)
* daml-lf: make Decimal type safe

* daml-lf: create Utf8String type

* daml-lf: cleanup in data package

* Address Stephen Comments

* daml-lf: remove UTF8String
2019-05-14 18:10:45 +00:00
Neil Mitchell
388a2b49f7
Add utility function for the IDE Logger (#1132) 2019-05-14 16:51:20 +01:00
Michał Majcherski
fdbc1f51ce
windows: fixed daml-lf tests for Windows by using Bazel's rlocation (#1053)
* windows: fixed daml-lf tests for Windows by using Bazel's rlocation

* more consistent logging on CI; publishing Windows test logs on failure

* windows: fix daml-lf engine tests

* windows: add diff tool to msys
2019-05-14 16:18:55 +02:00
Gary Verhaegen
91f2414ddb build docs for all releases (#1116) 2019-05-14 12:25:02 +00:00
Beth Aitman
befcb0995c Move release note (#1113) 2019-05-14 11:40:26 +00:00
A. F. Mota
f72fdf3552 Better error handling in get-daml.sh (#1121)
* Better error handling in get-daml.sh

* Use set -eu

* Review suggestions

* ORIGDIR is unused.
2019-05-14 10:54:05 +00:00
Francesco Mazzoli
186cf14729 fix duplicate contract ids when loading scenarios with pass (#1105)
* rename --jdbcurl to --postgres-backend

* increment ledger end correctly when loading from scenarios

fixes #1079
2019-05-14 10:05:43 +00:00
Moritz Kiefer
99a7b24b3b Add an option to not modify PATH in daml install --activate (#1119)
* Add an option to not modify PATH in daml install --activate

This is particularly useful in test suites where you install to a
temporary directory that should not be added to the registry.

* Use yes/no/auto

* Make check more robust
2019-05-14 09:01:35 +00:00
Francesco Mazzoli
7a1583782b remove debugging output in Speedy.scala (#1118)
fixes #1090
2019-05-14 08:08:56 +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
A. F. Mota
838b81d3da
Make daml version display installed SDK versions like da list. (#1114)
* Separate version logic out of DAML.Assistant.Env.

* Refactoring some of the exception handling.

* Update daml version command.

* Uncommit linting atrocity.
2019-05-14 08:46:55 +02:00
Gary Verhaegen
a244579470 set default page for docs (#1102)
This mirrors the current behaviour of docs.daml.com.
2019-05-13 22:34:21 +00:00
Beth Aitman
1b6df13861 Improve docs flow (#1101)
* Improve docs flow

* Move integration kit as Simon requested

* Update daml-foundations/daml-ghc/base-rst-prefix.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
2019-05-13 18:24:18 +00:00
A. F. Mota
f7a0dd250a Open browser on daml start. (#1103) 2019-05-13 17:36:08 +00:00
Stephen Compall
c6a382db70 warn on use of 'return' Scala keyword; remove most usages (#956)
*  enable Return wartremover wart

* remove return keyword from various places in daml-lf

* remove return keyword from various places in ledger

* simpler ImmArray equals

* move traverseEitherStrictly to point of use

* remove return from ledger-api-server-example
2019-05-13 17:10:29 +00:00
Beth Aitman
8c8bd5e6b9 Full documentation for the new assistant (#740)
* First draft of new assistant docs

* Quick pass to fix up references

* Apply suggestions from code review

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

* Apply suggestions from code review

* Fix links

* Fill out assistant docs somewhat

* Update docs/source/tools/extractor.rst

* Update quickstart guide from #720

* Fixes

* daml new changes

* Update docs/source/getting-started/quickstart.rst

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

* Fix build

* Fix todos about protobuf

* Final tidying up

* Add installer link

* Apply suggestions from code review

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

* A couple of corrections

* Add release note

* Fix release notes

* AAAAAAAAAARGH
2019-05-13 16:33:59 +00:00
Neil Mitchell
50bcb853ea
In the language server tests, write out what fails (#1111)
This is not a good way to go, but it's all we've got, since Bazel deletes the ACTUAL file. Should almost certainly be done better, but these tests are dying at some point and it's better than nothing (which is what we had before).
2019-05-13 16:52:26 +01: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
Gabor Aranyossy
496cf5069f
Re-revert) "Ledger API Server refactor" (#1109)
* Revert "Revert "Ledger API Server refactor (#1077)" (#1096)"

This reverts commit e2fa13e62b.

* fixing race conditions why resetting the ledger
2019-05-13 17:23:03 +02:00
Andreas Herrmann
e428618f03
Update rules_haskell (#1106)
Some of the patches against rules_haskell and Hazel can now be dropped
as they've been merged upstream.
2019-05-13 16:59:58 +02:00
Moritz Kiefer
f744c7a9cd
Log SDK version in "damlc ide" (#1095)
This can be quite useful for debugging which version is actually being used.
2019-05-13 16:39:58 +02: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
A. F. Mota
0c621c0dbe Add ui-backend.conf to skeleton template. (#1104) 2019-05-13 13:29:54 +00:00
Moritz Kiefer
46747f00d2
Fix buildDar on Windows (#1100)
stripPrefix will fail when one path ends with / while the other ends
with \ which resulted in us never including .hi and .hie files on
Windows which breaks packaging. Moving to makeRelative seems more
appropriate and also fixes those issues.

This PR doesn’t add any new tests since packaging is already covered
by the integration tests and in fact I discovered these problems by
trying to make the integration tests work on Windows
2019-05-13 15:11:44 +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
Gabor Aranyossy
e2fa13e62b Revert "Ledger API Server refactor (#1077)" (#1096)
This reverts commit 17060b6225.
2019-05-13 10:31:14 +00:00
Michał Majcherski
f3055dd0cb ci: use windows-pool (#1069)
* ci: use windows-pool

* dev-env: add scoop reset to ensure env variables are correctly set
2019-05-13 09:20:21 +00:00
Gabor Aranyossy
17060b6225
Ledger API Server refactor (#1077)
* adding necessary @volatiles

* services are factored out

* no need for ResetService to stop the services before

* removing not needed callback methods

* mostly renaming things

* some further cleanup
2019-05-13 10:51:36 +02:00
Gerolf Seitz
199d0a4740 Update release instructions and add missing release label (#1078) 2019-05-13 08:04:20 +00:00
Andreas Herrmann
c3a651364f Handle module root . and non-normal source paths (#1073)
* Handle module root `.` and non-normal source paths

* Add regression test for #1048
2019-05-13 08:54:40 +02:00
Gary Verhaegen
5ab5ced2e3 add GCS bucket for docs (#1062)
This is a first step towards improving our docs release process. The
goal here is to get rid of the manual "publish docs" step. This is done
as a periodic check because we only want to run this for "published"
releases, i.e. the ones that are not marked as prerelease. Because the
act of publishing a release is a manual step that Azure cannot trigger
on, we instead opt for a periodic check.

Not included in this piece of work:
- Any change to the docs themselves; the goal here is to automate the
current process as a first step. Future plans for the docs themselves
include adding links to older versions of the docs.
- A better way to detect docs are already up-to-date, and abort if so.
- Including older versions of the docs.
- Switching the DNS record from the current AWS S3 bucket to this new
GCS bucket. That will be a manual step once we're happy with how the
new bucket works.
2019-05-11 03:27:17 +00:00
Shayne Fletcher
526df6fc82 Fix a silly spelling mistake in developer docs (#1089)
* Fix a silly spelling mistake in developer docs

* Another edit; missing command
2019-05-11 01:28:18 +00:00
Bolek@DigitalAsset
63960bfa85
webide: failing terminal (#1087)
* fail bash terminal by setting config to run bogus command
* one last fix for hiding terminal

Initially attempted to use external terminal with echo command but this
still opened an integrated terminal. Changing the terminal command from
/bin/bash to echo "No Terminal Available" crashes the integrated
terminal, which of course is better than having a working terminal!
2019-05-10 15:31:32 -04:00
Robin Krom
fac312dd40 language: fix: move interface files to a different (#1074)
* language: fix: move interface files to a different

This fixes https://github.com/digital-asset/daml/issues/1009. We move
the created interface files and hie files to a hidden directory
".interfaces" when creating a package.

* removing the ifaceDir option and hardcode the dir
2019-05-10 16:40:15 +00:00
A. F. Mota
2d682f489e Implement daml init command. (#1080)
* Started working on daml init.

* Implement daml init.

* Nicer messages and nicer field generation.

* Cleaning up a duped definition.

* Review revisions
2019-05-10 16:32:41 +00:00
Bolek@DigitalAsset
7e2398ca7f
web ide: security headers (#1063)
* web ide: security headers

includes security headers for content policy and other security related
features.

includes style fixes to hide terminal, debugger, and navigation widget.

* webide: update to latest sdk

* web ide: re-enable open widget, enable telemetry

* even though we know arbitrary commands can be run from the open
widget, it is too useful to disable

* raised issue where opting out of telementry causes critical errors in
the plugin. For now, we are enabling the telemetry by default (even
though it actually doesn't log anything because our network security
does not allow that traffic to go out)
2019-05-10 11:43:18 -04:00
Moritz Kiefer
4eb6bfa997 Document testing instructions for Windows (#1083) 2019-05-10 16:14:22 +01:00
Moritz Kiefer
ebb93556aa Include install.bat in release tarball (#1085) 2019-05-10 14:53:38 +00:00
Neil Mitchell
88d166d642
Add String compatibility helper (#1070)
* Add a Compatibility alias for String, for people coming from Haskell

* Clean up the deprecated messages, no point saying which DAML version given its no longer interesting information
2019-05-10 14:17:09 +01:00
Michał Majcherski
8fe6e2d564
windows: whole compiler, daml-lf, extractor and ledger builds + cleanup (#1044) 2019-05-10 14:13:30 +02:00