Commit Graph

662 Commits

Author SHA1 Message Date
Neil Mitchell
df02a5399f Avoid using package imports (#924)
* Hide the package ghc-boot-th by default

* Don't use package imports in haskell-ide-core
2019-05-05 21:22:15 +02:00
Moritz Kiefer
9deb4ae7b2 Revert "Upgrade to nixpkgs 19.03 (#871)" (#917)
This reverts commit 3d8acde916.

For some reason that commit seems to have resulted in a lot of
"unexpected end of file" errors during cache downloads. I do not know
what is going on here or how to fix it so let’s revert it for now.
2019-05-05 09:10:20 +00:00
Gary Verhaegen
e95575b033 install StackDriver on build machines (#905)
Requested by Security
2019-05-04 22:55:51 +00:00
Moritz Kiefer
3d8acde916 Upgrade to nixpkgs 19.03 (#871) 2019-05-04 20:01:48 +00:00
Neil Mitchell
fe3e5c9639
Delete DA.Prelude (#914)
* Use DA.Prelude a lot less

* Make LANGUAGE pragmas have the right case

* Don't reexport DA.Prelude

* Remove more DA.Prelude imports

* Remove the nastiest renaming DA.Prelude

* Final removal of DA.Prelude

* Kill DA.Prelude

* Add missing dependencies

* More missing package imports

* More missing package imports

* Update compiler/daml-lf-ast/src/DA/Daml/LF/Ast/Base.hs

* Update compiler/daml-lf-ast/src/DA/Daml/LF/Ast/Base.hs
2019-05-04 18:51:56 +01: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
Neil Mitchell
3cab59ad6d Remove completely redundant imports of DA.Prelude (#911)
* Remove completely redundant imports of DA.Prelude

* Start chipping away at some NoImplicitPrelude too
2019-05-04 12:40:07 +00:00
Neil Mitchell
f256ef09c4 Delete modules that appear entirely unused (#909) 2019-05-04 11:54:27 +00:00
Moritz Kiefer
89d2a3c080 Shorten data-default-instances-dlist target name (#908)
This PR copies the hack that I used for the other
data-default-instances-* packages to data-default-instances-dlist. The
exact conditions under which this seems to be required probably depend
on things like your username and the directory of your project which
is why this failed for Neil but not for me.
2019-05-04 11:06:23 +00:00
Neil Mitchell
e36e1074e0 Rename the runTests function to main, since it serves as a main (#910) 2019-05-04 09:37:23 +00:00
Martin Huschenbett
c9bf9e02fc Make record constructors in contract keys work (#907)
* Make record constructors in contract keys work

Currently, they don't always work because we don't inline record constructors
aggressively enough. The PR address this flaw by inlining more constructors.

Fixes #890.

* Remove left over comment
2019-05-03 22:22:15 +00:00
Martin Huschenbett
f667954323 Support the inline return type syntax for recursive functions (#904)
* Support the inline return type syntax for recursive functions

Currently, the inline return type syntax does not work for recursive
functions as it produces a locat letrec which the compiler can't handle
yet. The PR works around this problem by doing a very limited form of
lambda lifting.

This fixes #747.

* Apply Neil's suggestions
2019-05-03 21:32:48 +00:00
Martin Huschenbett
4df1ccfa13
Improve documentation for DA.TextMap.merge and DA.Next.Map.merge (#902)
Leave an explanation of what the functions is actually doing.
2019-05-03 21:48:43 +02:00
Martin Huschenbett
0ebdcb961e
Add fromListWith and merge to DA.TextMap and DA.Next.Map (#898)
Also, resurrect the tests we had for both functions when we still tested
`DA.Map`.
2019-05-03 20:41:11 +02:00
Martin Huschenbett
efe5907c20
Remove an unnecessary special case regarding strings from the compiler (#900)
There's no need for this special case since `convertExpr` will also fail on
string literals which are not surrounded by one of the special functions.
2019-05-03 20:39:55 +02:00
Martin Huschenbett
f155dbebee
Make daml-ghc test easier to debug by removing parallelism (#899)
I often end up in situations where I need to to look at the GHC Core or
the DAML-LF before type checking. In the current parallel setting they
ususally don't get written to disk before the first error pops up. By
running the compiler stages one after another, we make sure that the
outputs of successful stages can be written to disk before starting the
next stage.
2019-05-03 20:39:26 +02:00
DavidM-D
aacb94d798 Changed Diagnostics to FileDiagnostics (#897)
* Changed Diagnostics to FileDiagnostics

* Hlint fixes

* Fix tests

* Removed the lenses
2019-05-03 17:43:40 +00:00
gleber
c85503159b ledger-api-test-tool: uniquify command ids. (#884)
Add 'commandIdMangler' lambda to SemanticTester which forms command identifiers,
which can be passed via a constructor.
2019-05-03 16:46:15 +00:00
Bolek@DigitalAsset
c3550b4612
webide: add vscode settings to disable telementry (#825)
* webide: add vscode settings to disable telementry

* webide: remove keybindings

* Adding settings.json to webide server image, in order to disable
telemetry popup.

* clean webide 400 and 500 error messages (which reveal too much about
software)

* disable daml guidelines link until it can be fixed

* more hiding of content from front end
2019-05-03 12:04:30 -04:00
Martin Huschenbett
0a45bd71ac
Remove a few duplicate/unused main scenarios from daml-ghc/tests (#891)
Back in the day, every test case needed a `main` scenario and that was the
only scenario tested. Now, all scenarios are tested and hence a few of these
`main` scenarios are no longer necessary.
2019-05-03 17:44:35 +02:00
Martin Huschenbett
168191875d
Merge conflicting release-notes.rst changes automatically (#893)
... by keeping both entries.
2019-05-03 17:15:18 +02:00
Francesco Mazzoli
e8261f2fd9
clarify the role of party sets in various locations (#766)
* clarify role of party sets in various locations

* use 1.dev for tests...

...so that we're sure we're testing the latest value / tx versions.
2019-05-03 17:09:59 +02:00
Martin Huschenbett
16ea1ceacd
Add Functor/Applicative/Action instances for reader monad (#888)
* Add Functor/Applicative/Action instances for reader monad

This is possible because we dropped DAML-LF 1.0 support from the
compiler lately.

* Add release notes

* Fix language-server-tests
2019-05-03 17:01:09 +02:00
Martin Huschenbett
59abe7e384
Deprecate DA.{Map, Set} in favour of DA.Next.{Map, Set} (#886)
* Deprecate DA.{Map, Set} in favour of DA.Next.{Map, Set}

`DA.Next.{Map, Set}` were known as `DA.Experimental.{Map, Set}` until now.

We also remove the tests for `DA.{Map, Set}` because our test infrastructure
can't nicely deal with tons of deprecation warning. Since we're not going to
change these files anymore, this seems to be a fair trade-off.

* Fix code spans in release notes
2019-05-03 16:53:50 +02:00
gleber
e057265af4 LedgerApiTestTool: exit with success when doing '--extract' (#889) 2019-05-03 14:41:55 +00: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
Andreas Herrmann
7cf02b8579 Hazel: ./configure in build step (#848)
* Hazel: configure in build step

* Hazel: patch network

* Hazel: unpatch old-time

* Hazel: Don't remove c2hs
2019-05-03 13:51:43 +00:00
gleber
b3e2e10897 scenario-tester: Allow to mangle names used in scenarios before their executions. (#795)
* Allow to mangle names used in scenarios before their executions.

This allows to run a scenario against a long-running server repeatedly and avoid
clashes between runs, since each party is unique (up to the randomness used).

* ScenarioRunner: add test for partyNameMangler
2019-05-03 13:04:23 +00:00
Martin Huschenbett
debef0ec89
Upgrade the vscode version used by daml-extension (#878)
Bump from 1.1.24 to 1.1.33. This drops the dependency on a version of
`tar` with a security vulnerability.
2019-05-03 14:21:09 +02:00
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