Commit Graph

86 Commits

Author SHA1 Message Date
A. F. Mota
2329b1b97a
Display warnings in daml build. (#1375)
* Display warnings in daml build.

* Prevent errors from showing twice.

* Use flagYesNoAuto for scenario service.
2019-05-24 14:36:48 +02: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
1c580d84a5
Make exposed-modules field in daml.yaml optional (#1345)
If unspecified, we expose all modules in the project.

Fixes #1328
2019-05-23 15:37:37 +02:00
Moritz Kiefer
d15f952dcc
Display daml-helper exceptions in a readable way (#1258)
This address part 2 of #1221.
2019-05-21 09:24:31 +02:00
Moritz Kiefer
d7209f3a09
Set program name of daml-helper to daml (#1256)
This prevents "daml new --help" and similar commands from showing
"daml-helper" instead of "daml".
2019-05-20 18:27:03 +02:00
A. F. Mota
db155477a5
Remove Data.SemVer workaround. (#1246) 2019-05-20 14:38:59 +02:00
A. F. Mota
128b8bed54
Add daml clean command (#1237)
* Add daml clean command

* Show what is removed during daml clean.

* Dont relativize
2019-05-20 13:11:35 +02:00
A. F. Mota
7013853694
Remove command kludge and prevent daml version from auto-installing. (#1229)
* Remove command kludge and prevent daml version auto-installing.

* Lint.

* Fix tests.

* Get rid of getMinimalDamlEnv.
2019-05-20 09:46:39 +02:00
A. F. Mota
9f184244f9 Add a couple failure modes to daml new. (#1212)
* Add a couple failure modes to daml new.

* Explain projectName == targetFolder check.

* Fix runNew documentation.
2019-05-17 11:13:38 +00:00
Gabor Aranyossy
e70cbfe65c eliminating some mutable state (#1130)
* no var no problem

further refactor

introduced InfraState

a bit less vars

encapsulating closes

SandboxServer starts automatically

rebase fixup

collecting state into a single object

some cleanup

removing exposed materializer

LedgerBackend is closed in SandboxServer

changed ownership of Ledger

fixing perf tests

fixing some compile errors

formatting

removing unused method

fixing integration test to use correct dar file

fixing issue with PostgresFixture and SandboxResource

Fix integration tests on Windows

* fixing rebase artifacts
2019-05-16 08:52:14 +00:00
Moritz Kiefer
7afc8af554
Add --open-browser flag to daml start (#1176)
I went with the yes/no/auto approach we already use in the assistant
and moved the logic for that to da-hs-base.
2019-05-16 10:28:49 +02:00
Moritz Kiefer
e48d5ccb22
Improve error messages on missing VSCode and missing Java (#1157)
* Improve error messages on missing VSCode and missing Java

* Better error messages
2019-05-15 17:18:03 +02:00
A. F. Mota
40f40d940a
Idempotent daml installs. (#1136) 2019-05-15 13:32:18 +02: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
f72fdf3552 Better error handling in get-daml.sh (#1121)
* Better error handling in get-daml.sh

* Use set -eu

* Review suggestions

* ORIGDIR is unused.
2019-05-14 10:54:05 +00:00
Moritz Kiefer
99a7b24b3b Add an option to not modify PATH in daml install --activate (#1119)
* Add an option to not modify PATH in daml install --activate

This is particularly useful in test suites where you install to a
temporary directory that should not be added to the registry.

* Use yes/no/auto

* Make check more robust
2019-05-14 09:01:35 +00: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
f7a0dd250a Open browser on daml start. (#1103) 2019-05-13 17:36:08 +00:00
Andreas Herrmann
c3a651364f Handle module root . and non-normal source paths (#1073)
* Handle module root `.` and non-normal source paths

* Add regression test for #1048
2019-05-13 08:54:40 +02:00
A. F. Mota
2d682f489e Implement daml init command. (#1080)
* Started working on daml init.

* Implement daml init.

* Nicer messages and nicer field generation.

* Cleaning up a duped definition.

* Review revisions
2019-05-10 16:32:41 +00:00
Moritz Kiefer
eb3b9a7ec4
Add an integration test for daml packages (#1050) 2019-05-09 16:45:40 +02:00
A. F. Mota
9cc18edd07
Catch all synchronous exceptions when making network requests. (#1038)
* Catch all synchronous exceptions when making network requests.

* Wrap all of getLatestVersion.

* wrapErr wraps sync exceptions as well.

* Pass through exit codes.
2019-05-09 14:41:45 +02:00
A. F. Mota
5c8e1e0ef2
Make daml-sdk-head work alongside daml installation. (#997)
* Make daml-sdk-head work alongside daml installation.

* Delete any exsting legacy .daml-head installation.

* Do daml-head.cmd on windows.
2019-05-08 16:14:52 +02:00
Moritz Kiefer
b5eb7ce52b
Move DAR created in "daml start" to dist/ (#993)
fixes #992
2019-05-08 10:14:05 +02:00
Moritz Kiefer
75be2e708d
Show help on errors in daml-assistant and daml-helper (#974) 2019-05-07 15:39:31 +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
A. F. Mota
2d63d27da0 Move the dispatch env vars to the end. (#880) 2019-05-06 16:10:13 +02:00
Moritz Kiefer
66541f18d0
Upgrade to new Stackage snapshot (#941)
I also started an Upgrading.md document. I’ll add the documentation
for upgrading nixpkgs in a separate PR.
2019-05-06 15:45:31 +02:00
Moritz Kiefer
3f6ae21fbc
Output a note about the new project in "daml new" (#935) 2019-05-06 14:34:24 +02: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
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
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
A. F. Mota
0353c26929 Make the new version check time configurable. (#859) 2019-05-03 00:24:06 +00: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
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
A. F. Mota
087b2c4f3f Use open -a on mac for daml studio. (#836) 2019-05-02 14:11:29 +02: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
Martin Huschenbett
370b58d2fd
Turn on a few more hlint hints (#800) 2019-04-30 20:46:52 +02:00
Moritz Kiefer
c597becd2c
Support SDK install when TMP_DIR is a on a different filesystem (#770)
* Support SDK install when TMP_DIR is a on a different filesystem

fixes #746
2019-04-30 11:35:53 +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
K5
451858335f
Simplify daml assistant interface. (#725)
* Simplify daml assistant interface.

* Update descriptions based on suggestions

* Build dar in proper place.
2019-04-29 09:14:51 +01:00
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