* language: feature: initial implementation of a 'migrate' command
We add a 'migrate' command to daml assistant that generates a project
that allows to migrate contract instances from package1 to package2.
This first version reads both package1 and package2 from source. As a
next step we read only the dalfs from package1, because it might have
been created with a different compiler.
* Add test case for damlc test-files
* Separate damlc test-files from damlc test
* Fix rules_daml/daml.bzl daml_test
* damlc test-files --> damlc test --files
The project options are still relevant for the --files case, as it may
be necessary to change into the project root directory in order to
locate the project package database.
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.
* Started working on daml init.
* Implement daml init.
* Nicer messages and nicer field generation.
* Cleaning up a duped definition.
* Review revisions
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.
* 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 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.