* 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
* Separate version logic out of DAML.Assistant.Env.
* Refactoring some of the exception handling.
* Update daml version command.
* Uncommit linting atrocity.
* Started working on daml init.
* Implement daml init.
* Nicer messages and nicer field generation.
* Cleaning up a duped definition.
* Review revisions
* Catch all synchronous exceptions when making network requests.
* Wrap all of getLatestVersion.
* wrapErr wraps sync exceptions as well.
* Pass through exit codes.
* 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
* 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.
* 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.
* 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.
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.
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.
* 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
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.
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.
* 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
* 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
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.
* 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.