Commit Graph

131 Commits

Author SHA1 Message Date
Moritz Kiefer
4e39e6163b
Get lsof from dev-env (#8064)
On MacOS we don’t seem to have lsof by default which disables our
sandbox cleanup for stray instances.

changelog_begin
changelog_end
2020-11-25 14:43:37 +00:00
Moritz Kiefer
92cb4e7a32
Bump curl on Windows (#8044)
The old url 404s now and upgrading seems nice anyway.

changelog_begin
changelog_end
2020-11-24 09:27:05 +00:00
Andreas Herrmann
5e78ebded1
Update vcredist (#7843)
changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-10-29 17:14:22 +00:00
Samir Talwar
1ab14c2232
dev-env: Add xargs. (#7769)
We use `xargs` a lot but rely on the version on the user's system.

This adds it to dev-env so it's consistent everywhere.

If nothing else, this means we can safely use the `--no-run-if-empty`
flag, which is not available on BSD (and therefore macOS) `xargs`.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-21 13:00:19 +00:00
Samir Talwar
92020aa868
dev-env: Add a symlink, dev-env/jdk, to the current JDK. (#7745)
* dev-env: Add a symlink, `dev-env/jdk`, to the current JDK.

This makes configuring IntelliJ IDEA to use the correct JDK much easier.

CHANGELOG_BEGIN
CHANGELOG_END

* dev-env: Document setting up the JDK in IntelliJ IDEA.
2020-10-20 11:03:23 +00:00
Gary Verhaegen
f025dc3065
daml-sdk-head: add optional sha information (#7717)
daml-sdk-head: add optional sha information

This PR add an option, `--sha`, to `daml-sdk-head` so that it produces a
more accurate version number including the current git sha.

The main consequence is that calling `daml-sdk-head --sha` take
significantly longer than calling `daml-sdk-head`, because it needs to
recompile everything that depends on the version number.

> ## Wait, but why??

I started this work in support of an internal project that needed to
test against unreleased, and possibly unmerged, daml versions. However,
after further discussion I believe there is a better option for their
use-case. I've decided to still open this PR because the work was done
and there is no downside to it. It may still be useful if one wanted to
be able to maintain more than one non-released local version of daml.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-16 16:40:58 +02:00
Moritz Kiefer
c6660a89e0
Upgrade msys (#7713)
There are two reasons for this:

1. 2018 was a long time ago and there seems to be no particular reason
   for sticking to that version.

2. We have seen a bunch of issues where we get 404s when fetching msys
   packages. The newer version has a larger mirrorlist which might help
   with this. We could in principle try to patch the mirrorlist for
   the old version but given that upgrading seems like a good idea
   anyway, this seems easier.

changelog_begin
changelog_end
2020-10-16 13:15:04 +02:00
anthonylusardi-da
2007c92393
Remove refs to #public Slack channel and some general Slack refs (#7684)
* Remove references to #public Slack channel and some general Slack references

* CHANGELOG_BEGIN
CHANGELOG_END
2020-10-14 09:47:17 -04:00
Moritz Kiefer
e6ec5f4ddb
Try unbreaking msys2 (#7606)
* Try unbreaking msys2

yandex has apparently desided to return 443s.

changelog_begin
changelog_end

* Update dev-env/windows/manifests/msys2.json

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* bump openssl hash

changelog_begin
changelog_end

* Update dev-env/windows/manifests/msys2.json

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* Bump postgres hash

changelog_begin
changelog_end

* add python because why not

changelog_begin
changelog_end

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-10-08 13:01:51 +02:00
Gary Verhaegen
60b300199b
improve "patch bazel windows" UX (#6764)
This does not get used very often so it is likely nobody will remember
how it works when we do use it. It's And due to the ordering Azure makes
of jobs in its UI, it's very easy to miss that there is a final,
Linux-based step and the values are actually printed there.

So this adds a little note to remind us of that.

Note that as this changes the `ci/patch_bazel_windows` folder, this will
also generate a new Bazel, so this PR will also update the Scoop
reference.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 14:09:51 +02:00
Moritz Kiefer
720d2e1b61
Upgrade stack (#7444)
changelog_begin
changelog_end
2020-09-21 09:29:05 +00:00
Gary Verhaegen
29b876920e
ci/patch_bazel_windows: fail on curl failure (#7431)
At the moment, with the `curl` call comfortably nested inside an `if`
statement, `curl` failures are interpreted as simply going down the
`else` branch of the conditional. Hoisting it up to a separate variable
declaration makes the script fail on the curl call itself.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 15:57:21 +02:00
Gary Verhaegen
dd37d98458
fix grpcurl (#7324)
It looks like the structure of the nix package has changed when we
updated nixpkgs in #6761, so we need to update the dev-env script to
match.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-04 16:38:49 +02:00
Gary Verhaegen
a3419f9db8
remove dad-add-soirce-dep.sh (#7152)
This file recently came up in a PR to fix shebang lines, and I realized
it's not been touched since open-sourcing and is not referenced
anywhere in the repo.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-17 12:59:59 +02:00
Andreas Herrmann
4b1438276c
Update Bazel 2.1.0 --> 3.3.1 (#6761)
* Upgrade nixpkgs revision

* Remove unused minio

It used to be used as a gateway to push the Nix cache to GCS, but has
since been replaced by nix-store-gcs-proxy.

* Update Bazel on Windows

changelog_begin
changelog_end

* Fix hlint warnings

The nixpkgs update implied an hlint update which enabled new warnings.

* Fix "Error applying patch"

Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files
and applying patches has been reversed. The allows users to define
patches to these files that will not be immediately overwritten.
However, it also means that patches on another repository's original
`WORKSPACE` file will likely become invalid.

* a948eb7255
* https://github.com/bazelbuild/bazel/issues/10681

Hint: If you're generating a patch with `git` then you can use the
following command to exclude the `WORKSPACE` file.

```
git diff ':(exclude)WORKSPACE'
```

* Update rules_nixpkgs

* nixpkgs location expansion escaping

* Drop --noincompatible_windows_native_test_wrapper

* client_server_test using sh_inline_test

client_server_test used to produce an executable shell script in form of
a text file output. However, since the removal of
`--noincompatible_windows_native_test_wrapper` this no longer works on
Windows since `.sh` files are not directly executable on Windows.

This change fixes the issue by producing the script file in a dedicated
rule and then wrapping it in a `sh_test` rule which also works on
Windows.

* daml_test using sh_inline_test

* daml_doc_test using sh_inline_test

* _daml_validate_test using sh_inline_test

* damlc_compile_test using sh_inline_test

* client_server_test find .exe on Windows

* Bump Windows cache for Bazel update

Remove `clean --expunge` after merge.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 09:46:04 +02:00
Andreas Herrmann
4be01e4df6
Update ghcide 0.1.0 --> 0.2.0 (#6745)
* Update rules_haskell hie-bios support

* Decouple Haskell ghcide and DAML ghcide

Creates a separate `stack_snapshot` to pull in `ghcide` for the Haskell
IDE use case independent of the `ghcide` for DAML. This allows to update
these two `ghcide` instances independently. As DAML uses `ghcide` the
library updates can be involved if the API experienced breaking changes.
At the same time we may wish to update `ghcide` for Haskell earlier to
make use of new features and stay compatible with rules_haskell's ghcide
support.

* Fix Haddock warnings reported by ghcide

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-16 16:30:09 +00:00
Gary Verhaegen
277e652b55
remove dade-base-profile (#6743)
It does not seem to be used anymore, and has been deprecated since Jul
2018.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-16 11:17:42 +00:00
Andreas Herrmann
0c16823c1b
Upgrade rules_haskell and pin stack_snapshot (#6548)
* Update rules_haskell

* Pin stack_snapshot repositories

* Document stack_snapshot_json

CHANGELOG_BEGIN
CHANGELOG_END

* Don't pin stack_snapshot on Windows

The lock file is generated on Unix and includes unix specific
dependencies, e.g. `unix`. Most developers don't have easy access to a
Windows machine, so regenerating the lock file for Windows would be
inconvenient.

* upgrade stack 2.1.3 --> 2.3.1 on Windows

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-02 18:55:09 +02:00
Moritz Kiefer
a0a1f90087
Fix daml-sdk-head --damlc (#6540)
We don’t want to pass all flags as a single string. If we don’t have
any flags (which is the default) we end up passing an empty string
which breaks Bazel.

changelog_begin
changelog_end
2020-06-30 15:16:26 +02:00
Samir Talwar
7f7eaa35e7
Use Distroless for the Java Docker base image. (#6537)
* Use Distroless for the Java Docker base image.

We switched away from Distroless because it was causing issues with
`docker pull` when you had Docker configured to use `gcloud` for
authentication, but weren't actually authenticated.

Adding `docker-credential-gcloud` to dev-env should hopefully fix this,
meaning we can switch back to a base image that is better-maintained.

CHANGELOG_BEGIN
CHANGELOG_END

* Bump rules_docker to v0.14.3.

This fixes an issue when running `bazel sync`:

```
ERROR: java.io.IOException: Error downloading [http://central.maven.org/maven2/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar] to [...]/external/javax_servlet_api/javax.servlet-api-3.0.1.jar: Unknown host: central.maven.org
```
2020-06-30 12:01:43 +00:00
Gary Verhaegen
e1bfbd6a72
remove jo from dev-env (#6435)
It doesn't seem to be used anywhere. Obviously `git grep jo` returns a
lot of results, so I may have missed something in the noise, but I did a
reasonable effort to look through them.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-19 15:21:43 +00:00
Moritz Kiefer
2c1d4cb805
Fix nix installation (#6400)
Nix now requires -L, I’ve gone ahead and just normalized everything to
use -sfL which we were already using in one place.

changelog_begin
changelog_end
2020-06-18 10:34:08 +02:00
Samir Talwar
8ccbd00f0d
Document a more modern way of using IntelliJ with our Bazel project. (#6328)
* Document a more modern way of using IntelliJ with our Bazel project.

Specifically, avoid `bazel-project-view` in favor of excluding a few
slow/unnecessary directories.

CHANGELOG_BEGIN
CHANGELOG_END

* Add .bazel-cache to .bazelignore instead of .bazelproject.

* Bazel: Don't mention a particular version of IntelliJ; just link.

Trust the canonical source.
2020-06-15 15:06:31 +00:00
Gary Verhaegen
71d714510e
add find to dev-env (#6175)
The issues underlying #6173 prompted me to look into which `find`
version we had in dev-env, and I was surprised to notice we had none. We
already have `findutils` in our nix configuration, however, so this is
just adding the symlink.

Note that, on my machine at least, switching from the macOS-provided one
to the dev-env one does not change the result order for the hash
calculation in `ci/patch_bazel_windows`, so this would likely not have
helped for #6173. Still, we use `find` in many places in our scripts so
I think it's worth having there.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-01 15:11:55 +02:00
Moritz Kiefer
405f3ad6ee
Sort files when calculating CACHE_KEY (#6173)
* Sort files when calculating CACHE_KEY

The order returned by `find` is unspecified and seems to have changed
for whatever reason in some cases. This changed the cache key which is
obviously not intended. It looks like the one we currently have in our
scoop manifest is the one that we get by sorting. Reversing the sort
produces the one CI currently calculates.

changelog_begin
changelog_end

* update manifest to match CI output

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-05-31 22:02:13 +02:00
Moritz Kiefer
fc366478f0
Upgrade puppeteer (#6142)
* Upgrade puppeteer

We’ve seen a couple of issues in the compatibility tests of the form

```
Error: Protocol error (Runtime.callFunctionOn): Target closed.
```

Looking at the issue tracker in puppeteer this might be fixed in newer
versions and I don’t see why we should stick to a fairly old version
anyway.

changelog_begin
changelog_end

* Upgrade nodejs

changelog_begin
changelog_end

* temporary add a step to kill node_modules

changelog_begin
changelog_end

* Kill live server and try to fix Windows

changelog_begin
changelog_end

* Undo rm

changelog_begin
changelog_end
2020-05-28 21:58:52 +02:00
Moritz Kiefer
db8c091467
Upgrade 7zip (#6138)
changelog_begin
changelog_end
2020-05-28 10:49:07 +02:00
Gary Verhaegen
ef0c06a47e
add sed to dev-env (#6129)
CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 17:11:09 +00:00
Gary Verhaegen
b28b543fc6
add toxiproxy to Windows (for #6114) (#6119)
I have never used Scoop before and I'm not sure how to actually test
this, but I thought this might at least get a conversation going.

Plus, if my reading of the documentation of both toxiproxy and Scoop is
correct, this may even work as is.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 13:37:55 +02:00
Gary Verhaegen
9a02ef6ef4
remove unused scoop tests (#6118)
This PR removes a few scoop-related files that seem to have been there
primarily to help us discover how Scoop worked when we first started
using it. They have not been touched in a long time and as far as I can
tell have not been run in a long time either.

I'm a firm believer in the idea that dead code belongs to the git
history, and has no place in the current worktree.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-27 13:37:04 +02:00
anthonylusardi-da
0ee217cdae
ADD: Change most Slack references to forum references where appropriate (#6071)
* ADD: Change most Slack references to forum references where appropriate

CHANGELOG_BEGIN
Replace references to Slack with references to discuss.daml.com
CHANGELOG_END

* ADD: Change issue template support link from SO to forum

* ADD: Add back Slack links
2020-05-26 09:26:53 -04:00
Gary Verhaegen
081bc60e2f
remove envsubst from dev-env (#6098)
It should not be an issue, but I know of at least 4 people for whom
having envsubst in dev-env causes their local git to get confused and
spit out many lines of warning on each invocation. This also seems to
make git much slower.

Given that we're only using envsubst in this one place, I think it may
be worth replacing.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-26 12:25:54 +02:00
Moritz Kiefer
d7632c5b20
Include Bazel patch to cache exclusive tests on Windows (#6009)
* Include Bazel patch to cache exclusive tests on Windows

This includes the patch that we already use on Linux and MacOS to fix
caching of things marked exclusive. I’ve kept in the debugging output
that I added in the last patch for now. While our workaround seems to
be working, I’d like to wait a bit longer in case the issue reappears.

changelog_begin
changelog_end

* Actually bump manifest

changelog_begin
changelog_end
2020-05-18 16:01:29 +00:00
Gary Verhaegen
5d1d1db211
fix daml-sdk-head for macOS (#6012)
Bash is not easy to add to dev-env because dev-env depends on Bash. This
has not been an issue so far because Bash behaves in very sensible ways
overall and is mostly backwards compatible.

A recent change to `daml-sdk-head` is, however, using some feature of
Bash 4 that is not evailable in Bash 3. Bash 3 is ancient so in an ideal
world that would not be an issue, but macOS still ships with Bash 3 for
some obscure (licensing) reason.

It turns our that the line

```bash
arr=()
```

in Bash 4 sets the variable `arr` to an empty array, whereas it leaves it
unset in Bash 3. This means that the later use of `arr`, in the case
where no further element has been added to the array, will yield an
error in combination with the `set -u` option we are using.

This PR changes the usage pattern from

```bash
"${arr[@]}"
```

which fails on Bash 3 to

```bash
${arr[@]:-}
```

which works as expected. Note that the quotes have been removed: the
quotes in this case are not useful assuming that the flags themselves
are never multiword. Without the quotes, this evaluates to `""` under
Bash 3 (as the variable is not set), which confuses Bazel because now it
thinks it's asked to build the `""` target, which it has no rule for.

Ignoring the quoting issue, the actual fix is to include `:-` inside the
`{}`, which instructs Bash to replace the variable with what follows the
`-` in case the variable is not set (in this case, an empty string), and
therefore not crash on this specific variable not being set despite the
`set -u` option.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-18 15:59:20 +02:00
Gary Verhaegen
bb44e07fbf
redirect users to public channels (#6011)
CHANGELOG_BEGIN
CHANGELOG_END
2020-05-18 15:21:27 +02:00
Samir Talwar
f18beb9851
daml-sdk-head: Delete the SDK temporary directory after installation. (#5986)
I'm aggregating a lot of SDKs.

```
$ du -h -d1 $TMPDIR | sort -rh | head -5
1.9G    /var/folders/5x/36ws6_n96qz_b4tbpvfbcth80000gn/T/
501M    /var/folders/5x/36ws6_n96qz_b4tbpvfbcth80000gn/T/tmp.ahBTENEeZw
500M    /var/folders/5x/36ws6_n96qz_b4tbpvfbcth80000gn/T/tmp.S4sB7DIjkA
500M    /var/folders/5x/36ws6_n96qz_b4tbpvfbcth80000gn/T/tmp.Q3VeVV8DIU
405M    /var/folders/5x/36ws6_n96qz_b4tbpvfbcth80000gn/T/tmp.b5ZWnPhLkH
```

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-14 15:33:32 +00:00
Samir Talwar
76a7e6e18d
daml-sdk-head: Standardize the syntax of the script. (#5984)
* daml-sdk-head: Quote all variables.

And use arrays where necessary.

* daml-sdk-head: Use Bash tests (`[[` and `]]`) rather than `test`.

Most importantly, they support the `&&` and `||` operators, because
they're a shell builtin, not a program.

CHANGELOG_BEGIN
CHANGELOG_END

* daml-sdk-head: Refer to `${BASH_SOURCE[0]}` explicitly.

`BASH_SOURCE` is an array. Expanding an array gets the first element, but this
is unclear. We can clarify by explicitly expanding the first element.

* daml-sdk-head: Use `command -v` instead of `which`, as it's more standard.

* daml-sdk-head: Use semicolons judiciously.
2020-05-14 15:06:00 +00:00
Samir Talwar
57a8d0b37e
CI: Run PostgreSQL once for all Scala tests. (#5919) 2020-05-14 09:06:34 +02:00
Moritz Kiefer
577cd653d9
Add debugging output to inclusion errors (#5961)
* Add debugging output to inclusion errors

This adds some more debugging output to inclusion errors in Bazel
which should hopefully help us track it down. These are the only call sites
in the Bazel source that can produce them. My suspicion is that it’s
coming from HeaderDiscovery but I’m not entirely sure what is off.

We’ll almost certainly have to add more output once we know which of
those 3 cases we hit but let’s do it step by step.

changelog_begin
changelog_end

* Bump url and hash

changelog_begin
changelog_end
2020-05-13 18:18:17 +02:00
Gary Verhaegen
bda565fa44
patching Bazel on Windows (infra bits, no patch yet) (#5918)
patch Bazel on Windows (ci setup)

We have a weird, intermittent bug on Windows where Bazel gets into a
broken state. To investigate, we need to patch Bazel to add more debug
output than present in the official distribution. This PR adds the basic
infrastructure we need to download the Bazel source code, apply a patch,
compile it, and make that binary available to the rest of the build.
This is for Windows only as we already have the ability to do similar
things on Linux and macOS through Nix.

This PR does not contain any intresting patch to Bazel, just the minimum
that we can check we are actually using the patched version.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-12 23:16:04 +02:00
Andreas Herrmann
35fe61ed06
Update Bazel 2.0.0 --> 2.1.0 (#5651)
* Update Bazel 2.0.0 --> 2.1.0

CHANGELOG_BEGIN
CHANGELOG_END

* Update rules_haskell

For Bazel 2.1.0 compatibility.

* nix: grpc: patch glibc version incompatibility

* Fix hlint warnings

* CcToolchainInfo.compiler

https://docs.bazel.build/versions/2.1.0/skylark/lib/CcToolchainInfo.html#compiler

* CcToolchainInfo.ar_executable

* texlive: add missing transparent package

* Leave a debug note on the docs target

* Ignore FutureWarning in //docs:docs-no-pdf

* Isolate PR

This is to avoid any interference with pipelines prior to the Bazel
update.

* Remove isolation

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-05-11 11:47:54 +02:00
Gary Verhaegen
204c8b0657
add daily perf report (#5843)
This PR adds a simple daily job that runs the performance test on a
chosen "baseline" commit and then runs the same benchmark on latest
master. This should allow us to track overall performance improvements.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-06 13:50:35 +02:00
Moritz Kiefer
246d246ee5
Reenable isScoopEnabled (#5661)
Our CI machines have been reset so there is no need to keep this hack
around to force scoop to be upgraded.

changelog_begin
changelog_end
2020-04-22 10:08:12 +02:00
Moritz Kiefer
590833608c
Fix Windows CI (#5648)
The python install step started failing because there is a new pip
release so we get a warning. I tried to just upgrade python but the
new python manifest depends on functions that need an upgrade of scoop
so I upgraded that as well. Not quite sure which of those upgrades
fixes the issue …

changelog_begin
changelog_end
2020-04-21 13:31:57 +00:00
Gerolf Seitz
329320bad9
Organize maven coordinates (#5272)
* Use com.daml as groupId for all artifacts

CHANGELOG_BEGIN
[SDK] Changed the groupId for Maven artifacts to ``com.daml``.
CHANGELOG_END

* Add 2 additional maven related checks to the release binary

1. Check that all maven upload artifacts use com.daml as the groupId
2. Check that all maven upload artifacts have a unique artifactId

* Address @cocreature's comments in https://github.com/digital-asset/daml/pull/5272#pullrequestreview-385026181
2020-04-01 11:41:18 +02:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Moritz Kiefer
c004c90fcb
Remove skydoc (#5208)
Nobody uses it, it’s deprecated anyway.

changelog_begin
changelog_end
2020-03-26 11:14:34 +00:00
Moritz Kiefer
0471b26d70
Get openssl from msys2 (#5063)
* Get openssl from msys2

changelog_begin
changelog_end

* Try to fix opensl config location
2020-03-18 13:09:03 +01:00
Moritz Kiefer
42b4441159
Bump openssl (#5054)
* Bump openssl

The previous one has stopped working for some reason :sadpanda:

changelog_begin
changelog_end

* daml-assistant: Add `--wall-clock-time` to the Sandbox Next test.

Missed this due to doing two things at once.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-03-18 10:24:05 +01:00
Andreas Herrmann
559c78003e
Update rules_haskell (#4751)
* Update rules_haskell

The workaround for linking against `Cffi` in the REPL has been
upstreamed in a more generalized form.

CHANGELOG_BEGIN
CHANGELOG_END

* ghcide: Use rules_haskell's hie-bios support

* Document `ghcide` Bazel integration

* Rename files to match module names

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-03-13 16:49:34 +01:00