This was already possible before via the DAML_PROJECT environment
variable but for users that want to call damlc directly, e.g., via
damlc.jar a CLI flag can be more convenient.
* 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>
* 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
* 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.
* 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.
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.
* 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
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.
* Make daml-asisstant forward --help as intended.
* Refactor command-line parser in daml-assistant.
* Fix issues with daml-assistant CLI.
* Misalign things for Martin.