Commit Graph

483 Commits

Author SHA1 Message Date
Moritz Kiefer
4b7d7d2149
Remove dev-env tests (#883)
We don’t run these tests anywhere and they don’t test anything useful.
2019-05-03 14:17:50 +02:00
Neil Mitchell
3ee6f4f096
Fix prettyRange so it prints ranges like it used to (#882)
Before it was garbled and wrong:
Range:    Range Start: Position Line: 2Character: 15End:   Position Line: 2Character: 15

After it's correct and like it was before:
Range:    3:15-3:17
2019-05-03 12:49:51 +01:00
Beth Aitman
78b586d5be some broken formatting (#872) 2019-05-03 11:16:16 +00: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
Moritz Kiefer
45101fe0f9
Release 0.12.14 (again) (#874)
Apparently I haven’t had enough coffee and forgot to update the
VERSION in the previous commit …
2019-05-03 11:27:46 +02:00
A. F. Mota
e8ebbe6c91
Disable version nagging and avoid looking at unnecessary information in daml install. (#857)
* Do not ask user to install when they are already running the install command.

* Avoid looking at unecessary information when doing daml install.

* Update daml-assistant/exe/DAML/Assistant.hs

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>

* Remove unnecessary import.
2019-05-03 11:06:34 +02:00
Robert Autenrieth
44e43aa620 Reject running sandbox with --scenario and -w (#840)
Scenarios are always run in static time mode.
This change prevents users from thinking the scenario
was run in wallclock mode.
2019-05-03 10:38:03 +02:00
Stephen Compall
f5490a5454 add LF 1.dev "minor dev version" (#709)
* clean up v3 contract key case in TransactionVersions

* clean up duplicate cases in ValueVersions.assignVersion

* make LanguageMinorVersion a proper ADT, aliased LanguageVersion.Minor

* port DecodeV1 to LanguageMinorVersion ADT via implicit conversion

- @remyhaemmerle-da might prefer the explicit application of Stable/Dev

* make releasePrecedes private

* add dev versions to the timeline

* copyright header for LanguageMinorVersion

* build the package database for 1.dev, support 1.dev as --target

* test presence and new-ness of "dev" in timeline

* report dev versions in engine info; note 1.dev target in release notes

* spec and governance rules on 1.dev and minor dev in general

* make the governance rule about dev more direct

* 1.x

* missed plural; thanks @leo-da

* further definition of 1.dev in LFv1 spec; thanks @remyhaemmerle-da
2019-05-03 10:36:45 +02:00
A. F. Mota
12e8baa93f Simplify daml new template release process and add a simpler default template. (#850)
* Skeleton template.

* Add quickstart-java template.

* Update release rule

* Add Main.daml in skeleton template.

* Change default template for daml new.

* Update templates/BUILD.bazel

* Fix bazel rule formatting.

* Update integration test to use quickstart-java template.
2019-05-03 08:17:15 +00:00
Moritz Kiefer
b081a8320f
Release 0.12.14 (#870) 2019-05-03 09:31:16 +02: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
0b5630bbe6
Save more useless lambdas during conversion to DAML-LF (#869)
Use the trick from #866 again to avoid a few more lambdas which are
immediately supplied with an argument.
2019-05-03 08:46:40 +02:00
DavidM-D
9da8e91358 Restored filepaths to their error messages (#862) 2019-05-03 08:33:56 +02:00
Moritz Kiefer
345128f10c
Don’t open a new terminal in the Windows installer (#865)
ExecWait will run the command in a new terminal which looks fairly
ugly and also makes it impossible to see what has been written to that
terminal since it closes automatically. nsexec::ExecToLog on the other
hand will write to the standard log Window in the installer which
seems much nicer.
2019-05-03 07:57:14 +02:00
A. F. Mota
0353c26929 Make the new version check time configurable. (#859) 2019-05-03 00:24:06 +00:00
Brian Healey
805b54a2b1 Update version in Pipfile.lock (#867) 2019-05-02 23:38:45 +00:00
Neil Mitchell
4b89903a73 Delete the id function (#851)
* Delete the `id` function

* Fix documentation that referred to id

* Fix some DAML-LF tests that relied on id
2019-05-02 22:57:52 +00:00
Martin Huschenbett
2b870ec261
Avoid producing a few useless lambdas during conversion to DAML-LF (#866)
* Avoid producing a few useless lambdas during conversion to DAML-LF

This also removes a bit of code duplication by factoring out a common
pattern.

There are far more places where this technique can be applied. I'll do so
in a follow up PR.

* Fix location information

The location information in `LArg` is meant to be for the function the
argument is applied to. Hence the first change was wrong. Since
`withTmArg` is not particularly useful when you want to apply the
expression passed into the continuation using `EApp`, we drop the
location information on the floor.

* Lift withTyArg and withTmArg to the top level

* Fix type error
2019-05-02 23:43:42 +02:00
Brian Healey
ed22a1e061
Update urllib version to avoid security vulns warning (#864) 2019-05-02 15:39:32 -04: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
Neil Mitchell
176f8f415e Improve the error message if we can't find the file (#858) 2019-05-02 19:16:32 +00:00
Martin Huschenbett
9bc0d63318
Export to/fromTextMap from DA.Experimental.TextMap (#861)
I forgot to export them in the first version of the module.
2019-05-02 20:35:16 +02:00
Martin Huschenbett
6006f4f3e8
Add DA.Experimental.Set data type based on DA.TextMap (#860)
* Add DA.Experimental.Set data type based on DA.TextMap

`DA.Experimental` provides a set data type with the same API as `DA.Set`,
modulo `MapKey` vs `Ord` constraints. The type is intensionally not a
newtype wrapper around `DA.Experimental.Map` to avoid that consumers of the
Ledger API have to wrap all sets into two layers of newtypes.

* Add from/toTextMap

* Add DA.Experimental.Set to LibraryModules

* Explain why Set is not a newtype wrapper around Map

* Add Show instance
2019-05-02 20:18:45 +02:00
Neil Mitchell
0b184ee3b6 Deal with NUL bytes in strings (#844)
* Make all Text tests be qualified to Scenario

* Remove the big list of tests from Text test

* Add DA.Text.reverse

* Move LitString decoding out to UtilGHC

* Rename the functions to match their GHC counterparts

* Fix pretty printing of LF strings containing weird characters, e.g. NUL or "

* Move to using an unpackCStringUtf8 which copes with GHC-style nuls

* Add lots of tests around NUL characters

* Use a safer CString function
2019-05-02 17:33:07 +00:00
Jussi Mäki
9d66ee4fa2
Release version 0.12.13 (#856) 2019-05-02 18:49:43 +02:00
A. F. Mota
e37d3eca9c
Pass project path as argument to vs code in daml studio. (#852)
* Pass project path (or cwd) as argument to vs code in daml studio.

* Remove unnecessary windows command tweak.
2019-05-02 18:21:55 +02:00
Moritz Kiefer
bf9126a480
Cleanup package-db rules (#846)
I vaguely recall that I tried doing this at some point and couldn’t
get it to work without all the retaring but it does seem to work just
fine now so I’ll happily take the simplification.
2019-05-02 17:31:44 +02:00
Jussi Mäki
746c69255e
Move out classes from participant-state package object (#849)
Having the classes specified in the package object makes the
unusable from Java.
2019-05-02 17:16:27 +02:00
Martin Huschenbett
ff476dee46
Add exerciseByKey to export list of DA.Internal.Template (#847) 2019-05-02 16:36:06 +02:00
Francesco Mazzoli
cf89366ac6 respect contract visibility when looking up contract keys (#753)
* remove outdated flags from comments

* update tests in preparation for visibility rules

* check visibility of contract keys, fixes #751

* add release notes

* include visibility check in scenario runner

* stephen's suggestions

* fix type error in api server example

* scalafmt

* bring TransactionFiltration.scala up to speed with disclosure

see
<faf1cde1a1/ledger-api/grpc-definitions/com/digitalasset/ledger/api/v1/event.proto>
for an in-depth description. fixes #794.

* add tests for contract key visibility

* move a lot of ledger testing utils out of command checks

* move a lot of ledger testing utils out of command checks

* remove useless checks regarding divulgence

* add tests regarding event witnesses

* update release notes

* re-introduce safety when disclosing
2019-05-02 14:02:30 +00:00
Moritz Kiefer
549fdf65eb
Fix path to daml in windows installer (#842)
It turns out my suspicion that the tar plugin was the thing that
messed up paths was completely correct. However, I messed up the PATH
to daml which resulted in me still running the old binary.

I’ve fixed the path and also moved to a temporary
directory (PLUGINSDIR seems like the easiest option for that) so that
things are cleaned up automatically by nsis.
2019-05-02 15:17:34 +02:00
A. F. Mota
aa2d7a8dff
Add outdated version warnings in daml-assistant. (#758)
* Add outdated version warnings

* Fix stable version calculation.

* Cache latest sdk version.

* Rename test1 and test2.

* Catch HttpExceptions and TLSExceptions where appropriate.
2019-05-02 15:12:31 +02:00
Gabor Aranyossy
c501d64264
fixing bug for mishandling potential offset gaps (#802)
* hedging against possibly gaps in offsets

* doing the math right

* adding some notes

* extracting pipeline logic
 Please enter the commit message for your changes. Lines starting

* extracting "run until" logic to be testable

* testing _run until_ logic

* adding release note

* copyright

* adding link to PR

* changing lookUpByTransactionId to use TransactionPipeline

* fixing issue identified by Extractor tests
2019-05-02 15:00:41 +02:00
Remy
7da2791bb0 daml-lf: revisit implementation of list builtins (#789) 2019-05-02 14:41:41 +02:00
Martin Huschenbett
3afd492110
Fix some typos on the contract keys section of the DAML-LF spec (#841) 2019-05-02 14:40:29 +02:00
Martin Huschenbett
9a66804104
Cleanup contract keys tests (#838)
Remove a duplicate test and use our custom surface syntax for it.
2019-05-02 14:35:12 +02:00
A. F. Mota
087b2c4f3f Use open -a on mac for daml studio. (#836) 2019-05-02 14:11:29 +02:00
Moritz Kiefer
7b81d69f2f
Include files directly in the windows installer (#832) 2019-05-02 12:02:18 +02:00
Andreas Herrmann
3f3bd4b1bb Update rules_haskell (#828)
- Includes -optP response file patch
- Removes noise around version macros
2019-05-02 09:54:24 +00:00
Moritz Kiefer
6ac0931a25
Fix daml studio on Windows if .vscode/extensions does not exist (#829) 2019-05-02 11:13:09 +02:00
Moritz Kiefer
b0478bbdbe
Fix permissions in "daml new" (#827)
* Fix permissions in "daml new"

I accidentally added the permissions stuff to the wrong use of copyDirectory
2019-05-02 10:22:06 +02:00
Neil Mitchell
536b1ea87f Explicit export lists in the DAML-LF Haskell module (#813)
* Delete an entirely unused module

* Delete an entirely unused module

* Switch the compiler to use EUnit over mkEUnit

* Delete an unused module

* Whitespace only

* Clean up the API for World, don't expose the internals, better creation functions

* Clean up the type checker environment, don't expose the internals of Gamma, add a few helper functions

* Delete unused functions

* Explicit module export lists

* Fix the nub replacement hints

* Turn on the warning that we require module export lists

* Add an explicit export list
2019-05-02 10:12:31 +02:00
Jost Berthold
935155c35f
Hotfix damldoc render fixes (#812)
* HOTFIX damldoc: two tweaks to avoid rendering invalid rst

* HOTFIX damldoc: retain whitespace for text, escape names,too

* HOTFIX damldoc: add tests for modified rendering

* adjust code for renamed choice parameter
2019-05-02 08:55:51 +10:00
Shayne Fletcher
1d81e3e429 Enable -Wprepositive-qualified-module (#823) 2019-05-01 21:09:38 +00:00
Neil Mitchell
4040dffc7a
Start cleaning up pretty-print (#821)
* Move from prettyDiagnostic to prettyDiagnostics

* Remove as much pretty print stuff as we can

* Try moving duplicate named functions with similar semantics and identical types to different names

* Change to returning pretty printed outputs from Diagnostics

* Remove a redundant import
2019-05-01 19:06:00 +01:00
Florian Klink
56c322c982 infra: add some docs / comments (#796)
* infra: document google_storage_bucket_iam_member resources

* infra: document nix-cache-info file

* infra: document who's maintaining the DA ext certificate

* infra: README: mention azure pipeline agents

* infra: README: IT -> DA IT
2019-05-01 15:54:09 +00:00
Bolek@DigitalAsset
a632291d9a
webide: handle proxy errors (#809)
The webide proxy did not properly handle critical errors when sockets
were interrupted. This fix catches all errors and resets session state
and proxy appropriately.

Removed more functionality from Preferences menu
2019-05-01 10:33:49 -04: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
Neil Mitchell
5ed95bc64c
Move DA.Pretty into da-hs-base (#818)
* Move DA.Pretty into da-hs-base

* Bazel formatting

* Remove another instance of da-hs-pretty
2019-05-01 14:50:19 +01:00
Neil Mitchell
1b146a273b
Delete unused Haskell modules (#817) 2019-05-01 13:58:22 +01:00