* Add --install-with-custom-version, rename --allow-install-non-release
* Test install tarball via custom version in compatibility tests
run-full-compat: true
* initial implementation supporting version splitting in assistant
stubbed out implementations of resolveReleaseVersion/other resolution
* implement resolveReleaseVersionFromGithub
* continue work on fixing SDK/release version split
* First commit that successfully runs `daml-head install <split version>`
* fix tests
* Ignore snapshot/metadata for isHeadVersion
* remove log debugging
* Fix tests for getSdk
* refactor DA.Daml.Project.Types.defaultSdkPath
* enable incremental changes to version cache
* Allow resolveReleaseVersionFromGithub to fail via Either
* Split getSdkVersionFromSdkPath into get{Sdk,Release}VersionFromSdkPath
* Add resolveReleaseVersionFromDamlPath/Github to resolveReleaseVersion
* Add mock sdk config with version
* Remove getInstalledSdkVersions dependency on Cache
* add override for github version api endpoint, useful for mocking
* Add alternate-download to provide alternate tarball install resolution
* initial work on comprehensive autotester
* Copyright header
* fix build generation to have valid Main.daml
* improve error message for check_daml_install_nonzero
* Make killing miniserve processes more robust
* remove breakpoint
* Implement `daml build` tests
* Solve TODO in installExtracted to resolve sourceSdkVersion coherently
Supply useful error message with it.
* Return SdkVersion from sdkVersionFromReleaseVersion for typechecking
* Finish tests for tarball build, drop installed_already_behaviour
* Try to force-reload cache on tar failure, fix `Possible fix:` notes
* Add AllowInstallNonRelease as a flag
* Test allow_nonrelease, refactor, clean up setup_sandbox
* Move no_cache_override_github_endpoint API response into file
* Remove dead code, vestigial code
* Remove TODOs that no longer are relevant
* fix iAllowInstallNonRelease in InstallOptions for autoInstall
* Refactor alternateVersionLocation
* (Try to) lint language-support/ts/codegen/BUILD.bazel
* fix daml-assistant/test
* Enable allow_nonrelease post-build checks
* Remove writeFile debugging from DA.Daml.Assistant.Version
* Replace ../test-daml-yaml-install/test.sh with test-all-installs.sh
* lint
* more lint
run-full-compat: true
* Stop tracking API response in test-daml-yaml-install
* Move ReleaseResolution into Version
* remove extra deps, fixes daml-project-config-cabal-file-matches
* Move InstallLocation to minimize changes to DA.Daml.Project.Types
run-full-compat: true
* Create cachePath in daml-assistant tests that need it
* Bind to unused ports in test-all-installs.sh
run-full-compat: true
* Override via files instead of just URLs
run-full-compat: true
* Remove unused RELEASES_ENDPOINT
* Use dict keys instead of hardcoding in test-all-installs listing
* Refactor to remove check_daml_install_from_tarball_after_cache_reload
* Improve comment on update_cache
* Move shift before cases
* Add comment for unsafeParseReleaseVersion
* Rename unsafeParseReleaseVersion into unsafeParseOldReleaseVersion
* remove done todo
* Add some hungarian notation to resolveReleaseVersionFromDamlPath
* drop redundant let
* Define ordering over ReleaseVersion
run-full-compat: true
* use sdkVersion for codegen
* Use `urls` attribute in http_file, `url` is unsupported on Windows (!)
run-full-compat: true
* Remove unnecessary check for cache reload
run-full-compat: true
* Try use daml executable directly without daml-sdk-0.0.0
run-full-compat: true
* try force daml.exe to daml
run-full-compat: true
* Use daml.exe when windows is detected
* add windows tarballs for snapshots
* Fix most tests on windows, "line too long" breaks some tarball tests
run-full-compat: true
* Point to more recent snapshot post Moises's fixes
* Add os-specific tarball paths and alternate-download
run-full-compat: true
* Fix windows autoinstall with 0.0.0
run-full-compat: true
* Fix error message, remove daml_install_output catching
* Detect "The input line is too long" in other post_failed commands
* Fix missing releases endpoint, handle "cannot find the path specified"
run-full-compat: true
* Extract available snapshot versions from Github
* Refactor slightly, add comments
* Implement caching
* Make getLatest commands query the minimum number of times from Github
* lint
* filter out prereleases, fix naming
* Fix outdated reference `extractVersionsFromSnapshots` to extractReleases
* Retrieve all versions so that getLatest can prune old versions' patches
* Hide --snapshots, --all, and --force-reload flags from daml version
* Get isPrerelease check correct way around
* Thread UseCache to `daml install` and other commands
* Refactor getEnvLatestStableSdkVersion to defer sdk version extraction
* store envLatestStableSdkVersion thunk in struct so tests can override it
* Read environment var early in getLatestStableSdkVersion
I implemented this with `overrideWithEnvVarMaybe`, but it required some
rather opaque abuse of `fmap pure`, `sequence`, and `join`
* Replace hidden with internal so flags don't show up in help
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
* telemetry: use an extra cache directory for telemetry
If the sdk's `.daml` directory is not writable, telemetry fails and
kills the IDE. We add a new assistant environment variable "DAML_CACHE".
If set, this directory is used for telemetry cache data.
Fixes#8396.
CHANGELOG_BEGIN
CHANGELOG_END
* try creating directory
* check for already existing machine id file
* set DAML_CACHE to read-only in assistant integration tests
* Dont look for daml.yaml in SDK install.
Unless you're running "daml install project".
Fixes#5720
changelog_begin
changelog_end
* use pattern synonym for raw install target
* assistant: prompt users to automatically update PATH
We ask the Max/Linux users on installation if we should update their
PATH environment variable to point to the assistant binary and
automatically do so when the answer is affirmative.
CHANGELOG_BEGIN
CHANGELOG_END
* set .profile insetad .bashrc
* add a case for sh
* fix tests
CHANGELOG_BEGIN
CHANGELOG_END
* use imports only on nix systems
* update windows updatePath function for YesNoAuto flag.
CHANGELOG_BEGIN
CHANGELOG_END
Part of #6977. This PR adds some assistant tests, but regression tests and documentation should be added before the issue is closed.
changelog_begin
changelog_end
* Add snapshot version support in daml-assistant.
changelog_begin
- [DAML SDK] ``daml version`` can now list the available snapshot
versions by passing the flag ``--snapshots=yes``.
- [DAML SDK] ``daml install latest`` can now include the latest snapshot version by passing the flag ``--snapshots=yes``.
changelog_end
* Keep backward-compatible --all behavior
* Fix comment
* Delete spurious punctuation
* 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>
The way we use `withEnv` it is really intended to set a few
environment variables in an already existing environment instead of
clearing everything before. This PR changes it to do only that.
changelog_begin
changelog_end
closes#5280
* daml-assistant tests: fix flaky test on Windows
```
bazel test //daml-assistant:test --test_arg=--quickcheck-replay=425714
```
failed on Windows in the test-case:
```
tail . ascendents == ascendents . takeDirectory
```
In that case the two path components given two the test case shrink to
`p1 = "a"` and `p2 = "\\"`. Confusingly, on Windows
```
isRelative "\\" == True
```
while
```
"a" </> "\\" = "\\"
```
This is documented behaviour on Windows, see [1] and [2].
Using `p1 </> p2 /= p2` instead of `isRelative p2` works around this.
[1]: https://hackage.haskell.org/package/filepath-1.4.2.1/docs/System-FilePath-Posix.html#v:-60--47--62-
[2]: https://hackage.haskell.org/package/filepath-1.4.2.1/docs/System-FilePath-Posix.html#v:isRelative
* Fix ascendants test group name
`ascendants` is defined in `DA.Daml.Project.Util`, not
`DA.Daml.Assistant`.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* 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
* Add Zsh completions for the assistant
This is slightly more annoying for users since at least on Linux there
doesn’t seem to be a user-writable directory that is in `$fpath` by
default. I think on Zsh we could probably write them to
/usr/local/share/zsh/site-functions but I’d rather avoid platform
specific logic here. I would expect that Zsh users are usually
somewhat comfortable with modifying the config and this also matches
other installation instructions, e.g.,
https://github.com/zsh-users/zsh-completions#manual-installation.
On the plus side, the completions look significantly nicer in Zsh
since they include the description of commands.
CHANGELOG_BEGIN
- [DAML Assistant] Zsh completions for the DAML Assistant are now
installed as part of ``daml install``. To activate them you need to
add ``~/.daml/zsh`` to your ``$fpath``, e.g., by adding
``fpath=(~/.daml/zsh $fpath)`` to the beginning of your ``~/.zshrc``
before you call ``compinit``.
CHANGELOG_END
* Fix tests
* Update daml-assistant/src/DA/Daml/Assistant/Install/Completion.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
* Improve bash completions for daml-assistant.
* Install bash completion script automatically
* Better default logic for bash completions
* specifically -> explicitly
* Copyright headers
* Better hook logic and refactoring
* Handle non-standard installations more robustly.
* Handle CI env & add changelog note.
CHANGELOG_BEGIN
- [DAML Assistant] Bash completions for the DAML assistant are now
available via ``daml install``. These will be installed automatically
on Linux and Mac. If you use bash and have bash completions installed,
these bash completions let you use the tab key to autocomplete
many DAML Assistant commands, such as ``daml install`` and
``daml version``.
CHANGELOG_END
* Mention bash completion in assistant docs
* Remove promises