Commit Graph

382 Commits

Author SHA1 Message Date
Gary Verhaegen
7b9932a7f3
specify which channels to post releases to (#5075)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-18 17:22:02 +00:00
Shayne Fletcher
76a37b9560
Update instructions (#5069)
changelog_begin
changelog_end
2020-03-18 14:22:24 +00:00
Shayne Fletcher
8a9e5e778a
Notes on updating release version (#5066)
* Notes on updating release version

changelog_begin
changelog_end

* Update release/RELEASE.md

Co-Authored-By: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Corrections

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-03-18 13:06:38 +00:00
Samir Talwar
7510d0d404
daml-assistant: Add daml sandbox-next. (#5045)
* daml-assistant: Add `daml sandbox-next`.

CHANGELOG_BEGIN
- [DAML Assistant] You can now run a pre-release version of Sandbox with
  ``daml sandbox-next`` so you can test it out and verify everything is
  working as expected. Running this will launch Sandbox rebuilt on a
  more modern architecture. An upcoming release of DAML will switch over
  to the new implementation by default.
CHANGELOG_END

* daml-assistant: Explain that sandbox-next is experimental.

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* daml-assistant: Copy-pasta an integration test for `daml sandbox-next`.

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-18 08:25:08 +00:00
Samir Talwar
cbeeb5aafc
sandbox: Fail to start if a time mode is not explicitly specified. (#5033)
* sandbox: Fail to start if a time mode is not explicitly specified.

CHANGELOG_BEGIN
- [Sandbox] Sandbox is switching from Static Time mode to Wall Clock
  Time mode as the default. To ensure that our users know about this,
  for one version, there will be no default time mode. Instead, users
  will have to explicitly select their preferred time mode by means of
  the `--static-time` or `--wall-clock-time` switches. In the next
  release, Wall Clock Time will become the default, and users who are
  happy with the defaults will no longer need to specify the time mode.
CHANGELOG_END

* daml-script|triggers: Specify time mode when testing against Sandbox.

* daml-assistant: Default the Sandbox to wall clock time.

CHANGELOG_BEGIN
- [DAML Assistant] Initializing a new DAML project adds a switch to
  ``daml.yaml`` to ensure Sandbox can continue to start with ``daml
  start``::

      sandbox-options:
        - --wall-clock-time
CHANGELOG_END

* docs: Update the DAML Script and Triggers docs to use Wall Clock time.

It's now what Sandbox will use by default when using `daml init`.

* docs: Change the Quickstart to run Sandbox in wall clock time.

This explains why the contract IDs may vary.

It also updates the manual release testing script to match.
2020-03-18 08:25:03 +00:00
Moritz Kiefer
9aa68cac4f
Fix detection of package ids for triggers (#5016)
Previously we assumed that the module name was globally unique in the
DAR which is definitely not guaranteed. Now we instead detect the
package id of the trigger library based on the type of the trigger we
are running which doesn’t fall apart if there are multiple versions of
the trigger library.

I’ve also removed the check for the package id of the trigger library
since I’d like the trigger runner to be backwarts compatible from now on (we
didn’t break that in a while).

This is slightly ugly since the Runner class is currently not specific
to a single trigger but only the individual methods are aware of the
specific trigger identifier. I’ll refactor this in a separate PR.

changelog_begin
changelog_end
2020-03-16 16:13:42 +01:00
Stefano Baghino
1f0534ea4f
Spin-off BuildInfo into its own (micro-)library (#5004)
* Spin-off BuildInfo into its own (micro-)library

CHANGELOG_BEGIN
CHANGELOG_END

* Fix dependencies

* Remove unused dependency
2020-03-16 09:04:00 +01:00
Gary Verhaegen
caf07566d2
add commands to extract relevant changelogs (#4905)
In the current state of the release instructions, the person in charge
of the release has to figure out how to produce the changelog. This PR
adds more specific (and hopefully simpler) instructions for producing
relevant changelogs.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-10 12:45:31 +01:00
Moritz Kiefer
c4fa115b67
Remove experimental note about DAML script from daml --help (#4917)
changelog_begin
changelog_end
2020-03-10 11:26:46 +00:00
Gerolf Seitz
72cafaef70
Update release testing to include running daml script (#4915)
Also the line numbers are updated.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-10 08:49:47 +01:00
Gary Verhaegen
8e217d219e
amend release process notes (#4871)
Based on running through the new process twice now, I wanted to try and
clarify some of the steps.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-09 12:50:18 +01:00
mergify[bot]
cb1395e923
Remove damlc migrate (#4816)
* Remove damlc migrate

``damlc migrate`` hasn’t worked for quite a while and we emitted a
warning for months so given that we don’t have plans to make it work
again in the near future, I think it does more harm than good to keep
it around.

changelog_begin

- [DAML Compiler] After being deprecated for a while the ``damlc
  migrate`` command has now been removed. See
  https://docs.daml.com/upgrade/ for up to date documentation
  on model upgrades.

changelog_end

fixes #3704 (by removing the tests 😇)

* yeah the windows cache is once again broken \o/

* Revert "yeah the windows cache is once again broken \o/"

This reverts commit 38d7877aa4.
2020-03-04 20:36:48 +00:00
Moritz Kiefer
ad0336d3a5
Freeze DAML-LF 1.8 proto (#4788)
* Freeze DAML-LF 1.8 proto

This is a copy of the 1.dev proto with the following changes that
overall remove all references to 1.dev:

* Change the versions and the reference to the spec.
* Remove `dev` from version history at the top.
* Remove `GENMAP` and corresponding primitives.
* Remove general equality `EQUAL` and the comments that the
  type-specific equality primitives are only available in < 1.dev
* Remove experimental text primitives.

changelog_begin
changelog_end

* windows is very bad

* bump windows hashes
2020-03-03 14:21:00 +01:00
Samir Talwar
a99156252d
libs-scala/ports: Wrap socket ports in a type, Port. (#4784)
* libs-scala/ports: Wrap socket ports in a type, `Port`.

* sandbox: Use `Port` for the API server port, and propagate.

CHANGELOG_BEGIN
CHANGELOG_END

* extractor: Use `Port` for the server port.

* ports: Make Port a compile-time class only.

* ports: Allow port 0; it can be specified by a user.

* ports: Publish to Maven Central.
2020-03-03 08:59:15 +00:00
Gary Verhaegen
5a117dc358
introduce new release process (#4513)
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
2020-02-25 17:01:23 +01:00
Moritz Kiefer
38b7e65197
Add documentation for DAML repl and advertise it (#4678)
* 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>
2020-02-25 11:16:31 +00:00
Moritz Kiefer
8d81399c0f
Add an experimental DAML script REPL (#4660)
As mentioned in the title, this is still very experimental and needs
more work before we want to advertise it. However, the code is in a
somewhat reasonable shape, there are tests and I think even in the
current state it is already useful. Also this PR is already getting
very large so I don’t want to hold off much longer before merging this.

It is included in the SDK but hidden from `damlc --help` and `daml
--help` until the most pressing issues are addressed (primarily around
making sure that it doesn’t just shut down if you have a type error
and better error messages in general).

changelog_begin
changelog_end
2020-02-24 11:06:27 +01:00
Samir Talwar
2c4807f3bf
release: Sort artifacts.yaml. (#4502)
I verified that there are no semantic changes, only cosmetic ones, by
running the following before and after, and checking the diff.

```
< release/artifacts.yaml ruby -rjson -ryaml -e 'puts JSON::generate YAML::load $stdin' | jq '. | sort_by(.target)' > ~/Desktop/artifacts.{old,new}.json
```

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-13 13:52:48 +00:00
fabiotudone-da
6e1fd55e45
Publish com.daml.ledger:participant-state-kvutils-app (#4480)
CHANGELOG_BEGIN
CHANGELOG_END
2020-02-12 09:45:52 +01:00
Samir Talwar
6fd402f634
Sandbox: Preliminary work to rebuild Sandbox on top of kvutils. (#4422)
* resources: Allow for startup exceptions without no stack trace.

* sandbox: Remove dependency duplication in the BUILD file.

* ledger-on-(memory|sql): Extract `Main` into its own file tree.

This is so we can remove the dependency on kvutils/app from the library.

logback.xml goes with it.

* sandbox: Implement "Sandbox Next" on top of ledger-on-sql.

CHANGELOG_BEGIN
- [Sandbox] Preliminary work to rebuild Sandbox on top of the DAML
  Ledger Integration Kit. Currently not exposed through the CLI.
CHANGELOG_END

* ledger-on-sql: Publish to Maven Central.

* sandbox: If an unknown database is passed to Sandbox Next, handle it.

* resources: Catch errors in owner construction or acquisition.

Sometimes we're not in a future yet.

* resources: Don't run ProgramResource error handling inside the EC.

Otherwise we end up in deadlock which is only broken by
`awaitTermination` timing out.
2020-02-06 17:34:17 +00:00
Moritz Kiefer
fc87953ed4
Enhanced completions for the assistant (#4420)
* Enhanced completions for the assistant

changelog_begin

- [DAML Assistant] The assistant can now do completions for SDK
  commands, e.g., ``daml ledger upl<TAB>`` will complete to ``daml
  ledger upload-dar``.

changelog_end

* Apply suggestions from code review

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>

Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
2020-02-06 15:16:12 +01:00
Gary Verhaegen
47bd131f15
add copyright headers to yml files (#4407)
We seem to have forgotten about them in the copyright scripts.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-06 12:54:07 +01:00
Moritz Kiefer
bd127d6c47
Flip the default on mavenUpload in artifacts.yaml (#4396)
changelog_begin
changelog_end
2020-02-05 10:32:02 +01:00
Moritz Kiefer
60e32a98c4
Disable release step on macos (#4330)
Originally we ran the release step on both Linux and MacOS to handle
platform dependent artifacts, in particular, damlc.jar. However, we
don’t have any platform dependent artifacts that are uploaded as part
of the release script anymore and I hope we will never have to add any
in the future.

So this PR, removes the code for handling platform dependent artifacts
in the release step and disables the release step on MacOS (while
still setting the variables like we do on Windows).

Currently the release step still costs us ~2 minutes on MacOS which is
already our slowest platform so hopefully this will speed things up a
bit.

changelog_begin
changelog_end
2020-01-31 17:08:47 +01:00
Robin Krom
eacacbf44e
fix release script (#4275)
* fix release script

only upload from the linux machine and escape arguments to `publish`,
otherwise they get interpreted by bazel.

CHANGELOG_BEGIN
CHANGELOG_END

* Update release/src/Main.hs

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update release/src/Main.hs

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* bracket -> bracket_

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-01-30 10:51:39 +01:00
Robin Krom
ce9cd93519
publish npm packages as public (#4263)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-29 17:26:46 +01:00
Robin Krom
2e9fe6afb6
language: add daml-react package to ts libraries (#4259)
* language: add daml-react package to ts libraries

This adds the library formerly known as `daml-react-hook` into the
monorepo. We renamed it to `@daml/react`.

The tests sadly don't work with bazel right now because the local
imports aren't resolved correctly. Local testing with `yarn run test`
works as usual.

CHANGELOG_BEGIN
CHANGELOG_END

* address moritz comments

* get rid of DAVL mentions

* fix eslint warnings

* Update language-support/ts/daml-react/tsconfig.json

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-01-29 15:37:47 +01:00
Shayne Fletcher
0e53ec0a2b Integrate daml2ts into the assistant (#4252)
changelog_begin
- Generate TypeScript bindings to DAML with `daml codegen ts DAR -o OUTDIR`
changelog_end
2020-01-28 22:03:54 +00:00
Shayne Fletcher
9c0fe75b94
Add daml2ts to the SDK release tarball (#4234)
changelog_begin
- daml2ts now included in the SDK
changelog_end
2020-01-27 13:18:05 -05:00
Moritz Kiefer
1a0fb138fb
Ignore missing maven deps on macos (#4201)
Currently, pretty much all of our builds are bottlenecked on
MacOS (mainly because the builders are slower and have worse
caching). The release step adds > 3min to each build which is a bit
annoying. It turns out that removing the calls to `bazel query` which
are used to check for missing Maven dependencies speeds this up by >
5x. Given that the check is platform independent anyway, we can just
disable it on MacOS.

changelog_begin
changelog_end
2020-01-24 16:17:08 +00:00
Robin Krom
811d740df5
upload typescript packages to npm registry (#4185)
* make packages public

This uploads the typescript npm packages of the language support to the
npm registry in the release process.

CHANGELOG_BEGIN
CHANGELOG_END

* address moritz/gary's review

* generate the .npmrc file

* adding debug output

just in case the upload will fail in the next release.

* reverse package order
2020-01-23 18:31:50 +01:00
Moritz Kiefer
2fb107b505 Remove damlc.jar (#4157)
* Remove damlc.jar

We never advertised or published this externally and our only internal
user has moved off this months ago already.

changelog_begin
changelog_end

* Remove dependency from navigator test lib on damlc jar
2020-01-22 16:44:27 +00:00
Samir Talwar
e2a5b26475
contextualized-logging: Move to its own Bazel package. (#4138)
I want to use this in _ledger/ledger-on-sql_, which doesn't depend
directly on Sandbox.

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-21 14:25:06 +01:00
Stefano Baghino
1ad7d6c24c
Replace NamedLoggerFactory (#4097)
* Replace NamedLoggerFactory

CHANGELOG_BEGIN
CHANGELOG_END

* Recover change lost in rebase

* Address https://github.com/digital-asset/daml/pull/4045#discussion_r366883577

* Address https://github.com/digital-asset/daml/pull/4045#discussion_r366885112

* Address two open review comments

Address https://github.com/digital-asset/daml/pull/4045#discussion_r366885448
Address https://github.com/digital-asset/daml/pull/4045#discussion_r366885981

* Address outstanding compilation errors

* Replace mocking with in-memory log collector

* Address https://github.com/digital-asset/daml/pull/4097#pullrequestreview-344639319

* Address https://github.com/digital-asset/daml/pull/4045#discussion_r366886250

The generation of code to have logging in the services has been replaced
by helpers classes. This will allow to enrich the context received at
construction by the service implementations.

* Use ContextualizedLogger for TrackerMap

* Remove deleted logging packages from artifacts.yaml

* Remove remaining deleted artifact from artifacts.yaml

* Address https://github.com/digital-asset/daml/pull/4097#discussion_r368640231

* Address https://github.com/digital-asset/daml/pull/4097#discussion_r368648027

* Address https://github.com/digital-asset/daml/pull/4097#discussion_r368652178

* Address https://github.com/digital-asset/daml/pull/4097#discussion_r368654996

* Annotate type of references to logErrorOnCall

* Address https://github.com/digital-asset/daml/pull/4097#discussion_r368869575
2020-01-21 10:57:28 +01:00
Samir Talwar
b96e54f640 libs-scala/resources: Move Resource and friends to their own package. (#4066)
* libs-scala/resources: Move `Resource` and friends to their own package.

CHANGELOG_BEGIN
- [Ledger API Server] Publish the resource management code as a library
  under ``com.digitalasset:resources``.
CHANGELOG_END

* libs-scala/resources: Add to the artifacts list.

* libs-scala/resources: Factor out the test helpers into test/lib.

* libs-scala/resources-akka: Make the Akka resources an optional dep.
2020-01-16 14:13:18 +00:00
Andreas Herrmann
6e25d10fe2
daml test-script (#3918)
* Start on daml test-scripts

* Run all `Script a` as test cases

* LedgerClient: Expose PackageManagementClient

To enable DAR uploads

* Upload the DAR to the ledger

* Start sandbox if no ledger specified

* Format daml test-script

* Fix deprecation warning on ActorMaterializer

* Add test-case //daml-script/tests:test_daml_script_test_runner

* Add daml test-script command

CHANGELOG_BEGIN

- [DAML Script - Experimental] Allow running DAML scripts as test-cases.
  Executing ``daml test-script --dar mydar.dar`` will execute all
  definitions matching the type ``Script a`` as test-cases.
  See `#3687 <https://github.com/digital-asset/daml/issues/3687>`__.

CHANGELOG_END

* daml-test-script enable logging

* Remove outdated TODO comment

* daml script-test More elaborate test-caseo

Compare to expected output and add failing test-case

* daml test-script Don't abort on test-failure

Before the test runner would abort on the first failed test-case. This
occasionally introduce additional test-failures if the sandbox was
torn down half-way through execution.

* ./fmt.sh

Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
2020-01-03 15:01:36 +01:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
Stefano Baghino
7020ed3b15
Moves CommandCompletionIT to Ledger API Test Tool (#3901)
* Moves CommandCompletionIT to Ledger API Test Tool

Closes #2841

Also refactors test observers into a single API and unifies the existing implementations of the DirectExecutionContext

* Allow explicit offsets to get checkpoints

* Raise checkpoint test timeout

* Consolidate checkpoint tests in a single test case

* Fix compilation issues

* Exclude command submission/completion tests for rev-v2

* Drop test not relevant for Ledger API implementations

* Fix compilation errors
2019-12-20 15:55:23 +01:00
Rohan Jacob-Rao
2b4a79c68f Tidy up release instructions (#3911)
* Tidy up first step of release instructions

* Minor adjustments to the rest of the instructions

* Fix

* Tweak
2019-12-20 11:12:12 +01:00
Gary Verhaegen
2b3693bf4d
restore 0.13.38 logging defaults for daml jars (#3819)
CHANGELOG_BEGIN
- [Sandbox] Restore 0.13.38 logging behaviour.
- [Navigator] Restore 0.13.38 logging behaviour.
- [Extractor] Restore 0.13.38 logging behaviour.
- [Internals] As of 0.13.39, we merged a number of internal JAR files in
  the SDK tarball to reduce its size. These jars used to be standalone
  JARs you could invoke as e.g. ``java -jar sandbox.jar <args>``. As a
  result of merging the jars, they lost their individual ``logback.xml``
  configuration file. Although running the jars directly was (and is
  still) not supported, note that you can now achieve the same behaviour
  with e.g. ``java -Dlogback.configurationFile=sandbox-logback.xml -jar
  daml-sdk.jar sandbox <args>``.
CHANGELOG_END
2019-12-12 14:02:23 +01:00
Remy
0107228c49
daml-lf: distribute daml_lf_1.7_archive_java_proto (#3792) 2019-12-10 12:24:55 +01:00
Samir Talwar
639eba2c17 ledger-api-scala-logging: Fix errors in IntelliJ IDEA. (#3785)
* ledger-api-scala-logging: Fix errors in IntelliJ IDEA.

The Bazel plugin for IntelliJ doesn't seem to be smart enough to be able
to handle a Scala library that is part `src` directory and part
generated code from another Bazel rule. It just ignores the second part.
This means that IntelliJ cannot find the *ServiceLogging classes, as
they're not represented on the Bazel-generated classpath, and so
complains with lots of errors when working on the equivalent Api*Service
files.

To fix this, we can split these in two, compiling the base traits to
`ledger-api-scala-logging-base` and then the generated code separately.

It does result in an extra Bazel dependency for the users of
ledger-api-scala-logging, as Bazel doesn't realise transitive
dependencies for us.

* Release: Add `ledger-api-scala-logging-base` to the Maven list.
2019-12-09 16:02:59 +00:00
Moritz Kiefer
ab59376cb3 Fix Sdk-Version field in daml-sdk-head (#3759)
In #3706 we fixed the SDK versions of the daml-trigger an daml-script
libraries and (rightfully) stopped filtering out 0.0.0 from the SDK
version check in `damlc build`. However, this broke daml-sdk-head
since we still distributed the DARs in daml-sdk-head with the
Sdk-Version set to whatever the current release is rather than 0.0.0.
2019-12-06 10:08:37 +00:00
Moritz Kiefer
022c60ccb3 Publish the thin trigger library instead of the fat jar (#3739)
This still contains the main class so you can use it like you would
use the fat jar but publishing fat jars to maven central is apparently
bad practise and some peple have asked for the library.

This includes some slight tweaks to the scala_docs rule to make it
capable of coping with the generated source file and a hack in the
release script to avoid it complaining about the scenario proto
library not being published to Maven even though it is included in the
transitive deps.
2019-12-05 13:04:20 +00:00
Stefano Baghino
5254520b80 Spin off TokenHolder into a new library (#3741)
* Spin off TokenHolder into a new library

Avoids having weird dependencies between different packages, makes TokenHolder available on Maven

* Fix auth-utils path
2019-12-05 12:31:14 +00:00
Moritz Kiefer
08b98602b1
Build SDK head tarball directly (#3723)
Previously, we constructed the tarball used by daml-sdk-head by first
building the regular SDK release tarball only to the extract it, patch
the version file and recompress it. This adds about 30-60s to every
invocation of daml-sdk-head.

This PR changes this by factoring out the logic from building the
release tarball into a macro that we instantiate twice, once with the
proper version file and once with a dummy HEAD version file set to
0.0.0.

This does change the format of the sdk-head-tarball slightly, in
particular the files are now located under sdk-0.0.0 instead of
sdk-head. However, this doesn’t matter anyway afaik and I think the
new format makes more sense anyway considering that the regular
release tarballs have something like sdk-0.13.38.
2019-12-04 13:04:15 +01:00
Samir Talwar
5dd38d54e8 sandbox: PostgreSQL health checks. (#3655)
* ledger-api-test-tool: Increase the duration when watching health.

This should hopefully stop CI from flaking out.

* reference-v2/sandbox: Avoid unnecessary companion object constructors.

I like indirection… when it does something.

* ledger: Propagate empty health checks throughout the services.

* reference: Remove duplication from the ReferenceServer object.

* ledger-api-common: Actually query a "reporter" in the health service.

* ledger-api-common: Report health per-component when required.

* ledger-api-health: Use a Map to represent components for health checks.

* sandbox: Fix warnings in SqlLedgerSpec.

* ledger-api-common: Throw GrpcHealthService errors inside the Future.

* ledger: Implement health checks against the PostgreSQL connection.

Without proper testing, because I am not great at this.

* sandbox: Remove duplication and fix warnings in PostgresAround.

* sandbox: Test the SQL Ledger's health reporting on failure.

* sandbox: Don't report as unhealthy until 3 connections fail.

* ledger-api-health: Remove unused parts of the API.

Bit of premature design there.

* sandbox: Rename the "ledger" health check to "write".

* participant-state: Add the ReportsHealth trait to ReadService.

* ledger-api-common: `Future.fromTry(Try(…))` -> `Future(…)`.

* ledger-api-common: Make it clearer that StubReporter closes over health.

* ledger-api-common: Explain the HealthService watch tests with comments.

* sandbox: Clean up SqlLedger a bit.

* sandbox: Don't try and stop PostgreSQL twice in PostgresAround.

* bazel_tools: Windows rlocation lookups need to be with forward slashes.

* release: Fix case of "true".

* ledger-api-common: Make `GrpcHealthService::matchResponse` return a Try.

* ledger-api-common: Make `GrpcHealthServiceSpec` async.

* sandbox: Make a couple of DB classes final.

* sandbox: Avoid importing `X._` in PostgresAround.

* sandbox: Add clues to the SqlLedgerSpec's multiple assertions.

* sandbox: If PostgreSQL doesn't come back up, keep retrying.

* sandbox: Remove duplication in SqlLedgerSpec.

* sandbox: In SqlLedgerSpec, actually wait for the health to change.

* sandbox: In PostgresAround, make stopping PostgreSQL idempotent.

* sandbox: Simplify the SqlLedgerSpec to make it work on CI.

It's worth a shot.

* ledger-api-common: Simplify the GrpcHealthServiceSpec a little.

And add a changelog.

CHANGELOG_BEGIN

- [Ledger API Server] Add a health check endpoint conforming to the
  `GRPC Health Checking Protocol <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_.
- [Ledger API Server] Add health checks for index database connectivity.
- [Participant State API] Add a mandatory ``currentHealth()`` method to
  ``IndexService``, ``ReadService`` and ``WriteService``.

CHANGELOG_END

* sandbox: Improve the Javadoc layout for DbDispatcher.

* sandbox: Capitalize constants in SqlExecutor.

* ledger-api-health: Convert HealthStatus to an abstract class.
2019-11-29 15:07:43 +00:00
associahedron
2713d6978d
Reduce SDK tarball size by 70% by deduplicating Scala dependencies. (#3678)
* Start moving all the jars into a single jar.

* Fold navigator into daml-sdk jar

* include sandbox

* Remove unnecessary compileDeps.

CHANGELOG_BEGIN

- [DAML SDK] Reduced the size of the DAML SDK by about
60% uncompressed, 70% compressed, by deduplicating Scala
dependencies.

CHANGELOG_END

* update copyright header

* buildifier fix
2019-11-29 13:26:47 +00:00
Oliver Seeliger
f11a3ce9a7
Release triggers to maven central (#3674) 2019-11-29 10:25:02 +01:00
Brian Healey
02186ef068 Ledger configuration indexing changes (rebased to master) (#3553)
* Add participant-state configuration protobuf

- Move the "DamlConfiguration" from kvutils into participant-state/protobuf/ledger_configuration.proto.
- Add version number and spec (ala transaction.proto)

This is a preparation for indexing the configuration and having one canonical serialization for it.

* Initial thoughts on indexing the configuration

* Implement indexing of ledger configuration changes

* Add record time to all Updates. Wire through participant id.

and rename V7__Add_configuration to V8.

* Add ledger_configuration_java_proto to release artifacts

* Fix up release of ledger_configuration_java_proto

* Suggestions from review

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Apply suggestions from code review

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* address rebase issues

* Resolve compilation errors after rebase/merge

* happy formatting for scala and bazel and friends

* Drop "openWorld" setting from configuration

And refactor the tests to allocate parties explicitly.

* Fix up migration and tests

* Drop authorizedParticipantIds from configuration

Implement configuration authorization in kvutils using the previous
the participant id of the previous configuration.

* Post-rebase fixes

* Add missing migrations

* Apply suggestions from code review

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Add missing mavenUpload to ledger-api-server

* Remove stateUpdateRecordTime

* Address code review

- Address PR review
- Merge TimeModelImpl and the traits. Remove TimeModel from ledger-api-common.
- Throw `Err` from KeyValueConsumption on parse errors instead of assert/sys.error

* Reformat

* Add missing protobuf file

* Fix compilation after TimeModel changes. Add version logs to participant-state{,-kvutils}.

* Fix TestUtil.scala build

* Apply suggestions from code review

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Address review

- synchronized access to ledgerConfiguration in InMemoryLedger
- store rejection if configuration generation is wrong

* Update ledger/participant-state/protobuf/ledger_configuration.rst

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
2019-11-27 17:41:23 +01:00
Stefano Baghino
4d922e763b Add authentication to Java identity client (#3630)
* Add authentication to Java identity client

Contributes to #3626

No changelog added right now, it will be added with the PR that
effectively closes the ticket.

Moves `LedgerCallCredentials` to a shared package.

Establishes the test framework for other Java clients.

* Address https://github.com/digital-asset/daml/pull/3630#discussion_r350663731

* Address https://github.com/digital-asset/daml/pull/3630#discussion_r350663731

* Rebase and fix compilation errors

* Fix type of jar in artifacts.yaml

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Fix more errors emerged after rebase

* Add dependency for DAML assistant ITs

* Add missing dependency

* Fix wrong dependency

* fix release
2019-11-26 18:51:09 +00:00
Samir Talwar
0ff716df2a Ledger API: Add healthcheck endpoints. (#3573)
* grpc-definitions: Delete health_service.proto

We can use the version in io.grpc:grpc-services instead.

* ledger: Delete ledger/API.md.

* sandbox: Fix warnings in ApiServices flagged by IntelliJ.

* sandbox: Implement a dummy grpc.health.v1.Health.Check endpoint.

* sandbox: Implement a dummy grpc.health.v1.Health.Watch endpoint.

* sandbox: Drop repeated elements from grpc.health.v1.Health.Watch.

* sandbox: Wrap the HealthService in basic tests.

* sandbox: Stop streaming the server health too.

* ledger-api-test-tool: Health check tests.

* Add a changelog entry for the health check endpoints.

CHANGELOG_BEGIN

- [Ledger API] Add healthcheck endpoints, conforming to the
  `GRPC Health Checking Protocol <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_.
  It is always ``SERVING`` for now.

- [DAML Ledger Integration Kit] Add conformance test coverage for the
  ``grpc.health.v1.Health`` service.

CHANGELOG_END

* ledger-api-integration-tests: Increment the number of services.

* Apply suggestions from code review

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* sandbox: Use `AkkaBeforeAndAfterAll` in the HealthServiceSpec.

In an attempt to get it working on CI.

* sandbox: Change `dropRepeated` to `DropRepeated()`.

Keep it in one file.

* test-common: Use `Delayed.by` in `TimeBoundObserver`.

* test-common: Close the source when `TimeBoundObserver` completes.

* ./fmt.sh

That'll teach me not to `--no-verify` just because it's a merge commit.

* sandbox: Inline `HealthService.suppress`.

At some point it was being used twice.

* sandbox: Increase the timeout for HealthServiceSpec.

* sandbox: Reimplement HealthService using the Scala protobuf types.

* sandbox: Generate an Akka-compatible trait for the health service.

And refactor a lot of test code to make it easy to test.

* ledger-api-common: Move the HealthService here.

* rs-grpc-testing-utils: Publish to Maven.

* rs-grpc-testing-utils: Add Maven coordinates.
2019-11-22 14:02:05 +00:00
Stefano Baghino
84e6064d51 Remove unreleased.rst (#3547)
* Start working on getting rid of unreleased.rst

Document new process in CONTRIBUTING.md,
.github/pull_request_template.md and unreleased.rst (for good measure)

Report the previous changelog additions here so that they're not lost in
the mist of times.

CHANGELOG_BEGIN

- [DAML Stdlib] Added the ``NumericScale`` typeclass, which improves the type inference for Numeric literals, and helps catch the creation of out-of-bound Numerics earlier in the compilation process.

- [DAML Triggers] ``emitCommands`` now accepts an additional argument
  that allows you to mark contracts as pending. Those contracts will
  be automatically filtered from the result of ``getContracts`` until
  we receive the corresponding completion/transaction.

- [Navigator] Fixed a bug where Navigator becomes unresponsive if the ledger does not contain any DAML packages.

- [Ledger-API] Add field ``gen_map`` in Protobuf definition for ledger
  api values. This field is used to support generic maps, an new
  feature currently in development.  See issue
  https://github.com/digital-asset/daml/pull/3356 for more details
  about generic maps.

  The Ledger API will send no messages where this field is set, when
  using a stable version of DAML-LF.  However the addition of this
  field may cause pattern-matching exhaustive warnings in the code of
  ledger API clients. Those warnings can be safely ignored until
  GenMap is made stable in an upcoming version of DAML-LF.

- [JSON API - Experimental] CLI configuration to enable serving static content as part of the JSON API daemon:
  ``--static-content "directory=/full/path,prefix=static"``
  This configuration is NOT recommended for production deployment. See issue #2782.

- [Extractor] The app can now work against a Ledger API server that requires client authentication. See `issue #3157 <https://github.com/digital-asset/daml/issues/3157>`__.
- [DAML Script] This release contains a first version of an experimental DAML script
   feature that provides a scenario-like API that is run against an actual ledger.
- [DAML Compiler] The default DAML-LF version is now 1.7. You can
  still produce DAML-LF 1.6 by passing ``--target=1.6`` to ``daml
  build``.

- [JSON API - Experimental] The database schema has changed; if using
  ``--query-store-jdbc-config``, you must rebuild the database by adding
  ``,createSchema=true``.
  See `issue #3461 <https://github.com/digital-asset/daml/pull/3461>`_.

- [JSON API - Experimental] Terminate process immediately after creating schema. See issue #3386.

- [DAML Stdlib] ``fromAnyChoice`` and ``fromAnyContractKey`` now take
  the template type into account.

CHANGELOG_END

* Document new release process to gather changelog additions

* Change the release script to ignore unreleased.rst

* Remove spurious unreleased.rst lines

* Transition to use tags

* Document new way to get changelog additions with tags

* Update release/RELEASE.md

Co-Authored-By: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Address https://github.com/digital-asset/daml/pull/3547#discussion_r348438786

* Document correction process

* Add copyright header to unreleased.sh

* Update CONTRIBUTING.md

Co-Authored-By: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Modify CONTRIBUTING.md after @garyverhaegen-da's proposal

* Make unreleased.sh run per commit and treat tags as case-insensitive

* Fix documentation for replacements
2019-11-20 15:16:57 +00:00
Moritz Kiefer
7deca903bb Add documentation for DAML script and bundle it in the SDK (#3527) 2019-11-19 17:19:57 +00:00
Stefano Baghino
c51ecd3c58
Extractor with authentication (#3514)
* Make Extractor work against Ledger API servers protected by authentication

* Update changelog

* Address https://github.com/digital-asset/daml/pull/3514#pullrequestreview-318811500

- https://github.com/digital-asset/daml/pull/3514#discussion_r347753205
- https://github.com/digital-asset/daml/pull/3514#discussion_r347753629
- https://github.com/digital-asset/daml/pull/3514#discussion_r347754462

* Address https://github.com/digital-asset/daml/pull/3514#discussion_r347755484

* Address https://github.com/digital-asset/daml/pull/3514#discussion_r347752424

* Address https://github.com/digital-asset/daml/pull/3514#discussion_r347756328

* Fix docs

* Fix artifacts.yaml
2019-11-19 17:12:25 +01:00
Moritz Kiefer
e4632f5fb2 Include "daml trigger" in "daml --help" (#3528) 2019-11-19 16:19:17 +01:00
Oliver Seeliger
f50901347f
Release lf scalacheck test jars to maven central (#3519)
as they are dependencies used downstream
2019-11-19 13:10:28 +01:00
Gerolf Seitz
5f8bf411bd
Upload proto and deploy jars to maven (#3507)
* Add helper to produce an empty zip files.

This is used to generate empty sources and javadoc jars for
deploy jars later on.

* Create empty auxilliary jars.

da_java_binary:
  - empty javadoc jar
  - empty sources jar

da_java_proto_library:
  - empty javadoc jar
  - the sources jar is automatically generated by java_proto_library as a side effect

da_scala_binary:
  - empty javadoc jar
  - empty sources jar

* Support maven upload for jar-deploy and jar-proto

For jar-deploy targets we don't check for internal dependencies,
because these should already be contained in the (fat-)jar itself.

Additionally, the release program now uploads javadocs and sources
for jar-proto and jar-deploy as well to comply with maven central.

* Upload ledger-api-test-tool and kvutils + dependencies to maven central.

This is the diff running the output of the release without and with these changes.
A few artifacts now also get their javadoc and sources uploaded (mostly to bintray,
but now they are ready for a maven central upload).

ledger-api-test-tool has the scala version removed from the artifact as it is a
deploy jar and nobody should care which specific scala version is used.

Only in release/com/daml/ledger/participant-state-kvutils-java-proto/100.13.35: participant-state-kvutils-java-proto-100.13.35-javadoc.jar
Only in release/com/daml/ledger/participant-state-kvutils-java-proto/100.13.35: participant-state-kvutils-java-proto-100.13.35-sources.jar
Only in release/com/daml/ledger/testtool: ledger-api-test-tool
Only in release-before/com/daml/ledger/testtool: ledger-api-test-tool_2.12
Only in release/com/digitalasset/daml/lf/engine/trigger/runner_2.12/100.13.35: runner_2.12-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml/lf/engine/trigger/runner_2.12/100.13.35: runner_2.12-100.13.35-sources.jar
Only in release/com/digitalasset/daml-lf-blindinginfo-java-proto/100.13.35: daml-lf-blindinginfo-java-proto-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml-lf-blindinginfo-java-proto/100.13.35: daml-lf-blindinginfo-java-proto-100.13.35-sources.jar
Only in release/com/digitalasset/daml-lf-transaction-java-proto/100.13.35: daml-lf-transaction-java-proto-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml-lf-transaction-java-proto/100.13.35: daml-lf-transaction-java-proto-100.13.35-sources.jar
Only in release/com/digitalasset/daml-lf-value-java-proto/100.13.35: daml-lf-value-java-proto-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml-lf-value-java-proto/100.13.35: daml-lf-value-java-proto-100.13.35-sources.jar
Only in release/com/digitalasset/damlc/100.13.35: damlc-100.13.35-javadoc.jar
Only in release/com/digitalasset/damlc/100.13.35: damlc-100.13.35-sources.jar
Only in release/com/digitalasset/extractor/100.13.35: extractor-100.13.35-javadoc.jar
Only in release/com/digitalasset/extractor/100.13.35: extractor-100.13.35-sources.jar
Only in release/com/digitalasset/ledger-service/http-json-deploy/100.13.35: http-json-deploy-100.13.35-javadoc.jar
Only in release/com/digitalasset/ledger-service/http-json-deploy/100.13.35: http-json-deploy-100.13.35-sources.jar
Only in release/com/digitalasset/navigator/100.13.35: navigator-100.13.35-javadoc.jar
Only in release/com/digitalasset/navigator/100.13.35: navigator-100.13.35-sources.jar
2019-11-18 14:40:15 +01:00
Gary Verhaegen
8a024c549f release instructions: add label to PR (#3489) 2019-11-15 15:55:36 +00:00
Gerolf Seitz
172ce90597
Upload codegen fat-jars to maven central (#3476) 2019-11-14 18:40:54 +01:00
Gerolf Seitz
e760d4749f Check internal dependencies of maven artifacts (#3454)
* Check internal dependencies of maven artifacts

All artifacts that are uploaded to maven need to also have
their dependencies uploaded to maven.

* inline tuple matching

* remove unnecessary parenthesis

* mark missing artifacts for maven upload
2019-11-14 14:18:54 +01:00
Andreas Herrmann
33e47828e3
Bazel 1.1 (#3249)
* 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
2019-11-11 10:06:03 +01:00
Remy
ce36674ea0 daml-lf: clone dev protobuf for LF 1.7 (#3371) 2019-11-07 12:32:38 +00:00
Stefano Baghino
a2725415eb Add artifacts publishing for //ledger/ledger-api-grpc-utils (#3370)
* Add artifacts publishing for //ledger/ledger-api-grpc-utils

* Address https://github.com/digital-asset/daml/pull/3370#discussion_r343509550
2019-11-07 08:13:18 +00:00
Stephen Compall
d0ec381925 json-api: store contracts similar to Extractor's single-table (#3192)
* 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
2019-11-06 13:53:16 -05:00
Jussi Mäki
0ca8580914 Fix the import paths of {value,transaction,blindinginfo}.proto (#3312)
* Fix the import paths of {value,transaction,blindinginfo}.proto

This cleans the imports in daml_kvutils.proto:

  -import "daml-lf/transaction/src/main/protobuf/transaction.proto";
  +import "com/digitalasset/daml/lf/transaction.proto";

This shouldn't be a breaking change to the outside as the proto files
themselves are not published, only the java libraries generated from them.

* Update missed deps
2019-11-01 14:54:55 +00:00
Robert Autenrieth
e887318f4f Move AuthService (#3272)
* Move AuthService and Claims

* Move interceptor and authorization wrappers

* Add artifact

* Address review comments
2019-10-29 15:46:43 +00:00
Moritz Kiefer
6c36777a8e
Release DAML trigger runner to Bintray (#3243)
This should make it a bit easier to use in a managed environment and
has been requested by some users.
2019-10-21 18:14:46 -04:00
Martin Huschenbett
9b71bf03ea Remove horribly outdated docker image (#3221)
We don't even have the `da` tool anymore referenced in there.
2019-10-18 12:17:22 +00:00
Remy
a3518d671e daml-lf proto: archive proto for daml-lf 1.6 (#3142)
* daml-lf proto: archive proto for daml-lf 1.6

* try to fix archive ProtoTest for windows

* more windows fix for  archive ProtoTest
2019-10-15 18:35:20 +00:00
Remy
e45b585307 daml-lf: repackage daml-lf archive proto (daml_lf -> daml_lf_dev) (#3169) 2019-10-15 09:36:11 +00:00
Remy
d64df4b5f7 daml-lf: clean achive bazel build (#3175)
* clean the mess in daml-lf achive bazel build

* add release note

* Address Moritz's comments

* more release notes
2019-10-15 08:36:46 +00:00
Remy
fc1a000090 daml-lf: rename daml_lf_archive_scala target to daml_lf_archive_reader (#3168)
* daml-lf: rename daml_lf_archive_scala target to daml_lf_archive_reader

* fix release
2019-10-14 14:53:50 +00:00
Gerolf Seitz
5592092cc7
Remove DAML-on-X IndexServer and Reference Server (#3108)
It is not needed anymore and can therefore be deleted.
2019-10-08 11:47:21 +02:00
associahedron
3e86680f3b Mark daml json-api as experimental (#3123) 2019-10-08 09:07:25 +00:00
Moritz Kiefer
78c2ec2f25
Bundle trigger runner in SDK (#3069)
There is deliberately no description and release notes entry to hide
it from `daml --help` and to make it a bit more accessible but
shipping it should make it a bit easier to experiment with.
2019-09-30 11:52:20 +02:00
Andreas Herrmann
98bb580aa2 Bundle packages with SDK releases (#3056)
* Enable SDK daml-lib package dependencies

* integration-test: SDK daml-libs dependency

* trigger --> daml-trigger

Rename the trigger library package to match other builtin packages.

* Bundle daml-trigger.dar in SDK release tarball

* Describe SDK bundled packages in changelog

* Push case match inside expand

Addressing review comment
8208277747 (r329428240)
2019-09-30 09:15:11 +00:00
Gary Verhaegen
f9f118a84d
release instructions: update number format (#3042) 2019-09-26 11:42:34 +01:00
Gary Verhaegen
26a6d77a7d
release instructions: mvn -U (#2934) 2019-09-18 13:58:29 +01:00
Leonid Shlyapnikov
4a9fb1ccff
DAML assistant codegen command (#2800)
* DAML assistant codegen command, codegen config reader and docs
2019-09-12 14:23:49 -04:00
Leonid Shlyapnikov
d237040822 DAML Assistant json-api logback configuration (#2797)
* 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
2019-09-09 11:13:50 +02:00
Moritz Kiefer
2e29d3c0d9
Integrate the HTTP JSON API with the assistant (#2792) 2019-09-06 15:48:15 +02:00
Andreas Herrmann
ed39800a9f Rename hazel_deps to hackage_deps (#2789)
* hazel_deps --> hackage_deps

Mechanical change:

```
sed -i 's/hazel_deps/hackage_deps/g' $(ag -l hazel_deps)
```

* Hazel dependencies --> Hackage dependencies
2019-09-06 09:01:09 +00:00
Moritz Kiefer
1bd2a34877
Update instructions for publishing documentation (#2757) 2019-09-05 11:57:52 +02:00
Leonid Shlyapnikov
99e765a1e0
Releasing http-json-binary (#2751)
com/digitalasset/ledger-service/http-json-deploy/100.13.21
2019-09-04 15:47:24 -04:00
Stefano Baghino
e452aa2cea
Port semantic tests to the new test tool (#2718) 2019-09-02 14:40:10 +02:00
Oliver Seeliger
ed73c850cf
Release missing sources jars (#2683)
* Release missing sources jars

* Review feedback by Gerolf
2019-08-29 08:21:57 +02:00
Martin Huschenbett
901165092e Extend release readme with intructions for manual testing comment (#2691)
Add a step to the release process readme such that people leave a comment
like "All manual tests have passed" on the release PR.
2019-08-28 18:52:27 +00:00
Gary Verhaegen
126ac64bbf
daml-sdk-head also installs HEAD jars (#2652) 2019-08-27 18:08:52 +02:00
associahedron
d9e42d9798 Robuster logic for --install-assistant=auto (#2656)
* Robuster logic for --install-assistant=auto

* Handle Windows correctly
2019-08-26 10:02:19 +00:00
Robin Krom
f209950f0b
language: append the version to the output dar name by default. (#2559)
* 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
2019-08-15 18:07:52 +02:00
Leonid Shlyapnikov
d9121af530 Releasing //ledger-service/http-json module and its dependencies (#2543) 2019-08-14 17:19:31 +00:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
associahedron
72a7bc63a6
Organizing SDK ledger commands, adding ledger upload-dar and ledger navigator commands. (#2416)
* Add deploy-navigator command to daml helper.

* Rebase

* Organize ledger commands

* Sandbox /= Remote Ledger, should not use that config.
2019-08-06 12:41:43 +01:00
associahedron
aa4340e499 Hide daml deploy interface temporarily (#2396) 2019-08-05 12:57:59 +00:00
nickchapman-da
299d0c1b98
daml deploy, now with party management (#2384)
* daml deploy, now with party management

* address some review comments
2019-08-05 13:07:37 +01:00
Stephen Compall
52efc0966c
daml-lf: new data-scalacheck library for ImmArray, FrontStack, et al (#2342)
* new data-scalacheck library for ImmArray, FrontStack, et al

* add checkLaws functions as library to data-scalacheck

* make checkLaws more configurable at use points
2019-08-01 11:10:56 -04:00
nickchapman-da
b30228ab95
{-# LANGUAGE OverloadedStrings #-} is now on by default (#2270) 2019-07-24 08:09:26 +01:00
mziolekda
ac06bef329
eliminate v2 version of the participant-state interface (#2255)
* eliminate v2 version of the participant-state interface

* remove participant-state-v1 from release artifacts
2019-07-23 14:59:15 +02:00
nickchapman-da
49a6607160
daml deploy: first version (#2176)
* daml deploy: first version

* fix build: replace callCommand with runProcess_

* abstract/share: doBuild, getDarPath

* hide deploy command for now

* make sandbox port configurable for both deploy & start daml-helper commands
2019-07-17 14:09:55 +01:00
Stefano Baghino
467dcd9767 Mention need to adjust release notes early in the release instructions (#2189) 2019-07-17 12:01:08 +00:00
Stefano Baghino
df9872eafd Be more specific about SDK removal in Windows installer (#2184)
Fixes #2183
2019-07-17 10:28:15 +00:00
Gary Verhaegen
e2d9541c8c bundle vsix in sdk tarball (#2113) 2019-07-12 21:35:05 +00:00
Moritz Kiefer
e374a9adaa Include NOTICES file in release tarballs (#2110) 2019-07-11 15:02:29 +00:00
Rohan Jacob-Rao
8a97918da8 Small fixes to release test instructions (#2078) 2019-07-09 19:55:04 +00:00
Rohan Jacob-Rao
4d683176d2 Clarify release instructions (#2052)
- Don't use meta-variable that looks like a real variable
- Be explicit about what `daml studio` should do.
2019-07-08 22:17:45 +00:00
Moritz Kiefer
bb3a98bf61
Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
Moritz Kiefer
0459f199c9
Stop publishing damlc tarball, VSCode extension and quickstart-java to bintray (#2006) 2019-07-04 14:45:09 +02:00
Moritz Kiefer
5087cc4be2
Bring release instructions up to date and inline test plan (#1972) 2019-07-02 15:53:37 +02:00
Moritz Kiefer
6bef12f98b
Remove release/sdk.yaml (#1966)
It was only used for the old assistant.
2019-07-02 11:33:06 +02:00
Andreas Herrmann
93d8e01db2
Update rules_haskell and static GHC (#1515)
* Update rules_haskell and static GHC

Remove patches that have been upstreamed or are no longer required.
Update still required patches to match the new rules_haskell version.

Previously we patched rules_haskell to coerce GHC into using static
Haskell libraries in most places. In particular we moved hs-libraries
entries into extra-libraries entries in the package configuration files.
A much cleaner approach is to compile GHC with a static RTS, then GHC
will by itself choose to load static Haskell libraries.

* Remove haskell_cc_import

* da-hs-daml-cli -> daml-cli

* da-hs-damlc-app -> damlc-app
2019-07-01 13:26:19 +02:00
Fran
074dadaf12 Use install script in integration test for unix. (#1952)
* Use install script in unix integration test.

* Fix waitForProcess
2019-07-01 09:21:04 +00:00
Fran
368242563c Fix daml-assistant install script. (#1896)
* Fix daml-assistant install script.

* Fix windows installer also.
2019-06-26 15:42:26 +00:00
Moritz Kiefer
8e701cd229 Fix release process (#1878)
This PR adds a check that all artifacts that will be uploaded to Maven
central actually exists and fixes the artifacts for
daml_lf_archive_java.
2019-06-26 09:19:08 +00:00
Gerolf Seitz
b0a465784e
Add grpc-netty as dep for bindings-java. publish daml-lf-archive (#1798)
We add a dependency in bindings-java to grpc-netty, so it is
automatically available in the classpath for users. Otherwise they get
an error like [0] if they don't add it explicitly.

We also publish daml-lf-archive-java to maven central.

[0] io.grpc.ManagedChannelProvider$ProviderNotFoundException: No
functional channel service provider found. Try adding a dependency
on the grpc-okhttp, grpc-netty, or grpc-netty-shaded artifact
2019-06-24 08:16:31 +02:00
Gary Verhaegen
095e41d855 build Docker image on cron (#1811) 2019-06-21 18:39:24 +00:00
Stefano Baghino
b2d9095a3c
Move unreleased user-facing features to its own file (#1762)
* 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
2019-06-19 16:32:03 +02:00
Fran
728c1c9204
Implement daml install --install-assistant flag. (#1761)
* 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
2019-06-19 14:00:13 +01:00
Nick Smith
5ca4674b5b
Fixes #1755: Carefully fix json message to release artefacts (#1756)
* Fixes #1755: Carefully fix json message to release artefacts
2019-06-19 12:23:22 +02:00
Nick Smith
0d123a1d51
Fixes #1745: Fix JSON sent to release artefacts to Maven Central. (#1747)
* Fixes #1745: Fix JSON sent to release artefacts to Maven Central.
2019-06-19 08:33:07 +02:00
Nick Smith
4db34f042d
Fixes #1737: Fix broken URL for releasing uploaded artefacts to Maven… (#1738)
* Fixes #1737: Fix broken URL for releasing uploaded artefacts to Maven Central.

Additionally, skip opening and closing staging repositories if there are no
artefacts to be uploaded.
2019-06-18 13:28:47 +02:00
Nick Smith
86f8627da5
Fixes #1725: Correct Maven credential variables in CI release script. (#1726)
* Fixes #1725: Correct Maven credential variables in CI release script.

Update documentation that refered explicitly to the old version, to
use refer to new version.
2019-06-17 21:43:15 +02:00
Robin Krom
ca163d708e
language: feature: initial implementation of a 'migrate' command (#1707)
* 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.
2019-06-17 16:40:08 +02:00
Nick Smith
0c0e4231f3
Fixes #1204: Release bindings and codegens to Maven Central. (#1205)
* Fixes #1204: Release bindings and codegens to Maven Central.

Upload the Java and Scala Bindings with the respective code
generator binaries to Sonatype Open Source Repository
Host for synchronization with Maven Central.
2019-06-17 15:37:49 +02:00
Moritz Kiefer
b7ea0dce00
Stop uploading the SDK metadata tarball to bintray (#1699)
This is only used by the old assistant for which we will no longer
make releases.
2019-06-17 10:39:41 +02:00
Remy
0591075187 cleanup daml-lf scala packages (#1581)
* cleanup daml-lf scala packages

* Address Stephen's Comments

* update maven coordinates of language package
2019-06-12 15:55:48 +00:00
mziolekda
319e042860 create separate bazel targets for participant-state-v2 (#1562) 2019-06-11 08:00:02 +00:00
Gerolf Seitz
8a08b752a9
Use Ledger API Test Tool for sandbox (#1545)
Extra command line arguments to the client_server_test target are passed
to the ledger-api-test-tool instead of the arguments defined in the
bazel target.

For example:
`bazel run //ledger/sandbox:conformance-test-static-time --list` will
pass the --list parameter to the ledger-api-test-tool (to print all
available tests), instead of actually running the tests in static-time mode.


The Ledger API Test Tool takes the flag --all-tests to run all defaul
 and optional tests

The tool also allows multiple occurrences of the --include and --exclude
flags.

Also removes StandaloneSemanticTestRunner.

Fixes #1371
2019-06-07 12:04:31 +02:00
mziolekda
4389cbc83e Provide initial implementation of package management in the KVUtils (#1498)
* Provide initial implementation of package management in the KVUtils

* rename updateArchives to updatePublicPackages and add them to the abstract interface

* remove participant-state:reference app from published artifacts

* adopt the changes to the recent version split
2019-06-07 07:03:02 +00:00
Gabor Aranyossy
9cb6baacdf removing ledger backend module (#1524)
* removed ledger backend module

* removed artifact publishing

* some formatting

* updated comment

* changing names

* Update ledger/participant-state/src/main/scala/com/daml/ledger/participant/state/v1/SubmitterInfo.scala

Co-Authored-By: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2019-06-05 11:01:52 +00:00
Andreas Herrmann
1a80106753
damlc test --files (#1409)
* 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.
2019-05-28 15:36:42 +02:00
A. F. Mota
b8324049d6
Check if running in projects in a uniform way. (#1275) 2019-05-21 12:39:08 +02:00
A. F. Mota
128b8bed54
Add daml clean command (#1237)
* Add daml clean command

* Show what is removed during daml clean.

* Dont relativize
2019-05-20 13:11:35 +02:00
Brian Healey
edff444c63
Updates to windows release verification instructions (#1108) 2019-05-15 20:48:45 +00:00
Moritz Kiefer
5520d76e21
Improve Windows installer (#1154)
* Improve Windows installer

1. We now show a welcome page before starting the installation.
2. The installer now has an icon.
3. We show a finish page after installation has completed.
4. We detect existing suggestions and abort while mentioning
   "daml install latest".

* Ask if existing installation should be removed
2019-05-15 15:38:27 +02:00
Nick Smith
6f6f3337c7
Fixes 895: Improve DA Bazel rules for building javadocs. (#896)
* Fixes 895: Improve DA Bazel rules for building javadocs.

Extend the da_java_library Bazel macro to also build the Javadoc for the
target. Add the Javadoc artefacts to the release procedure.
2019-05-14 09:40:30 +02:00
Gerolf Seitz
199d0a4740 Update release instructions and add missing release label (#1078) 2019-05-13 08:04:20 +00:00
A. F. Mota
2d682f489e Implement daml init command. (#1080)
* Started working on daml init.

* Implement daml init.

* Nicer messages and nicer field generation.

* Cleaning up a duped definition.

* Review revisions
2019-05-10 16:32:41 +00:00
Moritz Kiefer
4eb6bfa997 Document testing instructions for Windows (#1083) 2019-05-10 16:14:22 +01:00
Moritz Kiefer
ebb93556aa Include install.bat in release tarball (#1085) 2019-05-10 14:53:38 +00:00
Ashfaq Ahmed
7672b91ae6 Added batch file for windows installation (#1032)
* Added batch file for windows installation

* Changed path variable

Changed path to be relative to script rather than current directory

* Add copyright header
2019-05-09 14:04:42 -04:00
Neil Mitchell
39ee16a6bd Try and run the installer at User privileges (#1039) 2019-05-09 15:10:43 +02:00
Anup Kalburgi
b32ea91564
damlc test to run tests from files passed in or from the current project (#954) 2019-05-07 12:55:41 -04:00
A. F. Mota
12e8baa93f Simplify daml new template release process and add a simpler default template. (#850)
* Skeleton template.

* Add quickstart-java template.

* Update release rule

* Add Main.daml in skeleton template.

* Change default template for daml new.

* Update templates/BUILD.bazel

* Fix bazel rule formatting.

* Update integration test to use quickstart-java template.
2019-05-03 08:17:15 +00:00
Moritz Kiefer
345128f10c
Don’t open a new terminal in the Windows installer (#865)
ExecWait will run the command in a new terminal which looks fairly
ugly and also makes it impossible to see what has been written to that
terminal since it closes automatically. nsexec::ExecToLog on the other
hand will write to the standard log Window in the installer which
seems much nicer.
2019-05-03 07:57:14 +02:00
Moritz Kiefer
549fdf65eb
Fix path to daml in windows installer (#842)
It turns out my suspicion that the tar plugin was the thing that
messed up paths was completely correct. However, I messed up the PATH
to daml which resulted in me still running the old binary.

I’ve fixed the path and also moved to a temporary
directory (PLUGINSDIR seems like the easiest option for that) so that
things are cleaned up automatically by nsis.
2019-05-02 15:17:34 +02:00
Moritz Kiefer
7b81d69f2f
Include files directly in the windows installer (#832) 2019-05-02 12:02:18 +02:00
Jussi Mäki
d887b21036
Release scala source jars to bintray (#767)
Tested with a dry run:
Copying .../com_github_digital_asset_daml/bazel-out/k8-fastbuild/bin/ledger/api-server-damlonx/api-server-damlonx_src.jar
to .../com/daml/ledger/api-server-damlonx_2.12/100.12.11/api-server-damlonx_2.12-100.12.11-sources.jar
2019-04-29 17:11:01 +02:00
Jussi Mäki
a8be6442bf
DamlOnX: release kvutils (#763)
* Move package comment to correct place

* Update kvutils package documentation

* Release participant-state-kvutils
2019-04-29 16:05:22 +02:00
gleber
c095a2e20c Ledger api test tool release (#756)
* release: make 'ci/release.sh' runnable for dry runs.

release-dry-run.sh is outdated and duplicates logic from ci/release.sh, so it
got deleted.

* ledger-api-test-tool: release the tool together with the SDK components.

* ledger-api-test-tool: update docs to reflect distribution mechanism.

* ledger-api-test-tool: further docs refinements.

* Add Ledger API Test Tool mention into release notes.
2019-04-29 12:16:19 +00:00
Moritz Kiefer
c37df1a07a
Add a windows installer for the SDK (#738) 2019-04-29 10:16:11 +02:00
K5
451858335f
Simplify daml assistant interface. (#725)
* Simplify daml assistant interface.

* Update descriptions based on suggestions

* Build dar in proper place.
2019-04-29 09:14:51 +01:00
K5
d1e8c3f9ef Forward sandbox arguments properly (and navigator & extractor). (#684) 2019-04-25 08:50:00 +00:00
K5
d97c099d03 Generate daml new config file from template (#652)
* Generate daml new config file from template.

* Use __VERSION__ instead of __SDK_VERSION__
2019-04-24 20:49:37 +00:00
Gary Verhaegen
81b976b919 allow arbitrary version numbers (#657) 2019-04-24 12:54:36 +00:00
Jussi Mäki
91449122f7
Add damlonx artifacts to the release (#627) 2019-04-23 14:00:55 +02:00
Leonid Shlyapnikov
cf3227938c Release codegen front-end shaded binary, #615 (#617)
* Release codegen front-end shaded binary, #615

* Fix bazel formatting
2019-04-19 14:24:57 +00:00
Leonid Shlyapnikov
4458a81e83 Unify Scala and Java Codegen Inputs (#585)
* Extract codegen-common module, #166

* Scala Codegen Main using the same option parser as Java Codegen, #166

There is one important difference, Scala Codegen does not allow mapping
dars to different package names, all dars have to be mapped to the same
package name.

Replace Scala Codegen println's with scala logging, respecting the
configured codegen verbosity

* Fix bazel formatting

* Update the release dry run script

* Releasing codegen-common

* Improving Scala Codegen error reporting (code review)

* Addressing codereview comments

* Make it explicit that we skip not supported option
2019-04-18 19:04:57 +00:00
Robin Krom
0f2ac2d06d
language: new package command for damlc (#395)
* language: new package command for damlc

The (internal) package-new command reads all information from the
daml.yaml file of a DAML project and also creates the .conf file for the
package database and packs it with the dar.
2019-04-15 18:12:04 +02:00
Gary Verhaegen
de4101b8c3
include artifacts in github releases (#487) 2019-04-15 13:54:04 +01:00
moritzkiefer-da
f145ba088e
Add an option to produce all release artifacts on MacOS (#474)
This can be quite useful for debugging purposes.
2019-04-15 10:58:19 +02:00
Gary Verhaegen
0fd4b05e4e
minor tweaks to release/RELEASE.md (#457) 2019-04-12 19:22:18 +01:00
moritzkiefer-da
2f6dd7d4ee
Do not add the scala version suffix to navigator and extractor (#456)
Fixes #455
2019-04-12 18:30:49 +02:00
moritzkiefer-da
118aa6de05
Check for VERSION and release-notes.rst in the same commit (#450) 2019-04-12 17:38:17 +02:00
Gary Verhaegen
59f480d978 prepare release note for next release (#443) 2019-04-12 16:17:31 +02:00
moritzkiefer-da
77033a6a69 Refactor and speed up release script (#431)
This rewrites the release script to be a lot simpler and significantly
faster:

- The artifacts are now declared in a separate yaml file which should
  make it easier for people to modify and doesn’t clutter the actual
  code.
- There is only a constant number of calls to Bazel which speeds up
  the script quite a bit.

I verified that the release artifacts are the same that we got
before and I traced the calls to the jfrog binary in a fake release
and ignoring order they are identical.
2019-04-12 14:57:37 +02:00
Gary Verhaegen
b37474b0e9
require manual publication of GitHub releases (#435)
Because automated testing is not yet part of our release pipeline, we
need to manually publish releases after manual testing.
2019-04-12 13:15:19 +01:00
gleber
aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* 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.
2019-04-12 13:10:16 +02:00
Gary Verhaegen
6110d4be3a
push releases to github (#413)
Azure Pipelines has direct integration with GitHub, so we're just using
that. Releases on GitHub have to target a tag, so we also need to push
the tag as an intermediate step; we also need to include the platform
name in the artifact to avoid overwriting from different builds.

The two "GitHub release" steps depend on two Azure variables that are
not defined in the pipeline script. This may look like it should not
work, but in fact it does, because these variables are set by the
release script.

In Azure Pipelines, any build step can set variables for the next build
steps by outputting specially-formatted text to stdout. This text will
not appear in the build output displayed by Azure Pipelines, e.g.:

```
echo '##vso[task.setvariable variable=sauce]tomatoes'
```

would define the Azure variable `sauce` to have the string `tomatoes` as
its value for the next build steps.

See [0] for details.

[0]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-in-script
2019-04-12 11:30:13 +01:00
Fran
938bc4ae25
Rename sdk config file to sdk-config.yaml (#407)
* Rename sdk config file to sdk-config.yaml

* Use sed in head release.
2019-04-12 12:01:48 +02:00
Fran
78d77d0a2e
Add a daml-sdk-head script. (#404) 2019-04-11 16:49:02 +02:00
Fran
61d8459494
Simplify daml install & some refactoring. (#379)
* Get rid of channels.

* Refactor version code.

* Remove --initial flag.

* Update daml-assistant/daml-project-config/DAML/Project/Types.hs

Co-Authored-By: fmota-da <francisco.mota@digitalasset.com>
2019-04-11 13:58:49 +02:00
moritzkiefer-da
fa4067ad1b
Move POM file generation to Bazel rules (#374)
* Move POM file generation to Bazel rules
2019-04-11 11:24:52 +02:00
Fran
292d2b40b4
Moving to new version logic in daml-assistant. (#337)
* Use global SDK version for release tarballs.

* Use semver for sdk versions.

* Update daml-assistant/BUILD.bazel

* Code comments pt 1

* Switch to lens

* Update daml-assistant/BUILD.bazel
2019-04-10 12:06:38 +02:00
Francesco Mazzoli
685904d9f2
release -sources jars for java, when available (#301)
see #300, does not solve it entirely since scala sources are still
not present
2019-04-09 09:35:44 +02:00
Leonid Shlyapnikov
0aea22a507
delete scala/codegen-sql-support and all related tests (#294) 2019-04-08 12:41:09 -04:00
moritzkiefer-da
fd156c33df
Add daml start (#254)
* Add daml start
2019-04-05 19:34:23 +02:00
Bernhard Elsner
1efedd8a76 Change all list numbers to 1s in Readme.md 2019-04-04 16:40:37 +02:00
Bernhard Elsner
029c2a84a4 Update Readme.md with instructions for release notes 2019-04-04 16:40:36 +02:00
Gabor Aranyossy
ab72aab696 fixes inconsistent help about Sandbox port
changing ports to use 6865 everywhere

no need for default ports

addressing missed outdated ports

changed more ports from 7600 to 6865

dealt with more 8080s
2019-04-04 13:03:48 +02:00
Moritz Kiefer
4a51320ec2 Document release process 2019-04-04 11:56:07 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00