Commit Graph

131 Commits

Author SHA1 Message Date
Moritz Kiefer
e0d652df91
Generate ssl certs in a genrule instead of checking them in (#4950)
changelog_begin
changelog_end

For now this is only used for the daml-helper tests. I’ll shuffle
things around and use it for all tests in a separate PR.
2020-03-12 10:36:40 +01:00
Gary Verhaegen
dd1b44eccc
add grep to dev-env (#4903)
Because it's not in there and we're all surprised to learn that.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-10 10:34:01 +01:00
mergify[bot]
c6d9000369
Added --damlc option to daml-sdk-head (#4853)
changelog_begin
changelog_end
2020-03-05 16:38:56 +00:00
Gary Verhaegen
3410000fc7
change msys2 mirror (#4825)
The `repo.msys2.org` server is currently broken and has been for about 7
hours at least from what I can find out online. This PR changes to the
next mirror in the list that seems to work for me locally; list taken
from [the GitHub
repo](https://github.com/msys2/MSYS2-packages/blob/master/pacman-mirrors/mirrorlist.msys).

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-05 11:56:32 +01:00
Moritz Kiefer
4d734939c9
Inline packages.nix into default.nix (#4726)
I don’t see any reason why we should have this split into two files.

changelog_begin
changelog_end
2020-02-26 17:34:51 +01:00
Moritz Kiefer
8c14d16718
Disable pdf docs builds on macos (#4724)
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
2020-02-26 14:52:08 +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
c64919cd58
Support --help in daml trigger/daml script/daml script-test (#4534)
fixes #4529
fixes #4530
fixes #4531

changelog_begin
changelog_end
2020-02-17 09:09:01 +01:00
Andreas Herrmann
655e4b3b55
Update CI nix version (#4443)
* Update CI nix version

For `--option http2 false` to take effect requires Nix 2.3.2.

CHANGELOG_BEGIN
CHANGELOG_END

* Set option `http2 = false` dev-env nix config

This is less likely to overlook an instance than manually adding
`--option http2 false` to each Nix invocation.

Setting `--option htt2p false` also had no effect on the multi-user Nix
installation on the Linux CI machines due to
```
WARNING: option '--disk_cache' was expanded to from both option '--config linux' (source /nix/store/2xnfb2l39d2b4nxw5vwmqz5hjwhw0caw-daml-bazelrc) and option '--config linux' (source /nix/store/2xnfb2l39d2b4nxw5vwmqz5hjwhw0caw-daml-bazelrc)
```

Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
2020-02-07 15:05:52 +00:00
Andreas Herrmann
fdeca38651
Update to Bazel 2.0.0 (#4352)
* Update nixpkgs: To update to Bazel 2.0.0

CHANGELOG_BEGIN
CHANGELOG_END

* Windows: Update to Bazel 2.0.0

* Pin sphinx 1.8.3 for Bazel

* Clarify patches = []

Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
2020-02-07 12:13:38 +00:00
Andreas Herrmann
a9828565db
Disable http2 with Nix to work around segfaults (#4427)
* Disable http2 with Nix to work around segfaults

CHANGELOG_BEGIN
CHANGELOG_END

* Disable http2 in dev-env calls to nix-build as well

Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
2020-02-06 15:15:11 +00: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
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
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
Gary Verhaegen
83fdc6d164
remove unused python3.6-da dev-env bin (#3845) 2019-12-16 11:51:43 +01:00
Andreas Herrmann
02f806bf22 Manually run stack update (#3590)
* Add stack to dev-env

* Manually run stack update before build

To work around multiple concurrent attempts to take the
hackage-security-lock.
2019-11-22 15:16:48 +00:00
Martin Huschenbett
24d22012a8 Upgrade to nodejs-10.16.3 on Windows (#3529)
This matches the version we use on Linux.
2019-11-19 15:08:39 +00:00
Samir Talwar
c5d9d1014e
ledger-api-test-tool: Run tests on Canton, and fix a few issues. (#3446)
* ledger-api-test-tool-on-canton: Run Canton.

* ledger-api-test-tool-on-canton: Run the SemanticTests against Canton.

This was _so_ much work.

These will probably be flaky, so can't merge them in until we fix the
underlying issues with the tests around multi-participant allocation.

* ledger-api-test-tool: Wait for parties to arrive on all participants.

Thanks to Canton for exacerbating this bug.

Can't turn on all the tests on Canton yet as there are other spurious
failures. Will investigate next.

* ledger-api-test-tool: Move all contract key tests to ContractKeys.

If a ledger doesn't support ContractKeys, they need to be able to turn
these tests off.

* ledger-api-test-tool: If a test name is misspelled, fail immediately.

I keep getting names slightly wrong in the `--exclude` arguments and
wondering why it didn't work.

* client_server: Revert client_server_test.bzl.

Turns out I don't know what I'm doing. ¯\_(ツ)_/¯

* sandbox: Don't call `.toString` on an array. Doesn't do much.

* dev-env: Don't untar netcat automatically.

It needs to be installed with Pacman.
2019-11-13 17:27:28 +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
Andreas Herrmann
2bd1db490a
Replace bazel-deps by rules_jvm_external (#3253)
* 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
2019-10-28 13:53:14 +01:00
Gary Verhaegen
afaa5bdf5c
fix dev-env ghcid (#3218) 2019-10-18 12:27:41 +02:00
Gary Verhaegen
daf15e6ae6
dev-env: remove gradle (#2738) 2019-09-04 17:44:51 +01:00
Martin Huschenbett
f85190abe7 Add --skip-jars to daml-sdk-head help text (#2686) 2019-08-28 13:01:23 +00:00
Gary Verhaegen
126ac64bbf
daml-sdk-head also installs HEAD jars (#2652) 2019-08-27 18:08:52 +02:00
Moritz Kiefer
4b23d936e7 Fix curl on Windows (#2643)
The old URL has gone away. The definition is taken from upstream.
2019-08-23 07:48:48 +00:00
Andreas Herrmann
64e8f83af4
bazel 0.27.0 --> 0.28.1 (#2570) 2019-08-19 13:53:08 +02:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
Gary Verhaegen
7363d73500 copyright: do not add extra blank line (#2502) 2019-08-13 12:52:07 +02:00
Gary Verhaegen
bf5995f529
remove mentions of da-int servers (#2485) 2019-08-12 10:42:41 +01:00
Gary Verhaegen
d89888f2e7 fix shebang line in daml-sdk-head (#2288) 2019-07-25 13:54:32 +00:00
Andreas Herrmann
f64b63f7a3
Ensure that dev-env is in PATH for other dev-env tools (#2127)
This is relevant for users of the IntelliJ bazel plugin. It is common to
start IntelliJ via the GUI such that the dev-env is not loaded for
IntelliJ. The bazel plugin is then configured to execute the dev-env
bazel by entering the path into the corresponding configuration option.
However, this bazel is then executed without the dev-env tools in PATH.
Some of the repository rules expect certain dev-env tools in PATH, e.g.
python3. Those will then fail.

This patch ensures that the dev-env is loaded when executing dev-env
tools from outside the dev-env.
2019-07-15 15:29:00 +02:00
Gary Verhaegen
a4ea880cf3
get vsce through Bazel rather than nix (#2090) 2019-07-10 15:36:43 +02:00
Moritz Kiefer
75ea177e87
Run exception handlers on SIGTERM in daml assistant (#2069) 2019-07-09 15:44:09 +02:00
Andreas Herrmann
df7bff6288 Update to bazel-0.27 (#1957)
* 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>
2019-07-05 14:04:47 +00:00
Michał Majcherski
54c59ea473
windows dev-env printing the root cause in case of failure after clean install (#1981) 2019-07-03 11:16:49 +02:00
Moritz Kiefer
c66211d034
Document Haskell profiling and default to -fprof-auto (#1971) 2019-07-02 14:51:09 +02:00
Moritz Kiefer
b06c422ae4 Fix curl on Windows (#1925)
The URL for 7.64.0 now returns 404s so let’s switch to the latest version.
2019-06-28 08:02:05 +00:00
Gary Verhaegen
345b7aba58 remove cassandra (#1916) 2019-06-27 14:40:09 +00:00
Gary Verhaegen
798e96c9b9
prepare for VSCode marketplace (#1875) 2019-06-26 13:56:15 +01:00
Fran
4cf5343dbb
Add support for da_haskell_repl targets in da-ghci (#1847)
* Add support for haskell_repl targets in da-ghci

* Change default target

* Revert newline loss.

* bazel fetch before bazel query

* Make a top level repl target the default.

* Add da_haskell_repl dependency in //BUILD

* Fix syntax error

* Fix bazel formatting...

* Rename DamlHelper modules to make //:repl work

* DamlHelper -> DamlHelper.Run

* Update the import in DamlHelper.Main

* Fix bazel rules again

* Update DamlHelper import in integration-tests
2019-06-24 16:39:41 +01:00
Fran
c3e2762634 Delete da-assistant and sdk directories. (#1721)
* Delete da-assistant and sdk directories.

* Remove references to da-assistant

* Remove reference to da-sdk-head
2019-06-17 15:49:37 +00: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
Andreas Herrmann
9990486bb1 Load core-package dependencies in da-ghci (#1712)
* Fix #1656

* da-ghcid extra arguments

* Fix formatting
2019-06-17 12:56:33 +00:00
Michał Majcherski
285c766e16
windows: ledger and extractor tests; improved msys2 installation (#1643)
* windows: ledger tests

* windows: extractor tests

* windows: combine msys2 manifest files
2019-06-17 09:40:28 +02:00
Gary Verhaegen
f37b1ed37f add docker-credential-gcr to dev-env (#1533)
This is needed for the webide Docker image CI
script.
2019-06-05 19:36:31 -04:00
Michał Majcherski
9e1c1c82ec
windows: more daml-ghc tests working (#1425)
* windows: more daml-ghc tests working

* windows: increased heap size for bond-trading-memory test
2019-05-28 15:45:38 +02:00
gleber
40ce2b9be8 Unify semantic test between sandbox IT and Ledger API Test Tool (#1171)
* Add RemoteApiProxy fixture type.

This is in preparation for using Sandbox IT suite as part of the Ledger API Test
Tool.

* ledger-api-test-tool: Drop reset functionality.

This is no longer necessary for the tool and it does not scale with the types of
tests in the suite.

* integration-tests: Fail if the server under fixture is stuck.

This makes sure that a server getting stuck will get detected by a test, instead
of ignoring it and potentially allowing the server to linger.

* integration-test: Make semantic testing runs independent.

It manges parties and command identifier to include a unique (random) suffix in
all ledger-commited identifiers. This allows the test to run against a Ledger
API without reseting it.

* ledger-api-test-tool: Unify test code using scenario runner with IT suite.

This reuses the scenario runner test code from the IT suite, instead of
reimplementing it. This should be a no-op (except for tests reports formatting).

* Review fixes.

* Ledger API Test Tool: Provide logback config.

This quites Ledger API Test Tool output.

* Make sure akka threads are terminated at end of test runs.

This makrs Akka threads to be daemons, hence forcing them to be closed at the
end of Ledger Api Test Tool.

* Use Ledger API Test Tool in tests of reference server.

* Add Apache commons-lang3.

* Ledger API Test Tool: Implement custom test reporter.

This addresses two needs:
- avoid using buggy scalatest test reporter;
- pretty-prints test results prettier.

* dade-copyright-headers: return success on successful reformatting.
2019-05-28 09:58:58 +00:00
Gary Verhaegen
c762d491ea target s3 bucket with docs refresh script (#1287)
There is no simple way to configure GCS to serve the desired security
headers, so instead the script will keep updating the existing s3
bucket.

Consequent changes:

- Add aws cli tool to dev-env
- Remove docs bucket from Terraform
2019-05-21 22:26:07 +00:00
Michał Majcherski
951b569ae7
windows: daml-ghc-deterministic test working (#1216) 2019-05-17 14:44:53 +02:00
Andreas Herrmann
a6809310e8
Update to Bazel 0.24 (#567)
* bazel: 0.23.1 -> 0.24

* bazel-deps: Fix for Bazel 0.24.0

* bazel no longer supports + on dicts

Replace by dict.update.

* Fix junit classpath issue

* azure: Update MacOS image to Mojave

* Windows: --noincompatible_windows_escape_jvm_flags

* rules_scala: Support escape_jvmflags

* rules_scala: separate jvm_flags by TAB

* Document --noincompatible_windows_escape_jvm_flags
2019-05-16 18:04:30 +02:00
Moritz Kiefer
ad10f98020
Fix SDK integration tests on Windows (#1125)
* Fix SDK integration tests on Windows

* Switch to Haskell-based tar extraction
2019-05-14 21:55:45 +02:00
Michał Majcherski
fdbc1f51ce
windows: fixed daml-lf tests for Windows by using Bazel's rlocation (#1053)
* windows: fixed daml-lf tests for Windows by using Bazel's rlocation

* more consistent logging on CI; publishing Windows test logs on failure

* windows: fix daml-lf engine tests

* windows: add diff tool to msys
2019-05-14 16:18:55 +02:00
Michał Majcherski
f3055dd0cb ci: use windows-pool (#1069)
* ci: use windows-pool

* dev-env: add scoop reset to ensure env variables are correctly set
2019-05-13 09:20:21 +00:00
Michał Majcherski
f842ea9a1d
windows: use msys2 provided patch - fixes: #916 (#942) 2019-05-10 12:41:11 +02:00
Leonid Shlyapnikov
50bab729d0
dade-collect-garbage to delete ~/.bazel-cache as part of the cleanup (#1061) 2019-05-09 16:09:29 -04:00
A. F. Mota
5f6180cfdc
Be more stringent about detecting existing daml installation for daml-sdk-head. (#1021) 2019-05-09 11:31:32 +02:00
Andreas Herrmann
decd74d57a da-ghci: Add --data auto mode (#996)
As suggested in [1] da-ghci will by default first try to build the repl
with runfiles and if that fails fallback to no runfiles. If the user
specifies --data yes or no, then this automatism will be disabled.

[1]: https://github.com/digital-asset/daml/pull/996#issuecomment-490461209
2019-05-08 16:55:12 +00:00
A. F. Mota
5c8e1e0ef2
Make daml-sdk-head work alongside daml installation. (#997)
* Make daml-sdk-head work alongside daml installation.

* Delete any exsting legacy .daml-head installation.

* Do daml-head.cmd on windows.
2019-05-08 16:14:52 +02:00
Gary Verhaegen
9ec0fad2a8 add sbt to dev-env (#964) 2019-05-07 09:27:38 -04:00
Moritz Kiefer
55d5fa5dea
Upgrade to nixpkgs 19.03 (again) (#962)
* Upgrade to nixpkgs 19.03 (#871)

* Fix nix-build restart

Without || true we will never get to the next line.
2019-05-07 13:55:30 +02:00
Moritz Kiefer
9deb4ae7b2 Revert "Upgrade to nixpkgs 19.03 (#871)" (#917)
This reverts commit 3d8acde916.

For some reason that commit seems to have resulted in a lot of
"unexpected end of file" errors during cache downloads. I do not know
what is going on here or how to fix it so let’s revert it for now.
2019-05-05 09:10:20 +00:00
Moritz Kiefer
3d8acde916 Upgrade to nixpkgs 19.03 (#871) 2019-05-04 20:01:48 +00:00
Moritz Kiefer
4b7d7d2149
Remove dev-env tests (#883)
We don’t run these tests anywhere and they don’t test anything useful.
2019-05-03 14:17:50 +02:00
A. F. Mota
0353c26929 Make the new version check time configurable. (#859) 2019-05-03 00:24:06 +00:00
Moritz Kiefer
c37df1a07a
Add a windows installer for the SDK (#738) 2019-04-29 10:16:11 +02:00
K5
d9f5097e67
Auto-installing requested SDK versions. (#692)
* Auto-install requested SDK versions.

* Avoid crashing if the requested sdk is missing (and auto-install is off).

* swap the default and the auto install

* Suggestions

* Explain why install messages go to stderr in one case.

* Lint error

* Determin running daml assistant version.

* Auto-update daml whenever assistant SDK version is less than auto-installed version.
2019-04-25 19:52:23 +01:00
Moritz Kiefer
7c72162dd9 Document the need for long file paths on Windows (#670) 2019-04-24 18:21:56 +00:00
Michał Majcherski
0b87c4ceae windows: fail on dev-env sync errors (#635) 2019-04-23 15:54:28 +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
Brian Healey
b594fcffc1
correct jq in dev-env (#463)
* correct jq in dev-env

* Remove references to lsof and dead scripts that called lsof since it is no longer in dev-env
2019-04-12 16:44:15 -04: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
Fran
6984d9765d
Make daml-head work outside of devenv. (#428) 2019-04-12 12:03:05 +02:00
Fran
78d77d0a2e
Add a daml-sdk-head script. (#404) 2019-04-11 16:49:02 +02:00
Michał Majcherski
08bd36a10c Windows CI (#364)
* ci: remove the old Jenkins files

* WORKSPACE: remove unuset this_breaks_windows

* ci: add Windows builds to Azure Pipeline
2019-04-11 14:26:55 +02:00
Florian Klink
e9b128ea68 windows dev-env: remove wget (#331)
This also removes the manifest-change tests, as the test was testing a
wget update.
2019-04-09 16:24:51 +01:00
Brian Healey
4d7f455168
HOTFIX rename COPYRIGHT so github correctly shows apache2 license for repo (#274) 2019-04-05 22:10:47 -04:00
Michał Majcherski
c3e33df9f9 windows: build script with dev-env init; windows dev-env readme cleanup (#250) 2019-04-05 14:37:42 +01:00
Nikola Knežević
79f8bf0a58 Simplify profile_zsh.sh (#212)
Rely on zsh features to simplify profile_zsh.sh file.

- Remove `DADE_REPO_ROOT` as it is not needed anywhere, `dade-assist` redefines
  it already.
- `${0:A:h}` gives the absolute path of the folder *this* file resides in, no
  need for `cd`, `dirname`, and `pwd` combo.
- Use simple process redirection (`<`), as it is more robust than the one in
  bash, and works better than `<<<`
2019-04-05 12:45:34 +02:00
moritzkiefer-da
f4a9e94f0d Dev env fixes (#232)
* Fix curl in dev-env

Curl ends up in the bin output so we need to symlink to
dade-exec-nix-bin-tool.

* Add cc to dev-env
2019-04-04 16:46:06 -04:00
Francesco Mazzoli
9c7357c7de update all references of old repo to new repo 2019-04-04 16:20:07 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00