Commit Graph

33 Commits

Author SHA1 Message Date
Samir Talwar
41e60f7302
Upgrade to Scala 2.12.14 and 2.13.6. (#10573)
* Upgrade to Scala 2.12.14.

* Upgrade Scala to 2.13.6.

CHANGELOG_BEGIN
CHANGELOG_END

* compability: Re-pin the Maven dependencies.
2021-08-12 14:25:53 +00:00
Moritz Kiefer
3d79cbf2b1
Bump compat versions (#10096)
We need to do the same override for the gRPC version we do on main to
resolve conflicts.

changelog_begin
changelog_end
2021-06-23 22:12:04 +02:00
Moritz Kiefer
b1738c7202
Switch Scala default to 2.13 (#9699)
changelog_begin
changelog_end
2021-05-17 15:04:53 +00:00
Samir Talwar
3db928c548
compatibility: Use the same Scala version as the root. (#9502)
* compatibility: Use the same Scala version as the root.

It's confusing to get out of sync. `compatibility` was using Scala
2.12.12 while the root was on 2.12.13.

This brings them in sync to 2.12.13.

CHANGELOG_BEGIN
CHANGELOG_END

* Factor out Scala artifacts into scala_version.bzl.

* Bazel: Explicitly specify artifact hashes for Scala 2.13.

Not strictly necessary, as we _happen_ to depend on the same point
release as the Bazel Scala plugin, but this is incidental and we don't
want to bank on it.
2021-04-26 17:49:43 +00:00
Samir Talwar
6035840d8a
Upgrade Scala 2.12 to v2.12.13. (#9280)
* Upgrade Scala 2.12 to v2.12.13.

This is being pulled in anyway because of Maven/Gradle/etc's fun
"favor the most recent" resolution mechanism. The version of Akka we
depend upon transitively depends on Scala 2.12.13, so any downstream
consumers will see that as the Scala version required.

Bringing the Daml repo in line means no more confusion.

CHANGELOG_BEGIN
- [Scala Bindings] If you are using Daml on Scala 2.12, it now depends
  on Scala v2.12.13 (from v2.12.12).
CHANGELOG_END

* Scala 2.12.13 is the default version in our pinned version of nixpkgs.

* Upgrade Scala 2.13's Wartremover version.

* Rename `scala_version_rule` to `scala_version_configure`.

* Add a test case to ensure the Scala versions are the same everywhere.

* Add tests for the Scala JAR versions in maven_install_*.json

* gatling-utils: Change the sort order of the expected CSV in tests.

I don't know why this changed, but it seems to be stable.

* compatibility: `scala_version` -> `scala_version_configure`.

* Bazel: Disable the Scala version tests on Windows.

* compatibility: Upgrade Wartremover to Scala 2.12.13.
2021-03-30 11:02:18 +00:00
Moritz Kiefer
077d8da58f
Upgrade nixpkgs (#9248)
* Upgrade nixpkgs

changelog_begin
changelog_end

* ghc bump

changelog_begin
changelog_end

* more native buildinputs

changelog_begin
changelog_end

* Switch assignment

changelog_begin
changelog_end

* update lockfile

changelog_begin
changelog_end

* Revert "Switch assignment"

This reverts commit af6d25120b.
2021-03-26 21:26:40 +01:00
Moritz Kiefer
ecd3110f48
Fix compat job (#9099)
* Fix compat job

changelog_begin
changelog_end

* Cleanup head_sdk

changelog_begin
changelog_end

* turns out removing everything also removes files that shouldn’t be removed

changelog_begin
changelog_end

* gnah

changelog_begin
changelog_end

* maybe this was a bad idea

changelog_begin
changelog_end

* trynottocry

changelog_begin
changelog_end
2021-03-11 15:13:49 +00:00
Moritz Kiefer
773ddada04
Upgrade nixpkgs (#8190)
* Upgrade nixpkgs

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* No ibazel

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Switch agent pool

changelog_begin
changelog_end

* .

* .

changelog_begin
changelog_end
2021-02-08 11:12:07 +00:00
Moritz Kiefer
e0c5abd647
Switch to GHC 8.10.3 (#8394)
* Switch to GHC 8.10.3

changelog_begin
changelog_end

* Update bazel-haskell-deps.bzl

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Comment on rules_haskell patch

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2021-01-25 11:53:53 +00:00
Moritz Kiefer
d24ef94f36
Add a Scala 2.13 build pipeline (#8271)
* Add a Scala 2.13 build pipeline

This adds initial support for multiple Scala versions controlled via
the DAML_SCALA_VERSION env var and a CI job to make sure we don’t
regress. For now we only test //libs-scala/ports/... which seemed like
the easiest starting point I could find. We can incrementally expand
that over time.

changelog_begin
changelog_end

* Document pinning

changelog_begin
changelog_end

* Address review comments

changelog_begin
changelog_end
2020-12-14 12:42:26 +01:00
Moritz Kiefer
38455e8ca9
Fix Scala version overwrite (#8197)
The old format changed and resulted in that silently being ignored.

changelog_begin
changelog_end
2020-12-08 13:52:41 +00:00
Moritz Kiefer
7e05dc7932
Upgrade rules-scala and scalatest (#8187)
This is necessary to at least attempt an upgrade to 2.13 and
generally, I want to keep our rulesets up2date. rules-scala forces the
version of scalatest so we have to bump that at the same time.

This requires changes to basically all Scala test suites since the
import structure has changed and a bunch of things (primarily
scalacheck support) got split out.

Apologies for the giant PR, I don’t see a way to keep it smaller.

changelog_begin
changelog_end
2020-12-08 06:59:23 +01:00
Andreas Herrmann
6ea3007e31
upgrade rules_nixpkgs (#8078)
changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-11-30 14:36:46 +00:00
Stephen Compall
1a2afd5266
upgrade to Scala 2.12.12 from 2.12.11 (#7661)
* upgrade bazel settings to scala 2.12.12

* upgrade nix scala tool to scala 2.12.12

* upgrade silencer references to scala 2.12.12

* repin for scala 2.12, silencer, wartremover upgrades

* remove numerous occurrences of unused silencer now spotted

* update Scala version in our bazel notes

CHANGELOG_BEGIN
CHANGELOG_END

* update compatibility maven_install.json to match compatibility WORKSPACE
2020-10-13 08:42:14 -04:00
Andreas Herrmann
27e7d4cf69
Update rules_haskell (#7077)
* Update rules_haskell

Removes the warning about Bazel 3.3.1 being too recent.

* Remove unused rules_haskell patch

changelog_begin
changelog_end

* fmt

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-08-11 10:14:56 +00:00
Andreas Herrmann
cf24597e70
Factor out reproducibility flags for tar and gzip (#6884)
* Factor out tar/gzip reproducibility flags

* use mktgz in package-app

* Bazel managed tar/gzip

* Remove quiet = True

As stated in the comment this is no longer required with Bazel >= 3.0.

* Build package-app as a sh_binary

This way Bazel will manage the runtime dependencies tar, gzip, mktgz,
and patchelf.

package-app.sh changes directory so it needs to make sure that all paths
are absolute and that the runfiles tree/manifest location is forwarded
to programs called by package-app.sh.

* Avoid file path too long errors

* Fix readlink -f on MacOS

* Document abspath

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-08-05 14:27:14 +00:00
Andreas Herrmann
cddb5e30ab
Remove unused with-packages-wrapper (#6693)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-10 16:02:01 +00:00
Stephen Compall
7622862312
upgrade to Wartremover 2.4.9 (#6551)
* upgrade to wartremover 2.4.9

* simplify wart list and list JavaConversions as disabled

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* delete long-obsolete, contradictory comment

* also upgrade wartremover in compatibility (leaving aside maven_install.json)

* update compatibility maven_install.json to match
2020-07-01 15:02:58 +00:00
Moritz Kiefer
ccd36146a4
Prune SDK versions in compat tests (#6325)
This PR does two things:

1. It makes use of the new sha256sums file to speed up the script to
   update the versions significantly. The code here is a bit hacky but
   as mentioned in the comment, this script is only run offline atm so
   that seems reasonable.
2. It prunes SDK snapshot versions to those for which there is no
   corresponding stable release.

changelog_begin
changelog_end
2020-06-12 17:03:38 +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
c5ce6ed4c8
Use a custom Scala binary for the sandbox migration tests (#6140)
This is preparatory work for hitting the transaction service (and
others but that one is the most important) which isn’t possible via
DAML Script. To ease review, this PR only switches from a DAML Script
to a custom Scala binary. It does not yet change what is tested.

changelog_begin
changelog_end
2020-05-28 15:02:54 +02:00
Andreas Herrmann
1b711d0ac6
Hermetic nixpkgs_cc_toolchain (#5976)
* update rules_nixpkgs

* Use hermetic nixpkgs cc toolchain

CHANGELOG_BEGIN
CHANGELOG_END

* Work around Bazel's cc toolchain autodetection

* Use --crosstool_top for hermetic cc toolchain

When using --incompatible_enable_cc_toolchain_resolution instead
cc actions still depend on
`external/local_config_cc/builtin_include_directory_paths`
as well as
`external/nixpkgs_cc_toolchain_config/builtin_include_directory_paths`.

* override local_config_cc

* remove unused attribute

* Fix posix toolchain on Windows

* nixpkgs cc toolchain not on Windows

* Fix nixpkgs cc toolchain on MacOS

* nixpkgs cc toolchain uses bin/cc

* Use darwin.binutils on MacOS

* Remove clang(++) and gcc (g++) symlinks

The toolchain only considers `bin/cc` and having the other symlinks
around could lead to confusion

* Use hermetic toolchain in compatibility workspace

* Avoid empty linker flags

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-05-18 18:03:51 +02:00
Moritz Kiefer
de03425664
Include the first feature in compat tests for create-daml-app (#6002)
* Include the first feature in compat tests for create-daml-app

This adds the step from the create-daml-app tests that applies the
patch for the messaging feature and tests that things will build. This
is the last step before we can actually run the puppeteer tests which
will turn this into an actual compatibility test.

changelog_begin
changelog_end

* temporarily run all tests

changelog_begin
changelog_end

* Fix exclusions

changelog_begin
changelog_end

* Revert "temporarily run all tests"

This reverts commit 7425dd09cf48f2bfd6064b55d857c76d51afc821.

* Remove accidentally committed messaging.patch

changelog_begin
changelog_end
2020-05-18 14:37:16 +02:00
Moritz Kiefer
4916a28682
Include create-daml-app tests in compatibility tests (#5945)
This is the first part of #5700

It adds tests that build create-daml-app using `daml build` and then
run the codegen and build the UI. Contrary to our main tests these
also run on Windows. This is actually reasonably simple by first
building the typescript libraries on Linux and then downloading them
on Windows.

There are two parts that are still missing from the tests in the main
workspace:

1. Building the extra feature. This should be fairly easy to add.
2. Running the pupeeter tests. At least MacOS and Linux should be
   reasonably easy. I don’t know what horrors Windows will throw at
   us. This step is what actually makes this a compatibility
   test. Currently it doesn’t actually launch Sandbox and the JSON API.

Since this PR is already pretty large, I’d like to tackle those things
separately.

changelog_begin
changelog_end
2020-05-13 10:39:51 +02:00
Moritz Kiefer
0c90844184
Update SDK versions in compatibility tests (#5844)
* Update SDK versions in compatibility tests

This adds a Haskell script to generate a versions.bzl file that
contains the list of versions as well as their hashes. This should
make it a bit easier to keep things up2date going forward.

The script is a bit slow since downloading all the SDKs takes quite a
while but for now it should be good enough and is much more pleasant
than having to figure this out manually.

changelog_begin
changelog_end

* Address review comments

changelog_begin
changelog_end

* Fix excluded tests

changelog_begin
changelog_end
2020-05-05 19:40:03 +02:00
Moritz Kiefer
49e19ebed1
Make compat tests work on windows (#5732)
* Make compat tests work on windows

This required some changes to the daml_sdk rule since the read-only
installation by the assistant breaks Bazel completely. We could only
apply those changes on Windows but I think I prefer the consistency
across platforms here over trying to stay close to how the SDK is
installed on user machines given that the SDK installation is not
something we’ve had issues with.

I’ve excluded the postgresql tests for now. I don’t expect them to be
particularly hard to fix but I’ve already spent almost 2 days on this
and having some tests run on Windows seems like a clear improvement
over running no tests on Windows :)

changelog_begin
changelog_end

* Remove todo

changelog_begin
changelog_end
2020-04-28 16:06:36 +02:00
Andreas Herrmann
effd05b894
Include daml ledger tests in compatibility tests (#5740)
* Copy daml ledger test to compatibility

Specifically:
- `daml-assistant/daml-helper/test/DA/Daml/Helper/Test/Deployment.hs`
- `libs-haskell/test-utils/DA/Test/Sandbox.hs`

* Adapt daml ledger test for compatibility

Avoid dependencies on the daml repository and make the SDK and platform
components configurable.

* Add test certificates to compatibility

Taken from `@daml//ledger/test-common/test-certificates`.

* Define daml_ledger_test

CHANGELOG_BEGIN
CHANGELOG_END

* Add note on keeping daml ledger tests in sync

* ./fmt.sh

* Strictly require --sdk-version flag

Tasty doesn't allow options without a default value, so we default to
`error` to enforce a value being set.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-04-27 16:13:16 +00:00
Gary Verhaegen
7ceda5678a
run compatibility tests on macos (#5723)
This PR extends the existing Linux compatibility tests to run on macOS
too. Fixes #5692.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-04-27 14:55:16 +02:00
Moritz Kiefer
0d1f21e4a2
Extend compatibility tests to test against HEAD (#5714)
fixes #5691

changelog_begin
changelog_end
2020-04-24 14:43:35 +02:00
Moritz Kiefer
7f2a950da0
Fix ./fmt.sh check (#5718)
* Fix ./fmt.sh check

We accidentally introduced hlint lints when we added the compatibility
workspace. The hlint code in ./fmt.sh correctly detects that there is
a hint but then exits with 0 since it uses the exit code from `echo`
rather than the one from `hlint`. The info that we printed with
`echo` didn’t actually make any sense so I added a new comment as to
why we run hlint here. This requires some setup changes so that the
compatibility workspace gets the same Haskell flags since otherwise
using the same hlint rules obviously does not make sense.

Fixes #5701

changelog_begin
changelog_end

* Update fmt.sh

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-04-24 12:04:14 +00:00
Moritz Kiefer
bed6a2ed51
Include latest snapshot in compatibility tests (#5709)
changelog_begin
changelog_end
2020-04-24 12:21:28 +02:00
Moritz Kiefer
df16cf7094
Extend compatibility tests to DAML on SQL (#5705)
* Extend compatibility tests to DAML on SQL

This feels a bit hacky since the runfiles don’t work quite like I
would expect them to but it’s at least not more hacky than what we do
for the head-based tests we currently have.

Progress towards #5695

changelog_begin
changelog_end

* Fix runfiles with more bash

changelog_begin
changelog_end

* remove redundant port options

changelog_begin
changelog_end

* Create fewer sandbox targets

changelog_begin
changelog_end

* Apply suggestions from code review

Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Fix runfiles snippet

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2020-04-24 12:08:32 +02:00
Moritz Kiefer
7d36402412
Initial boilerplate for cross-version compatibility testing (#5665)
This is a first step towards testing cross-version
compatibility. It doesn’t actuall do much yet but hopefully it should
be easier to parallelize once we have the initial boilerplate in place
so ideally I’d like to address most missing things and issues in
separate PRs.

changelog_begin
changelog_end
2020-04-23 12:58:11 +02:00