Commit Graph

262 Commits

Author SHA1 Message Date
pbatko-da
bd01a211f4
[DPP-418] Protect Participant TLS keys (#10629)
Adding support for accepting server's private key as an encrypted file (since storing unencrypted private key in a file system might be a risk).

Encrypted private key is assumed to be encrypted using AES or similar algorithm. The details necessary to decrypt it are be obtained from a secrets server over HTTP as JSON document. The URL to secret's server is supplied through the new `--secrets-url` CLI parameter.

One can supply private in either plaintext (old behavior) or ciphertext: if a private key's file ends with .enc suffix it is assumed to be ciphertext. Otherwise it is assumed to be plain text.

CHANGELOG_BEGIN
- [DPP-418] [Participant] Add support for supplying server's private key as an encrypted file and then decrypting it with the help of a secrets server.
CHANGELOG_END
2021-08-30 09:24:52 +02:00
Andreas Herrmann
7b94b0674e
Map shortened scala test suite names to long names on Windows (#10628)
* Generate short to long name mapping in aspect

Maps shortened test names in da_scala_test_suite on Windows to their
long name on Linux and MacOS.

Names are shortened on Windows to avoid exceeding MAX_PATH.

* Script to generate scala test name mapping

* Generate scala-test-suite-name-map.json on Windows

changelog_begin
changelog_end

* Generate UTF-8 with Unix line endings

Otherwise the file will be formatted using UTF-16 with CRLF line
endings, which confuses `jq` on Linux.

* Apply Scala test name remapping before ES upload

* Pipe bazel output into intermediate file

Bazel writes the output of --experimental_show_artifacts to stderr
instead of stdout. In Powershell this means that these outputs are not
plain strings, but instead error objects. Simply redirecting these to
stdout and piping them into further processing will lead to
indeterministically missing items or indeterministically introduced
additional newlines which may break paths.

To work around this we extract the error message from error objects,
introduce appropriate newlines, and write the output to a temporary file
before further processing.

This solution is taken and adapted from
https://stackoverflow.com/a/48671797/841562

* Add copyright header

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-24 17:03:45 +02:00
Samir Talwar
8dd136fc7d
bazel-tools: Replace runner with either runner_with_port_check or runner_with_port_file. (#10615)
* Use `extra` in the port file runner, rather than `temporary`.

* ledger-api-test-tool-on-canton: Use the port check runner.

Much simpler than the port file runner for our purposes.

* Replace `runner` with `runner_with_port_file`.

Rather than expecting a particular set of command-line-arguments, we use
templating.

CHANGELOG_BEGIN
CHANGELOG_END

* Rename the `runner_with_port_check` target to the default.
2021-08-18 15:23:45 +00:00
Samir Talwar
3227e860e0
Use the port file and dynamic port generation in client/server tests. (#10604)
* Use the port file and dynamic port generation in client/server tests.

This creates a runner named `runner_with_port_file` which knows how to
interpolate two variables, `%PORT_FILE%` and `%PORT%`. This allows us to
use the `port-file` argument to the kvutils runner rather than
hard-coding a port for conformance tests.

For now, we only use this for generating the kvutils reference ledger
export.

CHANGELOG_BEGIN
CHANGELOG_END

* Simplify the runner_with_port_file considerably.

It doesn't need to check if the port is open; we trust that the process
will do it.

This also makes sure the port file will be cleaned up, and reduces the
number of dependencies by making use of more functions in `extra`.

* Simplify port file generation in the new client-server runner.

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Simplify the runner_with_port_file further.

This doesn't need to work if the server doesn't take a port file.

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-08-18 13:25:58 +00:00
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
Andreas Herrmann
68e60cacd3
Fix typo in windows extra libs patch (#10538)
changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-11 11:00:03 +02:00
Andreas Herrmann
881d0aba91
Upgrade rules_haskell and rules_nixpkgs (#10517)
* Update rules_haskell & rules_nixpkgs

changelog_begin
changelog_end

* remove unused patch

* Remove the strict-source-names patch

This patch was largely motivated by issues with directory outputs on
Windows occasionally producing empty outputs that would poison the
remote cache. However, we have continued seeing this type of issue
despite this patch and have since resorted to a regular fixup job that
cleans such empty items out of the cache.

With that the strongest motivation with this change is no longer valid
and it doesn't seem worth it to maintain it any longer.

changelog_begin
changelog_end

* Remove windows-remove-fake-libs patch

This patch was upstreamed.

* Update windows-extra-libraries patch

The GHC bindist patch is no longer required as it applied to GHC version
8.10.3 but we are using 8.10.4 instead.

* Remove cc-wrapper-windows patch

This was upstreamed.

* Remove protobuf-source patch

This was upstreamed

* Keep patches in sync between daml and compatibility

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-09 15:19:17 +02:00
Robin Krom
36f3ba8a6a
lsp-types patch for platform independence (#10288)
* fix shake rebuild tests

* patch pretty printing in ghc

* pin linux deps

* pin windows deps

* cosmetics

* address review

* update ghc commit hash

* pin linux stackage deps

* update stack snapshot

* pin windows deps
2021-08-04 21:33:52 +02:00
Moritz Kiefer
1b7f06e12d
Fix typo in protobuf url (#10442)
I’ll take this as a sign that I should stop working for today.

changelog_begin
changelog_end
2021-07-28 23:46:52 +00:00
Moritz Kiefer
9cb83100f1
Patch transitive protobuf dependency (#10441)
Part 2 of #10437

changelog_begin
changelog_end
2021-07-28 17:11:10 +00:00
Miklos
643a2de006
v2 participant state API draft [KVL-998] (#10210)
CHANGELOG_BEGIN
CHANGELOG_END
2021-07-12 18:11:52 +02:00
Moritz Kiefer
fa80f1b615
Bump ghcide and upgrade to lsp/lsp-types (#10139)
* Bump ghcide and upgrade to lsp/lsp-types

changelog_begin
changelog_end

* Bump rev

changelog_begin
changelog_end
2021-06-30 12:16:12 +00:00
Samir Talwar
c764fbe573
contextualized-logging: Introduce different logging types for more structure. [KVL-996] (#10134)
* contextualized-logging: Automatically convert logging values to strings.

For now, this has almost the same behavior, but it allows us to
customize the output in the future.

The main change is that the log format has gone from:

    context: {a=b, x=1, foo=bar}

to:

    context: {a: "b", x: "1", foo: "bar"}

* contextualized-logging: Move `writeTo` inside `LoggingValue`.

* contextualized-logging: Allow for more than just strings.

`null`, numbers, and sequences are now correctly logged.

The log format has gone from:

    context: {a: "b", x: "1", foo: "bar", parties: "[alice, bob]"}

to:

    context: {a: "b", x: 1, foo: "bar", parties: ["alice", "bob"]}

CHANGELOG_BEGIN
- The log output of Daml components has changed so that the structured
  part is closer to JSON. This allows us to distinguish and parse
  numbers and lists. If you are parsing this log output, you may need to
  change your parser.

  The log output has changed from:

  .. code-block::

     context: {a=b, x=1, foo=bar, parties=[alice, bob]}

  to:

  .. code-block::

     context: {a: "b", x: 1, foo: "bar", parties: ["alice", "bob"]}

CHANGELOG_END

* contextualized-logging: Extract the string serializer.

* Use non-string logging where possible.

* contextualized-logging: Split logging values from serialization.

So that callers don't have to know about Jackson.

* contextualized-logging: `SeqView` is `Iterable`. Don't need both.

* contextualized-logging: Make `ToStringToLoggingValue` a `val`.

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

* contextualized-logging: Add a transient dependency for 2.12 only.

This required more infrastructure than I thought it would.

* kvutils: Make it explicit that we're logging the hashes of archives.

The implicit was found to be a little confusing.

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-06-29 09:16:26 +00:00
Samir Talwar
63c471fa79
Upgrade protobuf-java and scalapb. [KVL-938] (#9713)
* Upgrade protobuf-java and scalapb.

CHANGELOG_BEGIN
CHANGELOG_END

* Bazel: Generate ScalaPB classes without `unknownFields`.

This is very annoying because it means that extractors need an extra
`_` for no good reason. It also breaks Circe's automatic derivation.

Including unknown fields is the default behavior in Protocol Buffers for
Java now, and we'll probably have to reckon with it at some point, but
let's kick that can down the road a little.

* Upgrade protobuf-java to 3.17.1.

This is identical to 3.17.0, but let's track it anyway.

* Bazel: Move ScalaPB versions into their own file.

They don't need to go into the generated one.
2021-05-27 13:41:28 +00:00
Moritz Kiefer
87a1198318
Publish nameof library (#9798)
* Publish nameof library

changelog_begin
changelog_end

* Fix version suffix on builtins

changelog_begin
changelog_end
2021-05-26 09:58:02 +00:00
Moritz Kiefer
77e6fd6aa9
Bump rules_nodejs to 3.5.1 (#9796)
Just cleaning up the mess I produced with the 3.5.0 upgrade (or more
like moving the mess into rules_nodejs).

changelog_begin
changelog_end
2021-05-26 10:35:18 +02:00
Moritz Kiefer
cae429237e
Upgrade rules-nodes to version 3.5.0 (#9635)
* Upgrade rules-nodes to version 3.4.2

No particularly strong reason for doing that. I just like staying up2date.

changelog_begin
changelog_end

* Patch Windows

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-05-25 16:04:39 +02:00
Andreas Herrmann
10177d239e
Add golden test for example Daml ledger export (#9732)
* client_server_build - user defined outputs

Let the user define a list of output files on client_server_build.

changelog_begin
changelog_end

* daml-script runner expose main(config)

changelog_begin
changelog_end

* Add an example Daml ledger export to the docs

* Build Daml ledger export

changelog_begin
changelog_end

* sh_inline_test

Support toolchain arguments to sh_inline_test. Usefuly for make variable
expansion, e.g. for the POSIX toolchain.

* Add a golden test for Daml ledger export

* Test args files as well

* Use sed from POSIX toolchain

* Add normalization comment to top-level comment

* Ignore trailing CR on Windows

The JSON formatting of the args file uses Windows line endings on
Windows. Therefore, the args.json output technically differs from the
expected output. We're happy to ignore the difference in CRLF here.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-05-19 12:02:14 +00:00
Moritz Kiefer
b1738c7202
Switch Scala default to 2.13 (#9699)
changelog_begin
changelog_end
2021-05-17 15:04:53 +00:00
Andreas Herrmann
010e2b1b27
Fix client_server_build/test with port file (#9701)
* client_server runner - use temp dir for port file

The sandbox will not overwrite an already existing port file but instead
fail, or worse, silently ignore the error and leave the port-file empty.

changelog_begin
changelog_end

* sandbox: Fail if writing the port file fails

So far this was being silently ignored, leaving a pre-existing port-file
untouched.

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-05-17 11:36:25 +00:00
Stephen Compall
ca9e89b3da
check whether collection.compat is unused when compiling for Scala 2.12 (#9604)
* check whether collection.compat is unused when compiling for Scala 2.12

- Instead of always suppressing warnings for collection.compat._,
  we should only do it for Scala 2.13

- We can also reduce boilerplate by automatically adding this
  option when both silencer_plugin and collection-compat are
  present

CHANGELOG_BEGIN
CHANGELOG_END

* remove unused import

* remove another unused import

* remove even more unused imports

* missed compat dependency

* more missed compat dependencies

* missed compat dependency

* use scala_deps in scaladoc_jar

- #8423 inlined the major version expansion, but this seems to
  have been prior to proper support by scaladoc_jar

* restore custom handling of participant-integration-api

- fixing scaladoc_jar isn't worth it for a single case, as with
  deps vs scala_deps
2021-05-11 21:54:14 +00:00
Samir Talwar
d3106682dd
Add a REPL for each Scala target, for debugging. (#9643)
* Add a REPL for each Scala target, for debugging.

For each Scala library target, this adds a `*_repl` target that can be
built and run to provide a Scala REPL with access to the library and all
its dependencies.

To use:

```
$ bazel build //ledger/ledger-on-memory:ledger-on-memory_repl
INFO: Invocation ID: f1c4ec07-68e7-4bc2-a182-40f6ea035110
INFO: Analyzed target //ledger/ledger-on-memory:ledger-on-memory_repl (32 packages loaded, 714 targets configured).
INFO: Found 1 target...
Target //ledger/ledger-on-memory:ledger-on-memory_repl up-to-date:
  bazel-bin/ledger/ledger-on-memory/ledger-on-memory_repl.jar
  bazel-bin/ledger/ledger-on-memory/ledger-on-memory_repl
INFO: Build completed successfully, 7 total actions

$ ./bazel-bin/ledger/ledger-on-memory/ledger-on-memory_repl
Welcome to Scala 2.12.13 (OpenJDK 64-Bit Server VM, Java 1.8.0_272).
Type in expressions for evaluation. Or try :help.

scala> import scala.concurrent.ExecutionContext.Implicits.global
scala> import com.google.protobuf.ByteString
scala> import com.daml.ledger.on.memory._
scala> import com.daml.ledger.participant.state.kvutils.OffsetBuilder
scala> import com.daml.ledger.participant.state.kvutils.Raw
scala> import com.daml.ledger.participant.state.kvutils.api.LedgerRecord

scala> val state = InMemoryState.empty
state: com.daml.ledger.on.memory.InMemoryState = com.daml.ledger.on.memory.InMemoryState@ff21443

scala> state.write { (log, state) => Future { log += LedgerRecord(OffsetBuilder.fromLong(1), Raw.LogEntryId(ByteString.copyFromUtf8("A")), Raw.Envelope(ByteString.EMPTY)) } }
```

The REPL target has the tag "manual", so will only be built on demand.

CHANGELOG_BEGIN
CHANGELOG_END

* Turns out you can run a REPL with `bazel run`.
2021-05-11 14:11:58 +00:00
Stefano Baghino
8f6c92d409
Use common compiler plugins and options for the scaladoc_jar rule (#9558)
changelog_begin
changelog_end

Removes the following error message:

```
> bazel build //ledger-service/...
INFO: Invocation ID: a6259f2e-b4d2-445f-9fed-f1a456ba49b9
INFO: Analyzed 105 targets (0 packages loaded, 0 targets configured).
INFO: Found 105 targets...
INFO: From ScaladocGen ledger-service/http-json/http-json-ce_scaladoc_tmpdir:
error: bad option: -P:wartremover:traverser:org.wartremover.warts.NonUnitStatements
model contains 179 documentable templates
INFO: From ScaladocGen ledger-service/http-json/http-json-ee_scaladoc_tmpdir:
error: bad option: -P:wartremover:traverser:org.wartremover.warts.NonUnitStatements
model contains 179 documentable templates
INFO: From ScaladocGen ledger-service/http-json-testing/ee_scaladoc_tmpdir:
error: bad option: -P:wartremover:traverser:org.wartremover.warts.NonUnitStatements
model contains 21 documentable templates
INFO: From ScaladocGen ledger-service/http-json-testing/ce_scaladoc_tmpdir:
error: bad option: -P:wartremover:traverser:org.wartremover.warts.NonUnitStatements
model contains 21 documentable templates
INFO: From ScaladocGen ledger-service/http-json-perf/http-json-perf-ee_scaladoc_tmpdir:
error: bad option: -P:wartremover:traverser:org.wartremover.warts.NonUnitStatements
model contains 27 documentable templates
INFO: From ScaladocGen ledger-service/http-json-perf/http-json-perf-ce_scaladoc_tmpdir:
error: bad option: -P:wartremover:traverser:org.wartremover.warts.NonUnitStatements
model contains 27 documentable templates
INFO: From ScaladocGen ledger-service/http-json/integration-tests-lib-ce_scaladoc_tmpdir:
model contains 14 documentable templates
INFO: From ScaladocGen ledger-service/http-json/integration-tests-lib-ee_scaladoc_tmpdir:
model contains 14 documentable templates
INFO: Elapsed time: 145.575s, Critical Path: 144.69s
INFO: 43 processes: 6 remote cache hit, 1 internal, 22 linux-sandbox, 14 worker.
INFO: Build completed successfully, 43 total actions
```
2021-05-03 15:06:05 +00:00
Moritz Kiefer
4aca199bbd
Upgrade to Scala 2.13.5 (#9528)
changelog_begin
changelog_end
2021-04-29 13:05:57 +00:00
Moritz Kiefer
0075ff1899
Pass along tags in da_scala_test_suite (#9521)
changelog_begin
changelog_end
2021-04-28 09:14:27 +02:00
Samir Talwar
8cd3658b14
Switch to an environment variable for enabling Oracle tests. (#9511)
* participant-integration-api: Build Oracle tests, but don't run them.

CHANGELOG_BEGIN
CHANGELOG_END

* triggers: Switch to an environment variable for enabling Oracle tests.

* http-json: Switch to an environment variable for enabling Oracle tests.

* Disable running Oracle tests by default, not building them.

* triggers/service: Remove unused test dependencies.
2021-04-27 11:50:39 +00:00
Samir Talwar
e1af564bcc
Switch from @silent to @nowarn. (#9498)
* Switch from `@silent` to `@nowarn`.

This annotation is native to Scala 2.12.13+ and 2.13.2+. It replaces
most usages of `@silent`.

I had to get creative about a couple of use cases that didn't work.
Specifically:

  1.  Suppressing deprecation warnings works, but Scala 2.12 erroneously
      complains that the `@nowarn` is unnecessary.  I had to suppress
      this warning too with `-Ywarn-unused:-nowarn`.
  2.  I can't seem to suppress the warning, "The outer reference in this
      type test cannot be checked at run time." Instead, I have
      refactored the code to remove the warning.

We still need to use the silencer plugin to suppress some warnings about
unused imports (because of compatibility between Scala 2.12 and 2.13),
but this means we no longer need the library, and therefore it is not a
transitive dependency that downstream consumers need to worry about.

CHANGELOG_BEGIN
CHANGELOG_END

* Add some comments around `@nowarn` support.

* language-support/scala: Fix a warning suppression.

* Revert to the default warnings.

Compatibility was complaining.
2021-04-26 19:46:14 +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
Sofia Faro
e6ea8fa9b3
Start adding exception syntax support. (#8960)
* Start adding exception syntax support.

changelog_begin
changelog_end

* .

* ..

* . .

* ....

* .___.

* ..__..

* ._._._.

* update stack snapshot

* recompile ghc-lib

* update stackage

* add CmmParse patch

* incorporate CmmParse.y patch into ghc branch

* Add a first test for exception syntax desugaring.

* Add a test for multiple message declarations

* update ghc patch

* Update duplicate message test with location

* add brackets test

* Add final patch SHA

* update stack-snapshot and unpin for unix

* Update stackage pin on windows
2021-03-10 12:07:53 +00:00
Andreas Herrmann
f4eeed396a
Update rules_haskell (#8987)
changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-03-03 10:40:26 +01:00
Moritz Kiefer
7287063072
Fix protobuf structure for empty import prefix (#8986)
052f69cde9
broke the structure of our protobufs by changing the import prefix
from "." to an empty string which ends up flattening the whole
file. This PR changes the default for tars to match the old
behavior. We can’t just change the default at the function level since
the prefix is used outside of pkg_tar and in those places an empty
string is required :(

changelog_begin
changelog_end
2021-03-02 17:26:34 +01:00
Moritz Kiefer
dba114a283
Merge Maven uploads for different Scala versions (#8943)
* Merge Maven uploads for different Scala versions

It turns out Maven will abort an existing staging operation if you
create a new one. This means our jobs race against each other. We
could try to fix that by either sequencing the jobs in a clever
way (annoying and can break things like rerunning if only parts
failed), or by creating more profiles (unclear if you can even have
two profiles for the same group id, even if you do, it’s annoying to
merge).

So in this PR I (grudgingly) merged both uploads into the Haskell
script. This isn’t all bad:

1. It moves some logic from bash embedded in yaml string literals into
Haskell code.
2. It duplicates some versions but it removes duplication in other
places so overall not too much worse.
3. It does however, make things slower. We don’t run this stuff in
parallel. That said, the release step is relatively small (< 5min) and
it only runs on Linux.

We could add CLI arguments to make the Scala versions configurable for
local development. Given that this is blocking releases, I wanted to
get something in that works first and then see what we need in that regard.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-02-24 20:33:53 +00:00
Moritz Kiefer
44bae76160
Support scala_deps in da_scala_benchmark_jmh (#8928)
changelog_begin
changelog_end
2021-02-24 10:46:24 +01:00
Moritz Kiefer
e081bf5e98
Avoid warning on empty classpaths (#8886)
Some of our targets, e.g., //ledger/ledger-api-health have no
dependencies. On Scala 2.13, an empty classpath option produces a
bunch of confusing but afaict harmless warnings, on 2.12 it doesn’t
but there is still no point in passing an empty classpath so we can
omit it on both.

changelog_begin
changelog_end
2021-02-17 17:46:19 +01:00
Moritz Kiefer
ba6ba9019f
Release Scala 2.13 artifacts (#8858)
* Release Scala 2.13 artifacts

changelog_begin
changelog_end

* Dedup default scala version

changelog_begin
changelog_end
2021-02-17 14:32:04 +01:00
Kamil Bożek
9b70f4c106
Replace ai.x.diff library with com.softwaremill.diffx [DPP-192] (#8821)
* Replaced diff with diffx

* Explicitly added magnolia and mercator dependencies to fix automatical type class derivation

* CHANGELOG_BEGIN
CHANGELOG_END

* Removed unnecessary Diff type class instance for Seq[T]

* Removed ai.x.diff leftovers

* Added an explanatory comment for magnolia and mercator dependencies

* Formatted changes

* Added optional scaladoc parameter to Bazel's da_scala_library_suite()

* Formatted changes
2021-02-17 10:56:23 +01:00
Moritz Kiefer
7ae28beff9
More Scala 2.13 cleanup (#8855)
This fixes Scaladoc and our pom file generation.

It also clears up the confusing error around gatling and removes a
redundant dependency on sbt (no idea why we had that in the first
place) both of which resulted in Scala 2.12 dependencies in our 2.13
lockfile which is obviously bad.

With this, we should now be ready to publish Scala 2.13 artifacts once
the ledger API test tool PR lands.

changelog_begin
changelog_end
2021-02-16 09:39:16 +00:00
Moritz Kiefer
777749539c
Draw the rest of the Scala 2.13 owl (#8852)
* Draw the rest of the Scala 2.13 owl

Not quite but pretty close and this switches us over from inclusions
to exclusions which makes it much easier to track.

Ledger API test tool should be fixed by #8821. Non-repudiation needs a
tiny bit of work since unwrapArray doesn’t work the same on 2.13 but
shouldn’t be hard to fix.

changelog_begin
changelog_end

* Fix ScriptService tests

Those tests were all dumb. They asserted on a fixed order while the
function to sort the things was broken so we ended up with the random
Map order which is unsurprisingly not the same.

This is easily fixed by fixing the sort function.

There is also a second issue with query not sorting.

changelog_begin
changelog_end

* Turns out if you fix one test the next one breaks

And clearly nobody ever tested this or give this a second thought.

changelog_begin
changelog_end
2021-02-15 19:20:24 +00:00
Moritz Kiefer
9dc3d2ace4
Upgrade to Bazel 4.0 (#8798)
* Upgrade to Bazel 4.0

changelog_begin
changelog_end

* Go back to default assignment

changelog_begin
changelog_end
2021-02-11 10:08:47 +01: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
Andreas Herrmann
5a96ad0c93
Update grpc (#8720)
To include https://github.com/grpc/grpc/pull/24953 and
https://github.com/protocolbuffers/upb/pull/356 which fix
https://github.com/protocolbuffers/upb/issues/354.

The issue manifested on Windows CI with errors of the form

```
bazel-out/x64_windows-opt/bin/external/com_google_protobuf/google/protobuf/descriptor.upb.c: Permission denied
```

See https://dev.azure.com/digitalasset/daml/_build/results?buildId=68545

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-02-03 16:47:08 +01:00
Moritz Kiefer
afb2006566
Upgrade gRPC C library (#8693)
We can’t upgrade to the latest version 1.35.0 since it depends on a
newer version of Bazel but we can at least go to 1.34.1. We also have
to patch absl and grpc itself to fix mingw support and some undeclared
inclusions on Windows. Both patches are taken from upstream PRs (the
mingw one has not been merged yet).

There is also a small patch to grpc-haskell-core. I’ve started working
on upstreaming that but the nix build system is a mess and I haven’t
quite managed to get it working there.

changelog_begin
changelog_end
2021-02-01 16:11:06 +01:00
Robin Krom
60976ff202
update of ghcide (#8694)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-29 21:08:57 +01:00
Moritz Kiefer
5d91a25306
Disable deriving-defaults per file (#8684)
Disabling it per target works nicely for compilation but it gets
annoying in ghci since the warnings are still triggered. We could
disable it everywhere but I think the warning is generally useful. I
tried patching proto3-suite to use DerivingStrategies but that doesn’t
work because haskell-src is dead and doesn’t support it. So for now
adding it to the per-file list seems like the best option.

changelog_begin
changelog_end
2021-01-29 11:01:55 +00:00
Moritz Kiefer
c89e00342d
Clean broken entries from the Bazel cache (#8668)
* Clean broken entries from the Bazel cache

This is hopefully a somewhat reasonable workaround for the "output not
created" errors that keep annoying us.

For now, this is just part of the hourly cronjob but we could move it
somewhere else if desired.

changelog_begin
changelog_end

* Fix GCS credentials

changelog_begin
changelog_end
2021-01-28 17:57:09 +00:00
Robin Krom
fdbe6cc7e9
fix: set LOCAL_ARCHIVE when unset (#8627)
Fixes #8573.
Fixes #8574.

We set the LOCA_ARCHIVE environment variable when a locales archive
exists and the variable is unset.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-26 15:52:24 +01:00
Moritz Kiefer
6326822907
Upgrade grpc and protobuf libraries (#8558)
* Upgrade grpc and protobuf libraries

changelog_begin

- [Dependencies] Upgrade
  iou.grpc:grpc-(api|core|netty|protobuf|services|stub) to
  1.35.0.

- [Dependencies] Upgrade
  io.netty:netty-(codec-http2|handler|handler-proxy|resolver)
  to 4.1.58.Final.

- [Dependencies] Upgrade
  io.netty:netty-tcnative-boringssl-static to 2.0.36.Final.

- [Dependencies] Upgrade com.google.protobuf:protobuf-java to 3.14.0.

changelog_end

* Factor out netty and grpc version

changelog_begin
changelog_end
2021-01-26 14:17:18 +00:00
Robin Krom
550aa48fc5
Revert "fix: package locale-archive with binaries (#8609)" (#8621)
This reverts commit 535ed8a337.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-25 18:13:51 +01: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