Commit Graph

151 Commits

Author SHA1 Message Date
Moritz Kiefer
9df8c7878e Add link to deploy URL in daml ledger --help and daml deploy --help (#2451)
* Add link to deploy URL in  daml ledger --help and daml deploy --help

* Update daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
2019-08-08 08:41:22 +00:00
Moritz Kiefer
9cd58e24fa
Fix VSCode invocation in "daml studio" (#2445)
Despite, a lot of searching around, I couldn’t find any information on
why exactly quoting "code" causes issues but removing the quotes seems
to fix the issue ¯\_(ツ)_/¯
2019-08-07 16:38:03 +02:00
associahedron
0673ceecac Fix daml ledger navigator configuration. (#2430)
* Fix daml ledger navigator

* Add newline after dots
2019-08-06 17:57:52 +00:00
associahedron
8590dfacb9
--json flag for daml ledger list-parties (#2426)
* --json flag for daml ledger list-parties

* use TL.putStrLn

* lint
2019-08-06 15:37:53 +01:00
associahedron
342a620f98
Implement deploy in terms of allocate-parties and upload-dar. (#2422)
* implement deploy in terms of allocate parties and upload dar

* Update release notes
2019-08-06 14:46:27 +01:00
associahedron
72a7bc63a6
Organizing SDK ledger commands, adding ledger upload-dar and ledger navigator commands. (#2416)
* Add deploy-navigator command to daml helper.

* Rebase

* Organize ledger commands

* Sandbox /= Remote Ledger, should not use that config.
2019-08-06 12:41:43 +01:00
Moritz Kiefer
dd41683381 Escape shell arguments in daml-helper (#2417)
This fixes another case of spaces in usernames breaking things
2019-08-06 11:16:57 +00:00
Moritz Kiefer
656d8f4a19 Handle ExitCodeException in wrapErr (#2415)
This is thrown by typed-process when the child process exits with a
non-zero exitcode.

fixes #2414
2019-08-06 08:49:25 +00:00
nickchapman-da
d5a94625e8 daml deploy: small changes and code cleanup (#2398) 2019-08-05 15:48:47 +00:00
nickchapman-da
299d0c1b98
daml deploy, now with party management (#2384)
* daml deploy, now with party management

* address some review comments
2019-08-05 13:07:37 +01:00
Moritz Kiefer
705f014a88 Fix daml build for usernames with spaces (#2392)
* Fix daml build for usernames with spaces

This PR fixes two issues caused by having spaces in your username:

1. On Windows, we need to quote the path to the daml binary in the
batch wrapper (quotes are not valid in usernames, so no need to worry
about escaping them).

2. Invoking ghc-pkg via callCommand broke since shells are
terrible. Luckily, we can easily get away with just using callProcess
here.

* Update compiler/damlc/lib/DA/Cli/Damlc.hs

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
2019-08-05 08:49:40 +00:00
Gary Verhaegen
d45671f926
clarify help text on assistant (#2382) 2019-08-02 14:33:30 +01:00
Robin Krom
3db5230a43
language: put hash in package directories (#2268)
* language: put hash in package directories

We put the package id of the main dalf of a package into the directory
names, where we store the files of that package in the package database.
This way we make sure that two equally named packages don't overwrite
their dependencies and files.
2019-07-31 14:31:45 +02:00
Moritz Kiefer
50a04397e4
Supporting producing sdist tarballs for the HS ledger bindings (#2336)
* Supporting producing sdist tarballs for the HS ledger bindings

The README.md has an explanation for how you can use this.

This should hopefully allow others to experiment with the bindings.
2019-07-30 14:34:16 +02:00
nickchapman-da
b90862ebec
improve haskell module hierarchy to be more consistent (#2319) 2019-07-29 15:55:55 +01:00
associahedron
573424f561 Add a daml deploy integration test. (#2299)
* Add a daml deploy test

* Use different template for proj2 in daml deploy test

* added --host localhost
2019-07-26 15:26:15 +00:00
nickchapman-da
49e21660f1
support --host option for daml deploy command (#2285) 2019-07-25 12:26:07 +01:00
nickchapman-da
b30228ab95
{-# LANGUAGE OverloadedStrings #-} is now on by default (#2270) 2019-07-24 08:09:26 +01:00
Martin Huschenbett
d6b8ea17de Fix the source field in daml.yaml produced by daml init (#2250)
Currently, if you do `daml init foo` and there's a file `foo/Main.daml`,
you'd end up with a file `foo/daml.yaml` whose `source` entry is
`foo/Main.daml`when it should actually just be `Main.daml`.

This PR fixes this problem.
2019-07-22 16:56:36 +00:00
Robin Krom
c8e0f51e90
Address martin comments (#2242)
addressing martin's comments
2019-07-22 13:48:29 +02:00
Moritz Kiefer
e570c10599 Remove dependency on ghc from daml-helper (#2233)
GHCi gets confused if both ghc and ghc-lib are exposed and there is no
reason why we should depend on ghc here anyway.
2019-07-19 19:33:11 +00:00
Robin Krom
8dd80cf112
language: add a 'main' option to the migration command (#2229)
We add an additional argument "main" to the migrate command to put the
right main filepath into the project config.
2019-07-19 16:32:53 +02:00
nickchapman-da
c0d6ac2a24
minimal quick fix for quickstart template, and test! (#2224) 2019-07-19 08:57:21 +01:00
nickchapman-da
49a6607160
daml deploy: first version (#2176)
* daml deploy: first version

* fix build: replace callCommand with runProcess_

* abstract/share: doBuild, getDarPath

* hide deploy command for now

* make sandbox port configurable for both deploy & start daml-helper commands
2019-07-17 14:09:55 +01:00
Moritz Kiefer
623e641ec9
Wait for child process to exit in the daml assistant and daml-helper (#2162)
fixes #2142

It turns out that typed-process has the behavior we want so rather
than rolling our own version of `withCreateProcess`, I just switched
to that.
2019-07-16 18:21:00 +02:00
Robin Krom
aff7f1bc67
Generate interface files from dalf (#2151)
* language: upgrading: generating interface files
2019-07-16 13:46:43 +02:00
Gary Verhaegen
e2d9541c8c bundle vsix in sdk tarball (#2113) 2019-07-12 21:35:05 +00:00
Moritz Kiefer
23723a6fc4 Fix extraction of Maven tarball in integration tests (#2119)
extractTarball tries to restore the ownership stored in the
tarball. This goes wrong when the tarball is fetched from CI since the
uid/gid might not exist locally.
2019-07-12 10:04:31 +00:00
Moritz Kiefer
75ea177e87
Run exception handlers on SIGTERM in daml assistant (#2069) 2019-07-09 15:44:09 +02:00
Rohan Jacob-Rao
48f5153b74 Fix VSCode path for mac in daml assistant (#2051)
* Fix VSCode path for mac in daml assistant

* Release note
2019-07-08 22:26:36 +00:00
Michał Majcherski
3751ce9cee
Fix Maven calls in daml-assistant integration tests on Windows (#2027)
* Fix Maven calls in daml-assistant integration tests on Windows

* Cleanup daml-assistant integration tests
2019-07-08 16:38:35 +02:00
Moritz Kiefer
bb3a98bf61
Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
Andreas Herrmann
df7bff6288 Update to bazel-0.27 (#1957)
* Bazel: 0.24.0 -> 0.27.0

* Update rules_haskell for Bazel 0.27 compatibility

* Update bazel-deps and bazel-watcher

* Windows escape JVM flags

* load commands at top of .bzl file

Bazel 0.27 no longer allows load commands that are not at the beginning
of the file.

* Update Bazel rules

* subpackage boundary

* native is not defined in BUILD files

* yarn: @bazel/hide-bazel-files

Seems to be required since latest rules_nodejs version. Otherwise, yarn
fails with errors about existing BUILD or BUILD.bazel files.

* grpc-java plugin visibility

* Update fat_cc_library

* Nix Python3 toolchain

* Iteration over depset

* dev_env_package: Create symlinks one level deeper

To prevent symlinking the BUILD file as well. The nested BUILD file
confuses Bazel as of 0.27 and rules_nodejs cannot find the node
executable anymore.

* Update rules_nodejs

* Add managed_directories for node_modules

* hie-bios: Extract bazel-genfiles from bazel info

Bazel 0.27 changed the genfiles location which breaks the hie-core test
on macOS.

* update cc_wrapper to Bazel 0.27

* bazel info -> bazel info bazel-genfiles

* Fix typo in BUILD

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2019-07-05 14:04:47 +00:00
Moritz Kiefer
5087cc4be2
Bring release instructions up to date and inline test plan (#1972) 2019-07-02 15:53:37 +02:00
Fran
365ac2f94c
Use published extension by default in daml studio. (#1965)
* Use published extension by default in daml studio.

* Implement suggestions.

* Add release notes.
2019-07-02 11:29:19 +01:00
Moritz Kiefer
6bd76d80e1 Use the default dar path in the quickstart-java example (#1963) 2019-07-01 15:43:53 +00:00
Moritz Kiefer
af795d14ca Combine all artifacts output by damlc in .daml (#1959)
Fixes #1241
2019-07-01 15:07:30 +00:00
Robin Krom
e578f91efb
language: upgades: generate upgade code from dalfs (#1940)
* language: upgades: generate upgade code from dalfs

This switches the `migrate` command to read dalf files instead source to
generate upgrade code. The dalf files are read, data types are converted
back to haskell source, and from this we can generate generic instances
again.

There are two known issues that we want to address next:
  - Duplicate generic instance definitions will make the build fail.
  I.e this only works for data declarations that have no generic
  instances
  - Data declarations of the form `data Foo = Foo ()` can not be
  converted back to haskell source.
2019-07-01 14:44:53 +02:00
Andreas Herrmann
93d8e01db2
Update rules_haskell and static GHC (#1515)
* Update rules_haskell and static GHC

Remove patches that have been upstreamed or are no longer required.
Update still required patches to match the new rules_haskell version.

Previously we patched rules_haskell to coerce GHC into using static
Haskell libraries in most places. In particular we moved hs-libraries
entries into extra-libraries entries in the package configuration files.
A much cleaner approach is to compile GHC with a static RTS, then GHC
will by itself choose to load static Haskell libraries.

* Remove haskell_cc_import

* da-hs-daml-cli -> daml-cli

* da-hs-damlc-app -> damlc-app
2019-07-01 13:26:19 +02:00
Fran
074dadaf12 Use install script in integration test for unix. (#1952)
* Use install script in unix integration test.

* Fix waitForProcess
2019-07-01 09:21:04 +00:00
Michał Majcherski
7878120d5b
Fix hanging FFI call to scenario service problem on Windows (#1868)
* windows: hanging GRPC FFI call problem resolution

* windows: fix visual test

* windows: enabled back again some of disabled daml-assitant tests

* marking daml_ghc_integration_test as large
2019-06-26 11:45:52 +02:00
Robin Krom
05d80eeeb4
language: upgrades: no generics for data types having the instances already (#1840)
language: upgrades: dont derive generics for data types having the instances already

We only derive generic instances on the fly for data types that don't
have them already.
2019-06-25 18:17:34 +02:00
Fran
ce03f6a514
Remove navigator configs (#1859) 2019-06-25 12:32:03 +01:00
Fran
1648bba736 Exit from daml start if on-start command returns non-zero code. (#1857) 2019-06-25 09:45:08 +00:00
Fran
4cf5343dbb
Add support for da_haskell_repl targets in da-ghci (#1847)
* Add support for haskell_repl targets in da-ghci

* Change default target

* Revert newline loss.

* bazel fetch before bazel query

* Make a top level repl target the default.

* Add da_haskell_repl dependency in //BUILD

* Fix syntax error

* Fix bazel formatting...

* Rename DamlHelper modules to make //:repl work

* DamlHelper -> DamlHelper.Run

* Update the import in DamlHelper.Main

* Fix bazel rules again

* Update DamlHelper import in integration-tests
2019-06-24 16:39:41 +01:00
Robert Autenrieth
868a72b93a
Add support for DAML_PROJECT in Navigator (#1458)
* Add circe-yaml

* Add new helper library to load SDK config files

* Add support for DAML_PROJECT in navigator

Fixes #1128
2019-06-24 17:06:20 +02:00
Fran
d8c6239edc
Add options for scripting with daml start (#1837)
* Add more options to daml start

* Add release note for new options.
2019-06-24 14:57:01 +01:00
Fran
6318b3f858
Handle SIGINT in daml commands. (#1807)
* Raise UserInterrupt whenever SIGTERM happens when spawning processes in daml-helper.

* Avoid redundant installSignalHandlers

* Copyright header

* Update lint rules.

* Move installSignalHandlers to main
2019-06-24 08:25:12 +01:00
Robin Krom
b91c95d268
Write generic instances to separate modules on the fly (#1804)
* language: generate module containing generic instances

The migrate command generates generic instances of data types and puts
them in a separate module. For now this only works if the data type
doesn't have a generic instance already, we'll deal with this case in
the next PR.
2019-06-21 17:37:13 +02:00
Fran
728c1c9204
Implement daml install --install-assistant flag. (#1761)
* Add --install-assistant option

* Better doc on iActivate

* Determine whether to install assistant based on new flag

* Fix logic and update install warning

* Remove --activate from install.sh

* Add missing ]

* Change deprecation warning.

* Add release notes for new option.

* Update help text for install-assistant

* Fix release notes
2019-06-19 14:00:13 +01:00