* language: dalf imports and a test
This adds the possibility to directly import dalfs in a project. We test
that we can import the `simple-dalf` in the daml-assistant integation
tests. For now we only check that data type generation works, not yet
the template instance.
The following was fixed: When rewriting package self references, this
changes the hash of the package later on and leads to different package
hashes. Also we need to be careful to write the orignal binary
representation to this and not re-encode it because the encoding might
have changed with a different sdk.
* addressing moritz's comments.
* windows doesnt like bazel paths
* Add a first draft of documentation for DAML triggers
The API will still change in a bunch of ways but I’d rather get some
docs in place now and update them as we change things than not have
any docs at all.
* Fix path to daml.yaml
* s/bot/trigger/
* fix source code markers
* Fix tests
* Update docs/source/triggers/index.rst
Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* language: fix: don't look for daml files in hidden directories
Fixes#3134. When locating daml source files, we need to make sure we're
not recursing into the .daml directory, because it contains source files
of the dependencies.
* Update daml-assistant/integration-tests/src/Main.hs
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This moves the creation of a package database from given dalfs out of
the migrate command and into the init command. In particular, this makes
the process of creating a package database independent of the migrate
command.
It also changes the way this package database is created to be only
dependend on given dalf files.
* Flattening results of the `/contracts/search`,
returning a `ActiveContract` instead of `GetActiveContractsResponse`
* Fixing the test,
it is an empty array instead of empty GetActiveContractResponse object
* Updating examples
* Updating release notes
* Update unreleased.rst
Accepting suggested changes
Co-Authored-By: Stephen Compall <stephen.compall@daml.com>
* Resolving master merge conflicts
This should make `daml start` a bit more useful since you don’t have
to switch to starting all processes separately once you start
deviating from the defaults, e.g., I found myself wanting to specify a
custom ledger id during the hackathon. This is part 1 of ##2993.
The filename of the dar is not something that you should rely on as
evidenced by the fact that we have a -o option to change it to
something completely different.
* Use a consistant include dir for cwd
See https://github.com/digital-asset/ghcide/pull/114 for the actual
fix.
This PR just bumps ghcide and adds a regression test. I’ll change the
revision before merging, I just want to test CI for now.
fixes#2929
* Switch to proper ghcide revision
* writeIfacesAndHie no longer exists
* Add changelog entry
* Maybe I should try to compile code before committing but I don’t want to
* Fix ghcide exe
* language: support for automatic embeddings/projections in migation
This adds support to automatically generate embeddings/projections if an
optional field to a contract template is added. This allows generation
of migration contracts for these kind of updates.
* only project None entries
* added a test for optional field embedding/projection.
* filter out exception stack traces logged at debug
* Adding logback.xml for DAML Assistant release
* Fixing readme
* Fixing readme
* Use the config file in the assistant
* add Numeric.java
* ledger-api: rename `decimal` field to `numeric` in value protobuf
* Address Gerolf's comment
* ledger-api: add missing renammings
* ledger-api: relax syntax of numbers that can be sent as numerics
* extractor: fix
* leger-api: change format of number though ledger api
* daml-lf: fix numeric regexp
* ledger: fix tests
* language: compile everything in the source directory
This removes the need to specify a 'main'. Instead we 'source' in
daml.yaml should point to the source root directory.
* language: smoothing out the migration experience
Some improvements to make the migration process simpler when migrating
between packages with the same name, e.g. foo-1.0.0 -> foo-2.0.0. This
is the main use case.
* language: append the version to the output dar name by default.
We now by default output foo-1.0.0.dar instead just foo.dar. Also the
maven coordinate default naming got removed.
* fixing integration tests and quickstart.dar occurences
* Only change project root once
As described in #2449, calling withProjectRoot' twice breaks with
relative paths and is also just silly so this PR fixes this by
factoring out the actual logic from init from execInit which does the
project root thingy.
* Add a regression test
* Add link to deploy URL in daml ledger --help and daml deploy --help
* Update daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
Despite, a lot of searching around, I couldn’t find any information on
why exactly quoting "code" causes issues but removing the quotes seems
to fix the issue ¯\_(ツ)_/¯
* Fix daml build for usernames with spaces
This PR fixes two issues caused by having spaces in your username:
1. On Windows, we need to quote the path to the daml binary in the
batch wrapper (quotes are not valid in usernames, so no need to worry
about escaping them).
2. Invoking ghc-pkg via callCommand broke since shells are
terrible. Luckily, we can easily get away with just using callProcess
here.
* Update compiler/damlc/lib/DA/Cli/Damlc.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* language: put hash in package directories
We put the package id of the main dalf of a package into the directory
names, where we store the files of that package in the package database.
This way we make sure that two equally named packages don't overwrite
their dependencies and files.
* Supporting producing sdist tarballs for the HS ledger bindings
The README.md has an explanation for how you can use this.
This should hopefully allow others to experiment with the bindings.
Currently, if you do `daml init foo` and there's a file `foo/Main.daml`,
you'd end up with a file `foo/daml.yaml` whose `source` entry is
`foo/Main.daml`when it should actually just be `Main.daml`.
This PR fixes this problem.