This PR adds a first version of update documentation and removes the
existing docs which were talking about `damlc migrate`.
So far the docs focus on the high-level approach to upgrades taken in
DAML and give an example of how to structure upgrade contracts.
What is not covered so far (and I’d like to leave that for a separate
PR) is:
1. Technical details: How are things split up into packages, which
restrictions apply to data-dependencies, …
2. Deployment and Running the upgrade via triggers/daml script/…
3. Common patterns for handling this in UIs (e.g. “locking” old contracts)
changelog_begin
changelog_end
* Use yarn installation link instead of homepage
* Indentation of Messages segment
* Update git link to downloads page
* Explain why you see friends of friends in the network
* Tweak wording
* Descibe how to run new app more explicitly
* Make change to ui folder more obvious
* Add next steps
changelog_begin
changelog_end
* Fix title levels
* Update create-daml-app code
* Remove reference to infix elem
* Remove the licenses from the code we tell users to copy
* Tweak conclusion
changelog_begin
changelog_end
* move BeginBookmark to util
* adding offsets to steps
* offsetAfter belongs in Txn, not InsertDeleteStep
* make transaction stream a ContractStreamStep.Txn stream
* add several ContractStreamStep append cases
* rewrite 'render' to emit offset in the right places
* make ContractStreamStep#append total again
* check for offset in a few tests
* revert useless whitespace changes
* missed argument
* simpler mapPreservingIds
* rewrite states for new "live" format
* remove invalidated "events" block structure assertions
* make shutdown in withHttpService deterministic, to try to catch race condition
* exhaustiveness checking somehow disabled; fixed fetch flow and all is well
* documentation and changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] Remove ``{"live": true}`` marker from websocket streams;
instead, live data is indicated by the presence of an "offset".
See `issue #4593 <https://github.com/digital-asset/daml/pull/4593>`_.
CHANGELOG_END
* be more specific about what liveness marker may be in docs
* fix daml2ts websocket tests
* mention type rules for all cases in offset documentation
* Extend /party endpoint to allow specifying party ids
* Extend /party endpoint to allow specifying party ids
* Update docs
CHANGELOG_BEGIN
[JSON API - Experimental] Fetch Parties by their Identifiers. See #4512
``/v1/parties`` endpoint supports POST method now, which expects
a JSON array of party identifiers as an input.
CHANGELOG_END
* minor update
* minor update
* Use type alias
* Add warnings to the sync response
* test cases
* update docs, add test case for an empty input
* cleanup
* cleanup
* Addressing code review comments
This disables the PDF docs builds on MacOS on CI (they are still built
locally by default) and removes them from the Nix closure by
introducing a separate ci-cached attribute that filters out texlive.
Since we built `nix-build nix -A tools -A cached` on CI, I’ve also
removed all the Tex stuff from tools which only means that it ends up
in PATH which nobody seems to care about.
changelog_begin
changelog_end
* Copy App component from create-daml-app
* Introduce App component and start changing explanation of MainView
changelog_begin
changelog_end
* Elaborate on MainView, esp useStreamQuery
* Show where to find components and rearrange introduction of hooks
* ts
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Tweak context description
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Don't talk about []
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Address rest of comments
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* Change method of opening DAML files with VSCode
* More explanation of AddFriend choice
changelog_begin
changelog_end
* Contract not contract instance
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Remove 'instance' and explain nonconsuming better
* Fix file navigation and more wording
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Context
=======
After multiple discussions about our current release schedule and
process, we've come to the conclusion that we need to be able to make a
distinction between technical snapshots and marketing releases. In other
words, we need to be able to create a bundle for early adopters to test
without making it an officially-supported version, and without
necessarily implying everyone should go through the trouble of
upgrading. The underlying goal is to have less frequent but more stable
"official" releases.
This PR is a proposal for a new release process designed under the
following constraints:
- Reuse as much as possible of the existing infrastructure, to minimize
effort but also chances of disruptions.
- Have the ability to create "snapshot"/"nightly"/... releases that are
not meant for general public consumption, but can still be used by savvy
users without jumping through too many extra hoops (ideally just
swapping in a slightly-weirder version string).
- Have the ability to promote an existing snapshot release to "official"
release status, with as few changes as possible in-between, so we can be
confident that the official release is what we tested as a prerelease.
- Have as much of the release pipeline shared between the two types of
releases, to avoid discovering non-transient problems while trying to
promote a snapshot to an official release.
- Triggerring a release should still be done through a PR, so we can
keep the same approval process for SOC2 auditability.
The gist of this proposal is to replace the current `VERSION` file with
a `LATEST` file, which would have the following format:
```
ef5d32b7438e481de0235c5538aedab419682388 0.13.53-alpha.20200214.3025.ef5d32b7
```
This file would be maintained with a script to reduce manual labor in
producing the version string. Other than that, the process will be
largely the same, with releases triggered by changes to this `LATEST`
and the release notes files.
Version numbers
===============
Because one of the goals is to reduce the velocity of our published
version numbers, we need a different version scheme for our snapshot
releases. Fortunately, most version schemes have some support for that;
unfortunately, the SDK sits at the intersection of three different
version schemes that have made incompatible choices. Without going into
too much detail:
- Semantic versioning (which we chose as the version format for the SDK
version number) allows for "prerelease" version numbers as well as
"metadata"; an example of a complete version string would be
`1.2.3-nightly.201+server12.43`. The "main" part of the version string
always has to have 3 numbers separated by dots; the "prerelease"
(after the `-` but before the `+`) and the "metadata" (after the `+`)
parts are optional and, if present, must consist of one or more segments
separated by dots, where a segment can be either a number or an
alphanumeric string. In terms of ordering, metadata is irrelevant and
any version with a prerelease string is before the corresponding "main"
version string alone. Amongst prereleases, segments are compared in
order with purely numeric ones compared as numbers and mixed ones
compared lexicographically. So 1.2.3 is more recent than 1.2.3-1,
which is itself less recent than 1.2.3-2.
- Maven version strings are any number of segments separated by a `.`, a
`-`, or a transition between a number and a letter. Version strings
are compared element-wise, with numeric segments being compared as
numbers. Alphabetic segments are treated specially if they happen to be
one of a handful of magic words (such as "alpha", "beta" or "snapshot"
for example) which count as "qualifiers"; a version string with a
qualifier is "before" its prefix (`1.2.3` is before `1.2.3-alpha.3`,
which is the same as `1.2.3-alpha3` or `1.2.3-alpha-3`), and there is a
special ordering amongst qualifiers. Other alphabetic segments are
compared alphabetically and count as being "after" their prefix
(`1.2.3-really-final-this-time` counts as being released after `1.2.3`).
- GHC package numbers are comprised of any number of numeric segments
separated by `.`, plus an optional (though deprecated) alphanumeric
"version tag" separated by a `-`. I could not find any official
documentation on ordering for the version tag; numeric segments are
compared as numbers.
- npm uses semantic versioning so that is covered already.
After much more investigation than I'd care to admit, I have come up
with the following compromise as the least-bad solution. First,
obviously, the version string for stable/marketing versions is going to
be "standard" semver, i.e. major.minor.patch, all numbers, which works,
and sorts as expected, for all three schemes. For snapshot releases, we
shall use the following (semver) format:
```
0.13.53-alpha.20200214.3025.ef5d32b7
```
where the components are, respectively:
- `0.13.53`: the expected version string of the next "stable" release.
- `alpha`: a marker that hopefully scares people enough.
- `20200214`: the date of the release commit, which _MUST_ be on
master.
- `3025`: the number of commits in master up to the release commit
(included). Because we have a linear, append-only master branch, this
uniquely identifies the commit.
- `ef5d32b7ù : the first 8 characters of the release commit sha. This is
not strictly speaking necessary, but makes it a lot more convenient to
identify the commit.
The main downsides of this format are:
1. It is not a valid format for GHC packages. We do not publish GHC
packages from the SDK (so far we have instead opted to release our
Haskell code as separate packages entirely), so this should not be an
issue. However, our SDK version currently leaks to `ghc-pkg` as the
version string for the stdlib (and prim) packages. This PR addresses
that by tweaking the compiler to remove the offending bits, so `ghc-pkg`
would see the above version number as `0.13.53.20200214.3025`, which
should be enough to uniquely identify it. Note that, as far as I could
find out, this number would never be exposed to users.
2. It is rather long, which I think is good from a human perspective as
it makes it more scary. However, I have been told that this may be
long enough to cause issues on Windows by pushing us past the max path
size limitation of that "OS". I suggest we try it and see what
happens.
The upsides are:
- It clearly indicates it is an unstable release (`alpha`).
- It clearly indicates how old it is, by including the date.
- To humans, it is immediately obvious which version is "later" even if
they have the same date, allowing us to release same-day patches if
needed. (Note: that is, commits that were made on the same day; the
release date itself is irrelevant here.)
- It contains the git sha so the commit built for that release is
immediately obvious.
- It sorts correctly under all schemes (modulo the modification for
GHC).
Alternatives I considered:
- Pander to GHC: 0.13.53-alpha-20200214-3025-ef5d32b7. This format would
be accepted by all schemes, but will not sort as expected under semantic
versioning (though Maven will be fine). I have no idea how it will sort
under GHC.
- Not having any non-numeric component, e.g. `0.13.53.20200214.3025`.
This is not valid semantic versioning and is therefore rejected by
npm.
- Not having detailed info: just go with `0.13.53-snapshot`. This is
what is generally done in the Java world, but we then lose track of what
version is actually in use and I'm concerned about bug reports. This
would also not let us publish to the main Maven repo (at least not more
than once), as artifacts there are supposed to be immutable.
- No having a qualifier: `0.13.53-3025` would be acceptable to all three
version formats. However, it would not clearly indicate to humans that
it is not meant as a stable version, and would sort differently under
semantic versioning (which counts it as a prerelease, i.e. before
`0.13.53`) than under maven (which counts it as a patch, so after
`0.13.53`).
- Just counting releases: `0.13.53-alpha.1`, where we just count the
number of prereleases in-between `0.13.52` and the next. This is
currently the fallback plan if Windows path length causes issues. It
would be less convenient to map releases to commits, but it could still
be done via querying the history of the `LATEST` file.
Release notes
=============
> Note: We have decided not to have release notes for snapshot releases.
Release notes are a bit tricky. Because we want the ability to make
snapshot releases, then later on promote them to stable releases, it
follows that we want to build commits from the past. However, if we
decide post-hoc that a commit is actually a good candidate for a
release, there is no way that commit can have the appropriate release
notes: it cannot know what version number it's getting, and, moreover,
we now track changes in commit messages. And I do not think anyone wants
to go back to the release notes file being a merge bottleneck.
But release notes need to be published to the releases blog upon
releasing a stable version, and the docs website needs to be updated and
include them.
The only sensible solution here is to pick up the release notes as of
the commit that triggers the release. As the docs cron runs
asynchronously, this means walking down the git history to find the
relevant commit.
> Note: We could probably do away with the asynchronicity at this point.
> It was originally included to cover for the possibility of a release
> failing. If we are releasing commits from the past after they have been
> tested, this should not be an issue anymore. If the docs generation were
> part of the synchronous release step, it would have direct access to the
> correct release notes without having to walk down the git history.
>
> However, I think it is more prudent to keep this change as a future step,
> after we're confident the new release scheme does indeed produce much more
> reliable "stable" releases.
New release process
===================
Just like releases are currently controlled mostly by detecting
changes to the `VERSION` file, the new process will be controlled by
detecting changes to the `LATEST` file. The format of that file will
include both the version string and the corresponding SHA.
Upon detecting a change to the `LATEST` file, CI will run the entire
release process, just like it does now with the VERSION file. The main
differences are:
1. Before running the release step, CI will checkout the commit
specified in the LATEST file. This requires separating the release
step from the build step, which in my opinion is cleaner anyway.
2. The `//:VERSION` Bazel target is replaced by a repository rule
that gets the version to build from an environment variable, with a
default of `0.0.0` to remain consistent with the current `daml-head`
behaviour.
Some of the manual steps will need to be skipped for a snapshot release.
See amended `release/RELEASE.md` in this commit for details.
The main caveat of this approach is that the official release will be a
different binary from the corresponding snapshot. It will have been
built from the same source, but with a different version string. This is
somewhat mitigated by Bazel caching, meaning any build step that does
not depend on the version string should use the cache and produce
identical results. I do not think this can be avoided when our artifact
includes its own version number.
I must note, though, that while going through the changes required after
removing the `VERSION` file, I have been quite surprised at the sheer number of
things that actually depend on the SDK version number. I believe we should
look into reducing that over time.
CHANGELOG_BEGIN
CHANGELOG_END
* GSG: Explain Sandbox and JSON API better and improve wording in intro
Also adapt to lack of sign up.
changelog_begin
changelog_end
* Address comments
* Add documentation for DAML repl and advertise it
This PR adds some simple docs for ``daml repl`` and adds it to the
release notes.
changelog_begin
- [DAML Repl - Experimental] A new ``daml repl`` command that allows
you to use the ``DAML Script`` API interactively. Take a look at the
`documentation <https://docs.daml.com/daml-repl/>`_ for more
information.
changelog_end
* Update docs/source/daml-repl/index.rst
Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* s/Repl/REPL/
Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* Rework description of using the app with recent changes
changelog_begin
changelog_end
* Formatting
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Wording
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Address more comments
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Explain UI better in app arch section
Still rough but better than the void of information there currently.
changelog_begin
changelog_end
* Finish sentence
* Reword introduction and explanation of codegen
CHANGELOG_BEGIN
CHANGELOG_END
* Say DAR instead of archive
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Remove 'i'll explain later'
* Include links to sections of this guide
* More links
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Update MainView in App Arch section
* Update Feed to MessageList
* Update MessageEdit and MainView components and description in First Feature section
CHANGELOG_BEGIN
CHANGELOG_END
* Underline length
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Add more tests to default run of Ledger API Test Tool
Furthermore, drop TimeIT, which is a sandbox-only property (and tested already as part of its integration tests)
CHANGELOG_BEGIN
[DAML Ledger Integration Kit] Ledger API Test Tool default tests modified. Use --list for the updated list of default tests. Time service test dropped from the suite.
CHANGELOG_END
* Address https://github.com/digital-asset/daml/pull/4561#discussion_r380635979
* Address https://github.com/digital-asset/daml/pull/4561#discussion_r380636989
* Optimize imports
* Only run semantic tests on Canton
* Fix UI intro para
* Tweak UI explanation
* Address some feedback about the intro text
* More changes to wording about DAML
* Small wording fixes to feature section
changelog_begin
changelog_end
* Start drafting new quickstart guide
* Show how to run the app
* Very rough instructions for playing with the app
* Explain core of User template
* Start explaining UI code
* Example of daml react hook (useQuery for allUsers)
* Talk about daml2ts and start describing the new feature
* Start talking about DAML for posts feature
* Add ui file referenced in text
* Start describing changes to UI for Post feature
* Rework feature section wording as Messaging instead of Posts
* Write about additions to MainController
* Talk about new components before the view and controller (bottom up style)
* Describe additions to MainView (may change if we inline MainView into MainController)
* Adapt to create-daml-app removing MainController
* Fix code snippet and try to highlight tsx but fail
* Split guide into sections and rename some sections
* Improve start of app arch section
* Minor edits to code snippets and wording
* Update setup instructions with codegen step
* Update UI components in 'before' code
* Move and update section explaining TS codegen
* Copy in new DAML files
* Update UI code for messaging feature and some of the explanatory text
* Start reworking DAML feature section
* Redo DAML feature section
* Edit initial section
* Edit intro para of arch section
* Edit start of DAML explanation
* Edit template explanation
* Minor edit to UI explanation
* Improve wording of DAML explanation
* Rework sig/obs explanation
* Update User.daml file from create-daml-app and label AddFriend choice
* Explain AddFriend choice better
* Move new GSG to experimental features section
* Undo accidental change to vscode settings
changelog_begin
changelog_end
* Copyright headers
* Revert unwanted change
* Remove typescript highlighting which doesn't work
* Tweak explanation of code generation
* Remove driven
If you click on a section title, we hijack the link to animate
it. However, we did not update the location hash. This makes it quite
annoying to copy links to a specific section.
This PR sets the jquery animate callback to update the hash as
well. I’ve also included a small fix for the link on the section title
which previously produced an error in the JS console since "#" is not
a valid jquery selector.
changelog_begin
changelog_end
* Inserts alias
* ContractStreamStep, extending InsertDeleteStep with a boundary
* partitionBimap, an IDS utility for partitionMap on both inserts and deletes
* make the flow setup of acsFollowingAndBoundary a little clearer
* use partitionBimap to simplify websocket response stream
* make the flow setup of transactionsFollowingBoundary a little clearer
* acsFollowingAndBoundary becoming a ContractStreamStep producer
* insertDeleteStepSource also becomes a ContractStreamStep producer
* porting StepAndErrors to ContractStreamStep
* remove Acs constructor of ContractStreamStep
- it's an interesting idea for future potential features, but not useful
right now so just a needless complication
* adapt convertFilterContracts to presence of LiveBegin marker
* adapt removePhantomArchives to presence of LiveBegin marker
* test that live marker is emitted in the right place
* document liveness marker
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] Add ``{"live": true}`` to WebSocket streams
to mark the beginning of "live" data. See `issue #4461
<https://github.com/digital-asset/daml/issues/4461>`_.
This marker is a placeholder feature; `issue #4509 bookmarks in query
streams <https://github.com/digital-asset/daml/issues/4509>`_ will
obsolete this marker, after which it will no longer be emitted. When
building features on the marker, be aware of this forthcoming
replacement.
CHANGELOG_END
* be a little more prepared for offsets
This should provide a better migration path for people that still rely
on static time by forcing them to make this explicit. Given that both
DAML script and DAML triggers are still experimental, I’m not marking
this as a breaking change
changelog_begin
- [DAML Script - Experimental] The time mode must now always be
specified explicitly. Use ``--static-time`` to recover the previous
default time mode.
- [DAML Triggers - Experimental] The time mode must now always be
specified explicitly. Use ``--static-time`` to recover the previous
default time mode.
changelog_end
* expand documentation on WebSockets subprotocols to a more-visible section
CHANGELOG_BEGIN
CHANGELOG_END
* combine reference in websocket section to auth section
* resection
* subprotocols sometimes called protocols
- suggested by @hurryabit; thanks
We've created a cool video that happens to have the wrong link in it
(missin l in the extension), and changing videos is more expensive than
changing text files.
Also, the current URL is a tad long, so I've added a shorter one.
Note: as this is part of the docs bundle (actually generating an HTML
redirect page), this won't be live until next version is published.
CHANGELOG_BEGIN
CHANGELOG_END
* Support multiple-packages in `damlc ide`
changelog_begin
- [DAML Studio] You can now open DAML Studio in the root of a
multi-package project instead of opening it separately for each
package. Take a look at the documentation for details on how to set
this up.
changelog_end
There are a few caveats here:
1. You need a ``daml.yaml`` in the root of your project directory. I
think this is somewhat sensible but we should add a warning to VSCode
if you open it in a directory that does not have a ``daml.yaml`` (in a
separate PR).
2. Changes are not picked up accross dependencies. This is a larger
undertaking and given the current setup simply impossible (we don’t
know that the source files of one package belong to the DAR referenced
in the ``dependencies`` field of the other package. We can make this a
bit better by at least detecting that the ``.dar`` has changed but
let’s do that separately.
3. Since ``daml init`` runs once on startup, it will run in the root
directory instead of initializing the package db of the individual
packages. This is fixable but will conflict with #4391 so let’s
address this separately.
I’ve added docs to the daml studio section that explain the caveats.
* Use the proper sdk version in lsp-tests
* move InsertDeleteStep to util
* turn append cid argument into a typeclass
* use Cid for appendForgettingDeletes as well
* add secondary data to the deletes in InsertDeleteStep with new covariant tparam
* make StepAndErrors hold ArchivedContracts so ws archives look like exercise archives
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] The format of ``archived`` responses from WebSocket endpoints
has changed to include template IDs, similar to exercise responses.
See `issue #4383 <https://github.com/digital-asset/daml/issues/4383>`_.
CHANGELOG_END
* rename "contracts" to "events" in JSON API exercise response
CHANGELOG_BEGIN
- [JSON API - Experimental] Exercise response field "contracts" renamed to "events".
See `issue #4385 <https://github.com/digital-asset/daml/issues/4385>`_.
CHANGELOG_END
* more events in doc
- pointed out by @leo-da; thanks
* Remove phantom archive when streaming events filtered by contract key
* Add fetch test cases, WIP
* Add fetch test cases, WIP
* Add fetch test cases, WIP
* Add fetch test cases, WIP
* Test case to validate phantom archive filter for stream/fetch
* Use `scan` instead of `statefulMapConcat` to filter out phantom archives
advantage(???) immutable state vs mutable
* make `com.digitalasset.http.WebsocketEndpoints.handleWebsocketRequest` public
so DABL can call it directly, `private[http]` does not work since DABL
is under com.projectdabl, see #4190
* Fixing typos
* Scalafmt
* Scalafmt
* Removing unused function
* Update docs
* Remove unused type alias
* CHANGELOG_BEGIN
[JSON API - Experimental]
- Added streaming version of fetch by key: ``/stream/fetch``. See #4075.
CHANGELOG_END
* Address code review comments
* Add test case with todo to address consistent handling of empty requests
* Fixing merge conflicts
* Addressing code review comments
* Addressing code review comments
Use `partition` instead of consecutive intersect and diff
[JSON API - Experimental]
Added a command line option to allow overriding default TTL.
``--default-ttl <value>`` Optional Time to Live interval to set if not provided in the command. Examples: 30s, 1min, 1h. Defaults to 30 seconds
CHANGELOG_END
* add SearchForeverRequest with one-or-many JSON model
* the least structured way to flatten a query union into a single stream
* add somewhere for indices to go in StreamQuery
* unzipMap utility
* doc Positive
* collect indices for SearchForever predicate, and use only one Map
* interface for rendering positions
* finish propagating positives from the predicate to the rendering phase
* add matchedQueries to every `created` in the searchForever results
* test that matchedQueries indices are included in query stream blocks
* document query union
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] ``/contracts/searchForever`` accepts multiple queries,
and includes with each ``created`` result the ``matchedQueries`` indicating which
queries matched.
See `issue #4363 <https://github.com/digital-asset/daml/pull/4363>`_.
CHANGELOG_END
* remove unused unzipMap
* ensure archive of a key happens to left of create of same key in each WebSocket result block
CHANGELOG_BEGIN
- [JSON API - Experimental] In websocket endpoints, if a 'created' and 'archived' contract
in the same result array share a contract key, the 'archived' is guaranteed to occur
earlier in the array than the 'created'.
See `issue #4354 <https://github.com/digital-asset/daml/issues/4354>`_.
CHANGELOG_END
* by key I mean contract key
- suggested by @hurryabit; thanks
In the integrity concepts, a party is defined as `C`, but referenced
later as `A`. As the rest of the docs use `A` for the party and `C` for
the contract, this seems to be a mistake. This corrects that
inconsistency.
This commit also clarifies a sentence and fixes a typo.
CHANGELOG_BEGIN
CHANGELOG_END
* Updated roadmap for Jan. 2020
* Removed Canton update
* Wording fixes
CHANGELOG_BEGIN
Removed previous roadmap (September 2019)
Added new one for January 2020
CHANGELOG_END
* Release 0.13.50
changelog_begin
changelog_end
* force clean build on Windows
apparently our cache is borked again …
* undo windows changes
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* in searchForever, warn on unknown template IDs as long as at least one is known
* remove unused resolveTemplateId
* factor out WS request parts in WS integration test
* factor out IOU create
* test early template ID warning in searchForever stream
* document warnings case for searchForever
CHANGELOG_BEGIN
- [JSON API - Experimental] Precede stream with warnings of unknown template IDs, if any,
rather than failing outright.
See `issue #4290 <https://github.com/digital-asset/daml/issues/4290>`_.
CHANGELOG_END
Before, we didn't mention in the docs that sum-types need to derive from
(Eq,Show) if they are to be used as arguments of templates or choices.
Now we do.
CHANGELOG_BEGIN
CHANGELOG_END
* Introduce new JWT payload format
... the reader still supports old formats
CHANGELOG_BEGIN
[Sandbox] The sandbox uses a new payload format for authentication tokens (JWTs).
The old format is deprecated, but still works.
[JSON API] The HTTP JSON API now uses the same payload format for authentication tokens as the sandbox.
The old format is deprecated, but still works.
CHANGELOG_END
* Add helper function for getting token party
* Support sandbox tokens in JSON API
* Add warning for deprecated formats
* Update documentation
* Add explicit test for new format
* Update JSON API documentation
* Fix test
Prohibit contract IDs in contract keys and add key maintainers to exercises
CHANGELOG_BEGIN
- [DAML-LF] Prohibit contract IDs in contract keys completely. Previously, creating keys containing absolute (but not relative) contract IDs was allowed, but `lookupByKey` on such a key would crash.
CHANGELOG_END
Co-authored-by: Remy <remy.haemmerle@daml.com>
Co-authored-by: Stephen Compall <scompall@nocandysw.com>
The docs build is currently not reproducible as it include to-the-minute
time-of-build information. It also includes some Sphinx binary caches
which I suppose will also not be reproducible (though I have not checked
the details there).
This commit attempts to remove all sources of non-reproducibility from
the docs build, though this is hard to test without having a stable,
older release to compare with.
CHANGELOG_BEGIN
CHANGELOG_END
* Implement exercise by key
ExerciseCommand got a new required element: `reference` of polymorphic type.
* Add test case: exercise Archive by contractKey
* Add test case for ExerciseCommand JSON protocol
* flatten contract reference in ExerciseCommand JSON protocol
* formatting
* Update exercise by key
* Update documentation
CHANGELOG_BEGIN
- [JSON API - Experimental] Support Exercise by Key. See #4009.
CHANGELOG_END
* Address code review comments
* for searchForever, use a similar response format to exercise results
CHANGELOG_BEGIN
- [JSON API - Experimental] Response format in ``searchForever`` changed to be more like ``exercise``.
See `issue #4072 <https://github.com/digital-asset/daml/issues/4072>`__.
CHANGELOG_END
* typo left from add->created replacement
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* in query argument, rename %templates to templateIds, and nest query under 'query' field
CHANGELOG_BEGIN
- [JSON API - Experimental] In 'search' endpoint arguments, %templates is now templateIds.
Additionally, all contract query fields must occur under 'query'.
See `issue #3450 <https://github.com/digital-asset/daml/issues/3450>`__.
CHANGELOG_END
* fix other old query format usages
* minor improvements on websocket and add websocketIT
* add it for websocket, and support config args
* add one more test case
* make ws config optional
* avoid fromTryCatchNonFatal when derivative already exists
* spelling and missing type parameter
* use richer Matchers in WebsocketServiceIntegrationTest
* scalafmt
* IDEs may love braces but we don't
* utility for simplifying FanOutShape2s; use in ContractsService
* split matSecondOut into generalization; make compile again
* match matSecondOut utility with standard utility methods
* spelling
* getCreatesAndArchivesSince doesn't need to query the transaction boundary
* boolean newtype utility
* split up transactionMessageHandler into components
* decodeAndParsePayload passes through the Jwt
* clean up config and default WS config
* take multiple template IDs for insertDeleteStepSource
* replace websocket return with {errors, add, remove}, based on acsFollowingAndBoundary
* parse ValuePredicate in websocket
* remove unused lfvToJson
* nominal internal state for emitted WS steps-and-errors
* missing copyright headers
* add filtering to convertFilterContracts
* add step conflation to websocket output
* move conflation to static function
* rename /transactions endpoint to /contracts/searchForever
* empty requests are not allowed; numConns is per-service
* option for GetCreatesAndArchiveSince to not terminate; use in WebsocketService
* start of searchForever documentation
* stub searchForever longer test
* use valueOr
* don't run all other tests again with WebsocketServiceIntegrationTest
* start of websocket delta test
* solve init order problem with AbstractHttpServiceIntegrationTestFuns
- previous order caused test set to be cleared; mutation is intuitive
for sure!
* full flow test, fails for lack of create/exercise yet
* passing full flow test
* full documentation examples
* rename add/remove to created/archived
* cleaner NewBoolean.Named
* document heartbeats
* document subprotocols for searchForever
* note about the tests mysteriously terminating
* ensure create has happened before attempting query in tests
* reorganize multi-step WS test so its states and assertions are clearer
* filter out heartbeats in raw string tests
* factor out ContractDelta
* make exercisePayload easier to read
* filter out heartbeats in conversation test
* remove type lambda
* accept chunked queries
- clients may not be in control of how query bodies are delivered to the
server, so we should be agnostic in that respect
* add changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] WebSocket contract search at ``/contracts/searchForever``.
See `issue #3936 <https://github.com/digital-asset/daml/pull/3936>`_.
CHANGELOG_END
* adapt to #3991 template ID strings
* adapt to #3971 argument -> payload
* fix create command for test (string template ID redux)
* adapt to #4014 ResolveTemplateId change
* update copyright headers
* rebuild WS example output to match latest changes
- thanks @leo-da
* SeqOps is not a safe name
* don't need breakOut anymore
* use util library form of partitionMap
- thanks @leo-da for pointing it out
Co-authored-by: lima-da <54044170+lima-da@users.noreply.github.com>
* WIP
* test cases updated
* `PackageService.resolveTemplateId` returns `Option[TemplateId]` now
used to return `Error \/ TemplateId`. There are scenarios when unresolved
TemplateID is a warning and not an error, which was the initial design
* CHANGELOG_BEGIN
[JSON API - Experimental]
``/contracts/search`` endpoint reports unresolved template IDs as warnings, see #3771::
{
"warnings": {
"unknownTemplateIds": ["UnknownModule:UnknownEntity"]
},
"result": [{...}, ...],
"status": 200
}
CHANGELOG_END
* Addressing codereview comments
* `partitionMap` is now part of `http.util.Collections.SeqOps`
* Implement heartbeat messages in trigger runner.
* Add heartbeat to Daml.Trigger
CHANGELOG_BEGIN
- [DAML Triggers - Experimental] DAML triggers can now configure a heartbeat message to be sent at regular time interval.
CHANGELOG_END
* Add DAML trigger heartbeat test-case
* ./fmts.h
Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
* test cases: domain.TemplateId JSON serialization to JsString
* JSON protocol updated
* Fixing json-api test cases
* test cases: domain.TemplateId JSON serialization to JsString
* JSON protocol updated
* Fixing json-api test cases
* Adapt daml2ts and support libraries
* Update documentation
CHANGELOG_BEGIN
[JSON API - Experimental]
- Use JSON string to encode template IDs. Use colon (``:``) to separate parts of the ID.
The request format, with optional package ID:
- "<module>:<entity>"
- "<package ID>:<module>:<entity>"
The response always contains fully qualified template ID in the format:
- "<package ID>:<module>:<entity>"
See #3647.
CHANGELOG_END
* Minor documentation formatting changes.
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* ECDA512 algorithm support
* ECDA512
* happy day test for ECDA512 algorithm
* failure test for wrong key for ECDA512 algorithm
* add ability to use EC cert file
* update docs
* scalafmt
* Correct documentation
CHANGELOG_BEGIN
[Ledger API Authorization] Support elliptic curve algorithm for JWT verification
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>
* correct docs warning
* Aligning DB contract table with domain.ActiveContract class
adding key,signatories, observers and agreement_text to DB contract table
removing witnessParties
Reading signatories and observers from contracts table
Updating doc, removing witnessParties
Address code review comments, thanks @S11001001
CHANGELOG_BEGIN
[JSON API - Experimental]
- Align ``contract`` table with ``domain.ActiveContract`` class.
The database schema has changed, if using ``--query-store-jdbc-config``,
you must rebuild the database by adding ``,createSchema=true``. See #3754.
- ``witnessParties`` field is removed from all JSON responses.
CHANGELOG_END
* Fix TypeScript domain models
remove witnessParties and workflowId fields. workflowId has be removed
from JSON output a while ago.
* 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
* Change variant json encoding,
adding integration test
* Add DamlLfTypeLookup dependencies
* Add MetadataReader
* Add test WIP
* Add serialize test cases
* Add serialize test cases, WIP
* Test for variant encoding decoding
* Solving merge conflicts
* Updating roundtrip test
* Minor cleanup
* Addressing code review comments
Add JsonVariant custom matcher
* Update specification
* Update link
* Add test case, WIP
* Add proper template key resolution
* Got rid of choice record ID resolution, resolving choice type and key type
* Fixing logging
* Add Contract Key decoding tests
* cleanup
* cleanup
* Update JSON variant encoding tests
* Add more contract key JSON decoding tests
* Fix variant JSON encoding
* Change value predicate to support new variant encoding
* Change value predicate to support new variant encoding
* Add lookup by contract key test case
where contract key contains variant and record
Add `requiredResource` to bazel utils
CHANGELOG_BEGIN
- [JSON API - Experimental] Change variant JSON encoding. The new format is ``{ tag: data-constructor, value: argument }``.
For example, if we have: ``data Foo = Bar Int | Baz``, these are all valid JSON encodings for values of type Foo:
- ``{"tag": "Bar", "value": 42}``
- ``{"tag": "Baz", "value": {}}``
See #3622
- [JSON API - Experimental] Fix ``/contracts/lookup` find by contract key.
- [JSON API - Experimental] Fix ``/command/exercise`` to support any LF type as a choice argument.
See #3390
CHANGELOG_END
* minor cleanup
* Fix copy/paste
* Renaming
* Got rid of DAML LF identifier resolution
resolving DAML LF Type based on command type
* Address code review comments, thanks @S11001001
* Address code review comments, thanks @S11001001
Do not include any error handling here; this partial function should
only match the successful case, JsonVariant.
* Address code review comments, thanks @S11001001
comment
* Address code review comments, thanks @S11001001
using `JsonVariant` for variant encoding/decoding
* Address code review comments, thanks @S11001001
replace `find` and `map` chain with collectFirst
* Update docs/source/json-api/lf-value-specification.rst
Co-Authored-By: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <scompall@nocandysw.com>
* Update ledger-api-test-tool readme instructions for daml docs
* remove STDERR / STDOUT pipe to file examples
* address review feedback
* Add commentary on tests which can be excluded for an --all-tests run because of clock, stress or mutation issues
* Add time to Trigger update function
CHANGELOG_BEGIN
- [DAML Triggers - Experimental] Expose timestamp in triggers.
See `#3612 <https://github.com/digital-asset/daml/issues/3612>`__.
CHANGELOG_END
* Add triggers time test
* Update trigger docs
* Lookup by Contract ID and Contract Key is WIP
* factor out "contract ID or key" JSON decoding
- adapted from fc132253 (#2695)
* Resolving conflicts
* Resolving conflicts
* Lookup by contract ID works
* Testing new contract created by IOU_Transfer can be looked up
* error if key and contractId specified for lookup at the same time
* Lookup by contract key test
* Lookup docs
* re-format with `./fmt.sh`
* minor cleanup
CHANGELOG_BEGIN
- [JSON API - Experimental] Fix and document ``/contracts/lookup`` endpoint. See #3755.
CHANGELOG_END
* sandbox: Split the StandaloneApiServer from the StandaloneIndexerServer.
* sandbox: Move StandaloneApiServer's nested classes to its companion.
And make them private.
* reference-v2: Rename `IndexServer` to `ApiServer`.
* sandbox: Move the services into the `apiserver.services` package.
* sandbox: Move SandboxEventIdFormatter's vals to the top.
* sandbox: StandaloneApiServer helper classes don't need to be Products.
* docs: Fix links for LedgerApiServer and Standalone{Api,Indexer}Server.
* sandbox: Delete a misleading comment from `StandaloneApiServer`.
* sandbox: Rename SandboxEventIdFormatter to EventIdFormatter.
- Document claims and what is required to access each service
- Refer to claims documentation in the JWT docs for the sandbox
- Fix a few typos
- Specify a single padding value for all table elements (CSS)
CHANGELOG_BEGIN
- [Documentation] Added documentation for authorization claims
CHANGELOG_END
* Adding choice result to the exercise response, WIP
* Adding choice result to the exercise response, WIP
* Refactoring towards #3390,
ExerciseCommand argument does not always have to be a Record, changing
typearg: JsObject -> JsValue
* Cleanup
* exercise-with-result endpoint
* todo
* Switching /commands/exercise to use SubmitAndWaitForTransactionTree,
populating archived and created from TransactionTree
* removing debug println
* Fixing tests
* Removing `/command/exercise-with-result` endpoint
this one returns only exercise result, `/command/exercise` now returns
exercise result and events
* Updating docs
* Updating docs
CHANGELOG_BEGIN
- [JSON API - Experimental] Expose exercise result. Changed the output
of the ``/command/exercise``. Note ``exerciseResult`` and ``contracts``
in ``{"status":200,"result":{"exerciseResult": ...,"contracts":[...]}``.
See #3314
CHANGELOG_END
* added tagmanger to docs
- 3rd party integration
- event tracking
* Removed the duplicate TagManager script
* Pushed the wrong script, sorry. This PR has the propper one
* Support authentication in DAML triggers
fixes#3259
CHANGELOG_BEGIN
- [DAML Triggers - Experimental] DAML triggers can now be run against
an authenticated ledger.
CHANGELOG_END
* Remove debug printf
* Windows is bad
* Fixing the GET contracts/search endpoint,
Returning all active contracts for all known templates, skipping the
query store persistence.
* minor cleanup
We don't drop full support from the compiler yet but rather ban their use by
adding a check to the preprocessor. We'll remove the actual support as we go
along with fixing the upgrading story.
CHANGELOG_BEGIN
- [DAML Compiler] Make the experimental feature "generic templates"
unavailable. The current implementation is at odds with other, more important
language features still under development.
CHANGELOG_END
Unfortunately, our current implementation of generic templates is at odds
with cross-SDK imports of DARs and hence the whole upgrading story for
DAML models, particularly around type classes, which generic templates
heavily rely upon. Thus, we've decided to drop support for generic templates
for now.
This PR does the first step by dropping the documentation. I've deliberately
not added a changelog entry here. I'll do that once we have dropped support
from the compiler.
With the intent of adding more functionality to the Java bindings, in
particular authentication, this PR deprecates existing constructors in
favor of a more flexible builder based approach.
CHANGELOG_BEGIN
- [Java Bindings] Deprecated existing constructors for
``DamlLedgerClient``, please use the static ``newBuilder`` method to
instantiate a builder and use it to create the client, starting from
either a ``NettyChannelBuilder`` or a plain host/port pair.
CHANGELOG_END
* support --access-token-file in SDK
* rename: HostAndPort -> LedgerArgs; HostAndPortFlags -> LedgerFlags
* integration test for --access-token-file
* doc & more help
* address comments: use FilePath
* adapt to renamed arg: --auth-jwt-hs256-unsafe
* avoid use of single quotes on command line
The shared-secret-based authentication is there exclusively for testing,
this PR makes sure that this is correctly reported through the CLI and
hides this until further notice.
Makes sure that the flag clearly says that this option is not meant for
production use cases.
A warning is already printed when this feature is used, both at startup
and every time this verifier is used.
CHANGELOG_BEGIN
- [Sandbox] The ``--auth-jwt-hs256`` is renamed to
``--auth-jwt-hs256-unsafe``: you are advised to _not_ use this JWT token
signing way in a production environment.
CHANGELOG_END
* Support multi-participant DAML script
fixes#3555
CHANGELOG_BEGIN
- [DAML Script - Experimental] DAML script can now run be used in distributed topologies.
CHANGELOG_END
* Fix ports in multiparticipants tests
* java-bindings: use LinkedHashMap asunderlying Map for DamlGenMap
* Address Samir's comments
* java-codegen: make DamlList, DamlMap and DamlGenMap immutable
* Address Samir's comments
* Adress Gerolf's comments
* more cleanup
* fix value generator
* Address Gerolf's comments:
CHANGELOG_BEGIN
[Java Bindings]
* Rename ``DamlMap`` to ``DamlTextMap``
* ``DamlCollectors`` class provides Collectors to build more easily ``DamlList`` and ``DamlTextMap``
* Change the recommended method to convert ``DamlValue`` containers from/to Java Bindings containers.
See `docs/source/app-dev/bindings-java/codegen.rst` for more details the new methodology.
CHANGELOG_END
* fix tests
* Add template id filtering to triggers
CHANGELOG_BEGIN
- [Daml Triggers - Experimental] DAML triggers now allow you to specify which templates you want to listen for which can improve performance.
CHANGELOG_END
* Address review comments
* Fix list-triggers test
* Generate API docs for DAML script and include them in the SDK docs
* Update daml-script/daml/Daml/Script.daml
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* StaticContentEndpoint
* cleanup
* release notes
* Add test
* SDK doc update
* Copying the directory content explicitly
to avoid creating a symlink, I believe that is the cause of the Windows issue
* creating a static content dir from the test
* fixing release notes
* creating a tmp dir
* fixing release notes
* Using Gen.Identifier to generate random strings
This change allows to only import `module A` from the instances package
if data dependencies are present instead of `module A` and `module
AInstances`.
* comparison query parser given scalar parser
- written in half-error-propagation style to better suit other potential
error features
* factor dupes in RangeExpr
* text range parsing
* interpreting Range into in-memory predicate; points out bad dedupe from earlier
* make reuse of the scalar extractors much nicer
* express date, time, int64 as factored-out range exprs
* express numeric as factored-out range expr
* factor \&/ usage
* refactor LF value extractors for reuse in range queries
* factor mkRange usage
* totally deconstruct the int64 and text cases
* totally deconstruct the date and timestamp cases
* totally deconstruct the numeric case
* document comparison queries
* use Utf8.Ordering for text comparison queries
* int64 range query tests
* more int64 range query tests
* date, string, numeric range query tests
* include line # in query test successes table
* timestamp range query tests
* add release note
* remove duplicate changelog entry from #3425
* bazel: 0.28.1 --> 1.1.0
* bazel-watcher sha256
* Fix missing line in patch
* proto_source_root --> strip_import_prefix
See https://github.com/bazelbuild/bazel/issues/7153 for details.
* Update rules_nixpkgs
Required to avoid errors of the form
```
ERROR: An error occurred during the fetch of repository 'node_nix':
parameter 'sep' may not be specified by name, for call to method split(sep, maxsplit = None) of 'string'
```
and
```
ERROR: An error occurred during the fetch of repository 'node_nix':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
_execute_or_fail(repository_ctx, <3 more arguments>)
File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
fail(<1 more arguments>)
Cannot build Nix attribute 'nodejs'.
Command: [/Users/runner/.nix-profile/bin/nix-build, /private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/node_nix/nix/bazel.nix, "-A", "nodejs", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
src/main/tools/process-tools.cc:173: "setitimer": Invalid argument
```
* Update rules_scala
* .proto has been removed, use [ProtoInfo] instead
See
https://docs.bazel.build/versions/1.1.0/be/protocol-buffer.html#proto_library
* python3_nix add nix_file attribute
To avoid the following error
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/BUILD:66:1: //:nix_python3_runtime depends on @python3_nix//:bin/python in repository @python3_nix which failed to fetch. no such package '@python3_nix//': Traceback (most recent call last):
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
_execute_or_fail(repository_ctx, <3 more arguments>)
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
fail(<1 more arguments>)
Cannot build Nix attribute 'python3'.
Command: [/home/aj/.nix-profile/bin/nix-build, "-E", "import <nixpkgs> { config = {}; overlays = []; }", "-A", "python3", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
error: anonymous function at /home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs.nix:3:1 called with unexpected argument 'config', at (string):1:1
```
* rules_haskell unnamed string.split(_, maxsplit = _)
The keyword argument may no longer be named.
* string.replace(_, _, maxsplit = _) may not be named
* Move proto sources from deps to data
Fixes
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/daml-lf/archive/BUILD.bazel:150:1: in deps attribute of scala_test rule //daml-lf/archive:daml_lf_archive_reader_tests_test_suite_src_test_scala_com_digitalasset_daml_lf_archive_DecodeV1Spec.scala: '//daml-lf/archive:daml_lf_1.6_archive_proto_srcs' does not have mandatory providers: 'JavaInfo'. Since this rule was created by the macro 'da_scala_test_suite', the error might have been caused by the macro implementation
```
* Define sha256 for haskell_ghc__paths
Bazel 1.1.0 fails on missing hashes.
* Disable --incompatible_windows_native_test_wrapper
* //compiler/daml-extension don't modify sources
Modifying sources in-place can cause issues on Windows, where build
actions are not sandboxed and changes on sources can affect other build
steps.
* bazel-genfiles --> bazel-bin
The bazel-genfiles symlink has been removed since Bazel 1.0.
See https://github.com/bazelbuild/bazel/issues/8651
* Mark dev_env_tool repository rule as configure
See
https://docs.bazel.build/versions/1.1.0/skylark/lib/globals.html#repository_rule
* Move data deps into data attribute
* Mark dev_env_tool as local = True
* Manually fetch @makensis_dev_env
* language: introduce data-imports
Right now the user experience for importing dalfs and dars from
different sdks is quiet confusing. This PR tries to solve this. We add
an additional field `data-imports` to daml.yaml. These imports can come
from different SDK's and we will generate interface files containing the
data types and their Template instances.
This also simplifies the migration command, as it now always imports the
respective packages as `data-imports`.
* new library ledger-service/db-backend
* borrow contracts table schema from extractor
* borrow contract insertion, removing some data to be unused
* match contract schema with insert function
* factor insertContract arguments
* offset table declarations
* CLI argument for query store
* surrogate template IDs
* compute surrogate template IDs on-the-fly
* database init action
* incoherent typeclasses, eh
* newtype SurrogateTpId
* offset fetch/update functions
* bad sql
* bulk insert contracts, function for selecting contracts
* expose contract column name for query's usage
* Initializing DB on startup if configured
* dropping existing tables as part of initialization
* fix some query syntax errors
* createSchema flag
* function for streaming transactions with jwt party selected
* formatting
* usage
* collect acs contracts and the ledger offset at the end
* lastOffset
* fixing merge conflicts, updating the way 3rd party deps are specified
* Moving ContractDao into http-json module
so it can take domain AST as an input
* cleanup
* injecting new dependencies
* split transaction batches into inserts and deletes
* generate sql for deleting contracts
* `fetch_sources = True` for java_deps
* make the delete-constructed fragment more efficient; handle empty list here
* pass logHandler for insertContracts
* ContractDao returns ConnectionIO, it's up to the caller to wrap query into a transaction
* fixing typo
* minor cleanup, moving fromLedgerApi factory function into corresponding companion objects
* don't need it any more
* GetActiveContractsResponse => domain.Contract factory
* make concatFragment private
* add partition graph; move other contract-fetching experiments to ContractsFetch
* experimenting with akka sources
* introducing domain.Offset to work around API's empty/null offset cases
* minor cleanup
* decompose fetchActiveContractsFromOffset
* missed via
* ACS splitting graph
* finish doc for ACS splitting graph
* remove unneeded stages
* WIP
* lazily read a stream of ConnectionIO into a single ConnectionIO
* cancel on IO error
* figuring out how to put all the pieces together
* graph WIP
* Removing workflowId from the JSON API
* simplify acsAndBoundary; describe other flow pieces
* WIP
* use Vector in InsertDeleteStep; add variant for ACS (no deletes)
* `org.wartremover.warts.NonUnitStatements` enforced in `http-json` module
* evaluate InsertDeleteStep to a ConnectionIO
* database variant of LfValueCodec, using numbers for numbers
* convert input to JSON, combine insert plans, connect rest of contractsToOffsetIo
* remove strict contractsToOffset sink
* moving dao methods into an object
* putting pieces together
* contractsFromOffset WIP
* should be it
* cleanup
* cleanup
* contractsIo that takes List[domain.TemplateId.RequiredPkg])
* contractsIo that takes List[domain.TemplateId.RequiredPkg])
* cleanup
* put all pieces together, testing
something does not work yet
* diff is not required to return anything
that is why Sink.lastOption that gives Option[domain.Offset]
* factor out tuple split
* use traverse syntax in contractsIo2
* factor explicit flow steps out of graph DSL; remove aggregate
* locally model the Absolute/Begin distinction for offset bookmarking in DB
* Adding test cases to run HTTP Service with Postgres backend
the same set of test cases, run with and without DB backend
* make better use of domain.Offset in OffsetBoundary
* monomorphize InsertDeleteStep#append
* Disabling a test that fails with DB backend
* add release note
* add release note about workflowId
* a test case that checks the number or stored contracts
* trying to figure out why Postgres test fails on Windows with NPE
This has come up in some discussions around packaging where people
want to clone a repo and build it with the same SDK version that is
used in their own project so they can depend on it. While it’s
possible to `sed` the `daml.yaml`, setting the env var seems like a
nicer solution.
* language: refactoring of iface file generation and package db setup.
This is a refactoring of the damlc part that creates the package
database and the code generation for interface files. This is a
preparation for the cross sdk imports.
We also add an internal command to damlc to generate generic instances
code and use simple copying via {..} in the migration command. An
additional test checks that migration via generics still works.
* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Upgrade.hs
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* clearer description for generate-gen-src
* updated documentation
* correct copy/pasta mistake
* added a comment on different build options in migration command.
* Update compiler/damlc/lib/DA/Cli/Damlc.hs
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* resolve dalf paths from dar manifest
* added a comment on different headers in upgrade modules.
* removed monoid instance for ExtractedDar
The only reason for having AbsoluteContractId was that we could get
some more instances in particular `Ord` and `MapKey` but given that
`ContractId` will be a valid key type for the new DAML-LF maps, we can
just use slower implementations for now and switch to Map-based
implementations once that has landed.
fixes#3336
* Bring back daml integration kit docs
This just revives the documentation, without updating it yet.
* Updated URLs and remvoe references to the IndexService
* Add release note for revival of integration kit docs
* Update unreleased.rst
* update release notes
* Update bazel-common to fix javadoc issues
Specifically, to fix the following error
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
javadoc_library(name = 'rs-grpc-bridge_javadoc')
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```
* Define Maven deps using rules_jvm_external
* Pin artifacts
* Remove bazel-deps generated targets
* Remove bazel-deps
* Switch to rules_jvm_external targets
* update bazel documentation
* pom_file: There are no more bazel-deps targets
* BAZEL-JVM.md `maven_install` typo
* Add TemplateTypeRep to AnyContractId
* Define Trigger.ContractId t
* Use Trigger.ContractId t
* Implement fromCreated and fromArchived
* instance MapKey TemplateTypeRep
* More efficient ACS access using Map TemplateTypeRep
* ./fmt.sh
* toString and fromString for Identifier
* Replace Identifier by TemplateTypeRep
* TheContractId --> AbsoluteContractId
https://github.com/digital-asset/daml/pull/3245#discussion_r338033546
* Use the same CopyTrigger in the docs and the tests
That way, we actually test what we use in our docs which seem like a
much better idea than duplicating the code.
* Add debugging output on failures
* 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>
* Package reload scheduler
* Cleanup
* Cleanup
* addressing code review comments, removing todo
* Actually has to be like this, reduced version caches `templateIdMap`
we don't want it cached.
* Load only new package IDs instead of reloading the entire store
* Adding `domain.ArchivedContract`
* Adding `domain.Contract`
* Returning archived and active contracts from `/command/exercise`
Improving integration tests, asserting values in the response JSON
* Updating documentation
* Do not populate workflowId if it is not provided
set it to empty string (default), it is optional in the Ledger API
* 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
* verbatim move http-json docs to doc tree
* add json-api index to toc, convert md to rst
* better links
* sub-doc links, proper code inline
* replace headings according to README.md
* restore newlines
* one more newline
* point to rst docs from readme
* explain purpose of the JSON API and each endpoint
* daml-head not needed anymore, as in release
* oops 2 newlines
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 package compiled via daml migrate was missing the actual
Upgrade/Rollback templates. This is because we used `type` instead of
`template instance` to define those templates. Also, apparently we need
to export UpgradeInstance/RollbackInstance from DA.Upgrade in the
standard library.
* Improve UX of generic templates over Ledger API
Currently, if you write
```
template Template t => Proposal t with
receiver: Party
asset: t
where ...
template Iou with ...
template instance ProposalIou = Proposal Iou
```
you'll get the following DAML-LF types:
```
record Proposal t = { receiver : Party, asset : t }
record Iou = ...
record ProposalIou = { unpack : Proposal Iou }
```
The definition of `ProposalIou` is not particularly user friendly when used
over the Ledger API.
This PR changes the definition of `ProposalIou` to
```
record ProposalIou = { receiver : Party, asset : Iou }
```
Basically, the definition of `Proposal` is copied and `t` is instantiated
with `Iou`. This should make a much nicer UX.
* Update documentation
* Add test
* Fix docs examples
* Fix release notes
* Add some disclaimers about scenarios is Sandbox
* Something on errors
* Individual let bindings per line
* Update docs/source/daml/intro/5_Restrictions.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* 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
* 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: use generic templates for upgrades
Instead of generating templates we now have generic upgrade/rollback
templates in the standart library and we just create instances of in the
migration project. I will update the documentation in a follow up PR.
Let's have the correct help text in the docu until we know what we do
about MANIFEST and know whether we can drop the SOURCE argument from the
command.
* language: docu: documentation for the migrate command of damlc
This adds a section on how to migrate between two different versions of
two packages.
* addressing martin's comments
* addressing bernhard's comments
* Ledger topologies: first draft
* Participant node definition
* Regroup headings
* Marcin's comments
* Second attempt after discussion with Brian H
* Change the topic order in the navigation sidebar
* Apply suggestions from code review
Co-Authored-By: Shaul Kfir <shaul-da@users.noreply.github.com>
* Shaul's/Bernhard's comments
* Clarify the interoperability statement
* Bernhard's comments
* 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
This fixes all flakiness in `damlc test` that I was able to
reproduce. Previously, I got it to fail in about 10% of the cases
whereas now I have successfully run tests 200 times under load without
issues.
There were two issues at play here:
1. We run scenarios in separate threads to be able to kill the running
Shake session quickly even if a scenario has an infinite loop or
something like that (there is a timeout but it’s quite long). This
could result in one of those left-over threads trying to issue a
request while we are already trying to shut down.
To fix that, we wait for the concurrency semaphore to be empty before
shutting down.
2. Just waiting for scenario executions is not quite sufficient as
`runAction` does not wait for all rules to finish (we could just use
runActionSync in `damlc test` but I’d rather make this work
properly). While we do wait for all scenario executions to finish
there is one gRPC request in offInterest that we do not wait for:
gcCtxs.
To fix this, I’ve now routed all gRPC requests through the semaphore
which means that we will also wait for these requests to finish (or
prevent them from spawning).
This makes more sense anyway as scenario executions are mostly fairly
cheap requests while things like setting up the context are expensive
so we want to limit their concurrency.
We should make the concurrency limit configurable but I’ll leave that
for a separate PR.
* language: docs: added package import documentation
This adds a chapter on DAML archives and how to import them into other
projects to the documentation.
* Update docs/source/daml/reference/packages.rst
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* addressing comments
* removed random include in integration kit docu
* Cleanup
* WIP
* first integration test + fixture
* minor cleanup
* Implementing ContractService.lookup
* Reverting back to endpoints.all (all2 did not work)
* Cleanup
* replace ApiValue ADT with aliases to daml-lf/transaction Value ADT
* porting rest of navigator to LF Value ADT
* Command Service WIP
* CommandService WIP
* porting more of navigator to LF Value ADT
* last error, not first
* rename ApiValueImplicits file
* special conversion features for ImmArray and FrontStack
- just .to[ImmArray] or .to[FrontStack] any random collection
* finish porting most of navigator main code
* use numeric indices for record field name fallback when pretty-printing
* tuples are not serializable
* use numeric indices for label fallback in JSON verbose encoding
* make traverseEitherStrictly more likely to preserve the seq's class
* to shortcut for ImmArraySeq .to[ImmArraySeq]
* compiling, passing navigator backend tests
* test traverseEitherStrictly more, er, strictly
* pass scalacopts through to scaladoc
* deal with unused warning
* remove unneeded function
* simpler error reporting, more private functions in ApiCodecCompressed
* move slowApply to FrontStack, test it so it actually works
* remove unneeded toStrings; better error from impossible ValueTuple case
* scalafmt FrontStackSpec
* support alternative, label-free record JSON encoding
* Adding domain.CreateCommand + corresponding json formats and dummy json format for lav1.value.Record
* CommandService.create should be done... need to test it
* TODO added
* Cleanup
* move ApiCodecCompressed, ApiValueImplicits, and some aliases to new lf-value-json package
* Using tagged TemplateId type instead of Identifier + exercise command WIP
* adapt navigator to moved pieces
* start defining scalacheck extension to ApiCodecCompressedSpec
* CommandService.exercise + introducing CommandMeta
* Adding command endpoints, can't test them yet, need lf value json formats
* fuse some list operations
- suggested by @stefanobaghino-da; thanks
* blue error message
* Minor fixes after merging librify-navigator-json-compressed, #2136
* experiment with an inductive case in TypedValueGenerators
* finish a List case for TypedValueGenerators; it's revealing
* Introducing API value to LF value converter,
CommandsValidator takes IdentifierResolverLike instead of IdentifierResolver
* cleanup
* remove accidentally readded duplicate aliases
* start tying knots in TypedValueGenerators
* verbatim copy ApiCodecCompressedSpec to lf-value-json
* shift some tests from navigator to lf-value-json
* test Optional and Map for ApiCodecCompressed
* heavier random testing of ApiCodecCompressed
* remove unused dependencies from lf-value-json
* adding value json writer
* cleanup
* Revert "cleanup"
This reverts commit 2e4d153f
* fixing the build
* cleanup
* cleaning up imports
* JsValue to API value is done, needs a test
* cleanup
* use scalac -Ypartial-unification in http-json
* simplify some Traverse instances
* factor CreateCommand and ExerciseCommand traverse instances
* Command create integration test WIP
* Command create integration test WIP, got rid of the JsonReader and JsonWriter for the values, converting values explicitly
* Extracting DomainJsonDecoder and DomainJsonEncoder
* LfV refactoring
* Create command serialize/deserialize test works
* cleanup
* resolving conflicts
* More json encode/decode tests
* logging
* command/create passes integration test now
* Adding readme
* grammar
* TODO added
* GetActiveContractsResponse encoding
* ideintifier conversion renaming
* PackageService resolveTemplateId returns domain.TemplateId now
* Resolving LF Identifier instead of Template ID, this should also work for Exercise command decoding
* cleaning up a bit
* daml-lf: show type in TypedValueGenerators-driven errors
* exercise command json encoding/decoding works
* command/exercise IOU_Transfer integration test passes now
* avoid filter for Gens; makes many contract ID gens not fail
* test ApiCodecCompressed against 100 random types, 20 random values each
* Updating README instructions
* improving error handling, failed futures, get logged and reported to the user now as 500
* [ROUTING DSL] Removing routing DSL, it did not work
* getting rid of HttpEntity.Strict match + cleanup
* fixing the merge conflict
* updating README
* use Show.shows instead of new Show
* List(_) isn't checked, but Seq(_) is slightly safer
* improving test assertions
* Adding /contracts/lookup implementation
* http-json: use ImmArraySeq instead of List; use toRightDisjuction
* http-json: .toList.toSet is shorter than fold
* http-json: replace .leftMap.map with .bimap
* http-json: use subst instead of reimplementing JsonFormat
* http-json: remove unused ExceptionHandler
* http-json: safer == comparison
* Adding two test cases for expected errors
* Adding BazelRunfiles.rlocation magic that supposed to handle windows path for bazel dependencies
* http-json: import, not extend
* Fix typo in README.md and stale link in CONTRIBUTING.md
* Fix minor typos in quickstart
* Fix various minor typos/mistakes in DAML Intro
* Make DAML code in quickstart-java example cleaner
Also update module hash as well as screenshots in docs
The sourceRoot tag of the maven exec plugin isn't supported by the maven
integration in VS Code (which really is the eclipse stack).
Using the much more verbose build-helper-maven-plugin to make the
generated sources folder known to maven now makes the project properly
loadable by VS Code.
Fixes#887.
* document contract keys in the ledger model
* address small comments by Beth and Ognjen
* restructure key consistency and authorization
* address Ognjen's second round of comments
* Apply suggestions from code review
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* add a more meat to doc about enum types
* Update docs/source/app-dev/daml-lf-translation.rst
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Move files in daml-foundations/daml-ghc to compiler/damlc
There is also a bit of refactoring going on to actually split things
apart into sensible targets. What is still missing is a cleanup of the
module hierarchy and a cleanup of the test targets but I’ll leave
those for separate PRs.
As a nice bonus, this also reduces dependencies between targets so it
will speed up compiles.
* Update .hie-bios
* Bazel: 0.24.0 -> 0.27.0
* Update rules_haskell for Bazel 0.27 compatibility
* Update bazel-deps and bazel-watcher
* Windows escape JVM flags
* load commands at top of .bzl file
Bazel 0.27 no longer allows load commands that are not at the beginning
of the file.
* Update Bazel rules
* subpackage boundary
* native is not defined in BUILD files
* yarn: @bazel/hide-bazel-files
Seems to be required since latest rules_nodejs version. Otherwise, yarn
fails with errors about existing BUILD or BUILD.bazel files.
* grpc-java plugin visibility
* Update fat_cc_library
* Nix Python3 toolchain
* Iteration over depset
* dev_env_package: Create symlinks one level deeper
To prevent symlinking the BUILD file as well. The nested BUILD file
confuses Bazel as of 0.27 and rules_nodejs cannot find the node
executable anymore.
* Update rules_nodejs
* Add managed_directories for node_modules
* hie-bios: Extract bazel-genfiles from bazel info
Bazel 0.27 changed the genfiles location which breaks the hie-core test
on macOS.
* update cc_wrapper to Bazel 0.27
* bazel info -> bazel info bazel-genfiles
* Fix typo in BUILD
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* check that submitter is in maintainers when looking up keys
Fixes#1866. Note that this limitation applies both for `lookupByKey`
and `fetchByKey` -- anything involving retrieving a key is affected.
* add UNTIL-LF to run tests up to a certain version of DAML-LF
* name targets for DAML tests better
* add notes about DAML-LF changes
* commit Test.daml with DAML-LF 1.5 rather than compiling it on the fly
* add scenario tests for #1866
* add warnings about future key behavior in docs
* use flag rather than version when executing
Given that we already made the max message size configurable it only
seems reasonable to also make the timeout configurable and on very
large projects, we do sometimes hit this.
* Allow controlling the gRPC message limit via daml.yaml
We have had to raise that in the past since it caused issues on large
projects so it makes sense to make it configurable.
* Update unreleased.rst
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* adapting docs to match state as is regarding not supporting dalf files
* patching release notes instead
* validating for ZIP files in Cli parser
* guarding for parsing non zipped archives
* Update release-notes.rst
* Update unreleased.rst
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* Update unreleased.rst
* Update release-notes.rst
* Update release-notes.rst
* windows: root build
* windows: fixed haskell bindings tests
* windows: disable client_server_test test
* windows: marking daml_test flaky due to #1907
* windows: removing da-hs-damlc-app run from build.ps1
* windows: disable hie-core alias of currently disabled target
* Correct links and address wording changes from beth
* daml-integration-kit: clarify ledgers being built section
- drop separate Deployment Platform column, as it was confusing. Added
as references to managed offerings for partners that have them.
- use an intra-doc reference instead of a reference via docs.daml.com
for Sandbox docs
- reword intro for kit to position platform overview better
The main reason for doing a release is that I want to unblock
@bame-da’s upgrade of the bond trading example but there have also
been a few useful fixes and improvements.
* Update roadmap now we're three months in
* Edits after Neil discussion
* Remove comments
* Update docs/source/support/roadmap.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Move unreleased user-facing features to its own file
docs/source/support/release-notes.rst unfortunately represents a "global
lock" when it comes to submitting contributions: if another contribution
changed it while another was going through the CI/review process, the
latter would have to go again through the CI build after resolving the
conflict and merging the resulting commit.
The contributors originally tried to address this problem by letting the
system automatically performing this operation, but this failed because
release notes were moved to the wrong section by mistake.
This simple change would allow the contributors to let the system take
care of merging on its own, because existing release notes will no
longer be corrupted by the process.
There is a caveat: the automatic merging could result in invalid RST
(mostly because of missing newlines). This would push the task of
ensuring the release notes are valid RST to the release. I would argue
this can be done quite easily and that this is checked automatically
when rendering RST to HTML, so it could be a nuisance during release but
it would make the day-to-day contributions easier.
* Address https://github.com/digital-asset/daml/pull/1762#issuecomment-503540993
* Address https://github.com/digital-asset/daml/pull/1762#pullrequestreview-251676158
* Address https://github.com/digital-asset/daml/pull/1762#discussion_r295279530
* Remove HEAD section from release-notes.rst
* Address https://github.com/digital-asset/daml/pull/1762#pullrequestreview-251678791
* Address https://github.com/digital-asset/daml/pull/1762#issuecomment-503549896
* Add --install-assistant option
* Better doc on iActivate
* Determine whether to install assistant based on new flag
* Fix logic and update install warning
* Remove --activate from install.sh
* Add missing ]
* Change deprecation warning.
* Add release notes for new option.
* Update help text for install-assistant
* Fix release notes
* store archive size in `DarReader`
* rename `SandboxTemplateStore` to `SandboxPackageStore`
* store package info in `SandboxPackageStore`
* introduce package upload / read to write / index services
not tested yet, just a ton of plumbing
* WIP test the package service
* Fix build errors after rebase
* Move packages service to v2
* Ledger API client uses ledger API types
* Fix ReflectionIT
* Correctly handle uploading invalid dar files
* Fix reading DAR entry file sizes
* Improve package management IT
* Improve handling of duplicate packages
* Fix language-support build
* Use unique party and command names
* Rename lfpackage to language
* Rename SandboxPackageStore to InMemoryPackageStore
* Remove getCurrentTime ledger method
* Improve package management IT
* Move InMemoryActiveContracts and InMemoryPackageStore
* Use case object for UploadDarResult.Ok
* Address review comments
* Update release notes
Fixes#1311
* Use BazelRunfiles in test
This fixes#1606 which was caused by the fact that VSCode does not
send a close notification if the webview is closed.
The logic here is still a giant mess and has a bunch of stuff leftover
from previous VSCode APIs but I’ll clean it up in a separate PR.