Commit Graph

293 Commits

Author SHA1 Message Date
K5
e340502097
Make get-daml.sh compatible with sh. (#750) 2019-04-29 09:13:33 +01:00
K5
d9f5097e67
Auto-installing requested SDK versions. (#692)
* Auto-install requested SDK versions.

* Avoid crashing if the requested sdk is missing (and auto-install is off).

* swap the default and the auto install

* Suggestions

* Explain why install messages go to stderr in one case.

* Lint error

* Determin running daml assistant version.

* Auto-update daml whenever assistant SDK version is less than auto-installed version.
2019-04-25 19:52:23 +01:00
Moritz Kiefer
edfd023b0b
Autoupgrade to newer vscode extensions (#703)
This PR changes `daml studio` to automatically install newer SDK
versions by default. The behavior can be overwritten to either force
the current SDK version (which should only be necessary if we break
backwards compatibility) or to not touch existing installations at all.
2019-04-25 17:53:47 +02:00
Moritz Kiefer
be30c35ef9
Fix daml start on Windows (#694)
* Fix daml start on Windows

* Automatically pass --scenario to sandbox
2019-04-25 15:06:54 +02:00
Moritz Kiefer
f9a438ffb7
Fix daml studio on Windows (#693)
There were two issues in `daml studio`:

1. We need to use `shell` instead of `proc` to launch VSCode.

2. Creating symlinks requires admin privileges on Windows so instead
we just copy the directory.

Note that `daml studio` will not install or upgrade the extension if
it is already installed (this fact is unchanged by this PR). We should
change this to upgrade to newer versions by default (and add an option
to not do this) but I’ll leave that for a separate PR.
2019-04-25 14:25:14 +02:00
K5
a28b44f95c Add script to download and install daml for Linux and MacOS. (#656) 2019-04-25 10:33:29 +00:00
K5
d1e8c3f9ef Forward sandbox arguments properly (and navigator & extractor). (#684) 2019-04-25 08:50:00 +00:00
Robin Krom
64290dc542 language: change default output dir of package command (#650)
* language: change default output dir of `package` command

This changes the default output path of the `package` and `build`
command from the project root to the `dist` directory.

* fixed daml-assistant integration tests
2019-04-25 02:53:15 +00:00
Gary Verhaegen
1780982fd6 add Windows tarball to github releases (#677) 2019-04-25 01:57:32 +00:00
K5
d97c099d03 Generate daml new config file from template (#652)
* Generate daml new config file from template.

* Use __VERSION__ instead of __SDK_VERSION__
2019-04-24 20:49:37 +00:00
Moritz Kiefer
1cc0126395 Disable echo in daml wrapper script (#655)
When echo is enabled (which is the default), the IDE can get really
confused since it tries to interpret the commands as LSP messages
which obviously fails.
2019-04-24 19:00:21 +00:00
K5
c0d1386329 Make daml new files writeable. (#642) 2019-04-23 19:02:01 +00:00
Moritz Kiefer
077e54042b
Fix daml wrapper on Windows (#624)
Apart from the fact that START was missing the windows title argument
it launches a new terminal window and then exits immediately (the
terminal windows is closed immediately as well) so it seems like the
wrong thing to use. Just calling the executable directly seems to work
fine both in cmd.exe and in powershell on my Windows 10 VM so
hopefully this is reasonably robust.
2019-04-23 10:12:12 +02:00
Moritz Kiefer
01602036f1
Build project automatically in "daml start" (#545)
* Build project automatically in "daml start"

This gives us an interface that more closely resembles "da start" and
is also more convenient for users.

* Make it clear what DamlAssistantPath points to
2019-04-16 18:12:31 +02:00
Fran
463029a078
Added daml assistant exec command. (#543)
* Added daml assistant exec command.

* Fix lint.

* Forward -h and --help as well.
2019-04-16 17:24:54 +02:00
Fran
0c10fafe69
Check SDK version before download and use redirect to find latest version. (#526)
* Add SDK version check before download.

* Get latest version from github, not URL directly.

* Prune unused parts of the Github API.

* Refactor AssetName out.

* Reorder the github module.

* Use redirect instead of GitHub API to get latest stable version.

* Do not limit number of redirects.

* Fix bazel rule

* Actually fix build rule
2019-04-16 15:26:24 +02:00
Moritz Kiefer
ac5bdc3a5d
Move Maven database to a separate rule (#527)
* Move Maven database to a separate rule

This should make sure that we get a cached version far more often and
thereby speed up the integration tests.
2019-04-16 14:37:39 +02:00
Moritz Kiefer
553cde8d02
Fix codegen integration tests (#510)
The codegen integration tests assume a specific location atm so we
need to specify that explicitely (eventually we might want to change
them to use the default location but not for now). The reason why we
didn’t catch this before merging the package-new command is that the
PR was not rebased on top of the changes that added the codegen
integration tests.
2019-04-15 21:22:59 +02:00
Robin Krom
0f2ac2d06d
language: new package command for damlc (#395)
* language: new package command for damlc

The (internal) package-new command reads all information from the
daml.yaml file of a DAML project and also creates the .conf file for the
package database and packs it with the dar.
2019-04-15 18:12:04 +02:00
Fran
b91535d287
Make install target explicit in daml install. (#498)
* resolve merge

* Be explicit about install target.

* Refactor InstallTarget type out.

* Change install target metavar.
2019-04-15 18:04:12 +02:00
moritzkiefer-da
ec46b8cec5 Add codegen to integration tests (#494) 2019-04-15 17:53:05 +02:00
Fran
f53788535e
Save a GitHub API call in daml install. (#492)
* Save an API call when installing specific version.
* Fix little errors.
* Typo
2019-04-15 16:25:40 +02:00
Fran
3a0aa90a1e
Fix example asset name in github install module. (#488) 2019-04-15 15:35:18 +02:00
Fran
1a70bf68cc
Install from GitHub releases! (#459)
* Install from GitHub releases!

* Revert make-capsule script.

* Refactor a little.

* Reviewer comments
2019-04-15 13:46:53 +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
Fran
6984d9765d
Make daml-head work outside of devenv. (#428) 2019-04-12 12:03:05 +02:00
Fran
938bc4ae25
Rename sdk config file to sdk-config.yaml (#407)
* Rename sdk config file to sdk-config.yaml

* Use sed in head release.
2019-04-12 12:01:48 +02:00
Nicolas Mattia
a059340cec
Set src_strip_prefix and expand deps in assistant (#408)
The `daml-assistant` BUILD file was missing an `src_strip_prefix` field
and abtracted away the dependency list for two of its targets. The
latter is not strictly needed and may lead to too many dependencies
being specified for the targets.
2019-04-11 18:16:26 +02:00
Fran
61d8459494
Simplify daml install & some refactoring. (#379)
* Get rid of channels.

* Refactor version code.

* Remove --initial flag.

* Update daml-assistant/daml-project-config/DAML/Project/Types.hs

Co-Authored-By: fmota-da <francisco.mota@digitalasset.com>
2019-04-11 13:58:49 +02:00
Fran
0a906867ab
Use isWindows for runtime checks. (#381) 2019-04-11 13:13:45 +02:00
Fran
92cfc27f56
Avoid symbolic links altogether on windows. (#377)
* Only handle and test symbolic links on unix.

* Don't create a symbolic link on windows.
2019-04-11 12:09:34 +02:00
Fran
c6fc75d17b Switch to unix-compat for now. (#376) 2019-04-11 10:20:23 +01:00
Fran
292d2b40b4
Moving to new version logic in daml-assistant. (#337)
* Use global SDK version for release tarballs.

* Use semver for sdk versions.

* Update daml-assistant/BUILD.bazel

* Code comments pt 1

* Switch to lens

* Update daml-assistant/BUILD.bazel
2019-04-10 12:06:38 +02:00
Fran
651593097f
Add filepath checks to tarball extraction. (#323) 2019-04-09 15:27:19 +02:00
Fran
18c7ca2bbf
Move daml-assistant logic out of daml-project-config. (#302)
* Move daml-assistant logic out of daml-project-config.

* Add DamlHelper versions of required and requiredE.
2019-04-09 15:09:10 +02:00
Fran
36c846d32c
Handle symbolic links in tarball installs. (#314) 2019-04-09 13:17:43 +02:00
Fran
bd671336d0
Prevent crash when .daml/sdk is missing. (#312) 2019-04-09 11:52:13 +02:00
moritzkiefer-da
4c4b945f10
Rewrite integration tests in Haskell (#286)
* Expose daml-helper as a library

* Rewrite integration tests in Haskell
2019-04-08 15:49:58 +02:00
moritzkiefer-da
84b1076d6d
Do not use docker for daml integration tests (#277)
Docker causes a few issues for us here which imho outweigh the
benefits for us atm:

1. It is quite slow since we have to rebuild the image everytime. We
could fix this by caching the image somewhere but even that is
somewhat annoying since Azure does not provide local caches so we
would have to push the image to some external service and fetch it
everytime which is still somewhat slow.

2. It does not work on MacOS (even if you have docker on MacOS it is
not going to work since you will try to install the MacOS release
tarball in a Linux docker container).

On the other hand, DAML assistant allows us to specify the
installation directory and we get a fairly clean environment on CI so
the additional isolation we get from Docker is not that important for us.
2019-04-08 10:38:11 +02:00
moritzkiefer-da
fd156c33df
Add daml start (#254)
* Add daml start
2019-04-05 19:34:23 +02:00
Fran
dcc8e51085
Fix issues with daml-assistant CLI. (#223)
* Make daml-asisstant forward --help as intended.

* Refactor command-line parser in daml-assistant.

* Fix issues with daml-assistant CLI.

* Misalign things for Martin.
2019-04-04 19:40:38 +02:00
Francisco Mota
9c044b0c26 Add progress bar to daml install over http. 2019-04-04 15:17:38 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00