Commit Graph

36 Commits

Author SHA1 Message Date
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
Sofia Faro
4a460973a2
Block concurrent SDK installations. (#9640)
* Block concurrent SDK installations.

Fixes #9612

changelog_begin
- [Daml Assistant] The assistant will now avoid
  installing SDK versions concurrently, waiting
  for the previous installation to finish before
  starting the next installation (if still
  necessary). This fixes a bug where the SDK
  would become corrupted because two
  installations were started concurrently.
changelog_end

* Remove filelock from stack-snapshot.yaml

* Update windows snapshot pin

* Add message if file lock is not immediately available.
2021-05-11 16:36:19 +00:00
Robin Krom
f2b53d49e6
assistant: get the latest sdk version form docs.daml.com (#8393)
* assistant: get the latest sdk version form docs.daml.com

We get the latest sdk version from docs.daml.com/latest instead of
github.com. Getting the latest release from github proved to be tricky
because github defines 'latest' by the tag timestamp.

CHANGELOG_BEGIN
CHANGELOG_END

* hlint
2021-01-05 14:31:41 +01:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
nickchapman-da
ddc11a7063
Refactor deployment tests: (#5342)
- Move deployment tests (deployTest, fetchTest) out of integration-tests.
- Use DA.Test.Sandbox where appropriate.
- Split out code for useful test patterns: i.e. calling commands quietly, getFreePort.

changelog_begin
changelog_end
2020-04-02 10:17:21 +01:00
Shayne Fletcher
2722e7ce95
Move 'withEnv', call it from daml2ts tests (#5276)
* Move 'withEnv', call it from daml2ts tests

changelog_begin
changelog_end

* Fix withEnv call to ensure that TASTY_NUM_THREADs is set

withEnv replaces the whole environment so we need to set everything we
care about.

* withEnv replaces the whole environment so we need to set everything we
care about.

* Apparently applying the same fix has destabilized Windows

* Try even harder to get daml assistant tests passing on Windows again

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-30 17:20:47 +00:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
associahedron
d9cb5099de
A first draft at telemetry for daml-assistant. (#4506)
* Report assistant commands and errors via a logger.

CHANGELOG_BEGIN
CHANGELOG_END

* Hook up daml-assistant to a GCP logger.

* fix test case

* fix more tests

* Check opted in status in assistant.

* Anonimize args that have unexpected characters.

* More agressive anonimization

* add missing containers dependency
2020-02-14 15:46:25 +00:00
Moritz Kiefer
0d07210a3f
Fall back to regular bash completions for command arguments (#4375)
* Fall back to regular bash completions for command arguments

This addresses the first part of #4369 by falling back to the bash completions.

I sadly still haven’t figured out how we can stop to completing to a
directory if the command also exists as a directory.

changelog_begin

- [DAML Assistant] Bash and Zsh completions will now fall back to
  regular file completions after the command argument.

changelog_end

* Shut up hlint
2020-02-04 15:45:53 +01:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
Andreas Herrmann
ed39800a9f Rename hazel_deps to hackage_deps (#2789)
* hazel_deps --> hackage_deps

Mechanical change:

```
sed -i 's/hazel_deps/hackage_deps/g' $(ag -l hazel_deps)
```

* Hazel dependencies --> Hackage dependencies
2019-09-06 09:01:09 +00:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +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
b90862ebec
improve haskell module hierarchy to be more consistent (#2319) 2019-07-29 15:55:55 +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
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
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
A. F. Mota
489244886c List all available versions, and persist version data. (#1339)
* List all available versions.

* Add --all flag in daml version

* Save version list to cache

* Update version cacheing logic.

* Linting error

* PR revisions.

* Update release notes.

* Update daml-assistant/src/DAML/Assistant/Version.hs

* Update docs/source/support/release-notes.rst

Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
2019-05-23 14:33:07 +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
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
A. F. Mota
2d2159cd0a Fix getDispatchEnv / getDamlEnv re-entrancy. (#951)
* Add two failing getDispatchEnv tests.

* Fix getDispatchEnv idempotency.

* Fix new test formatting.

* Make getDamlAssistantPath look in env first.

* Fix daml env var overriding.

* Test all the Nothing cases of env var dispatching.

* Fix dispatchEnv and getDamlEnv for Nothings.

* Add hlint rule to avoid future setEnv debacles.

* Fix other uses of setEnv.

* Fix type error.

* Fix reviewer comments

* setEnv comment
2019-05-06 19:25:30 +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
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
Moritz Kiefer
f4b79c7518
Update path automatically on Windows in "daml install --activate" (#757) 2019-04-29 17:10:17 +02:00
Moritz Kiefer
4d4bbd8028
Move code shared between lib and tests to a DAML assistant library (#749)
* Move code shared between lib and tests to a DAML assistant library

Previously we were compiling the same code twice, once for the binary
and once for the test suite.

* Move tests and binary to separate directories

The lack of sandboxing on Windows in combination with
-Wmissing-home-modules breaks our Windows build otherwise.
2019-04-29 10:21:01 +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
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
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
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
moritzkiefer-da
fd156c33df
Add daml start (#254)
* Add daml start
2019-04-05 19:34:23 +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