Commit Graph

9659 Commits

Author SHA1 Message Date
Remy
1118a7fb58
Minor fix in RELEASE.md (#13315)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-17 18:56:03 +01:00
Sofia Faro
79715ad32d
interfaces: Drop the typerep, raise WronglyTypedContract (#13314)
* Drop the typerep in interface desugaring.

GHC PR: https://github.com/digital-asset/ghc/pull/110

Fixes https://github.com/digital-asset/daml/issues/13275 and https://github.com/digital-asset/daml/issues/13283

changelog_begin
changelog_end

* compile ghc-lib

* update bazel-haskell-deps

* update InterfaceTypeRepCheck test

* scalafmt

* update compile.yml

* update bazel-haskell-deps last time
2022-03-17 16:12:46 +00:00
Sofia Faro
4ee7240dff
Mark create-daml-app test as flaky. (#13317)
* Mark create-daml-app test as flaky.

changelog_begin
changelog_end

* buildifier-fix
2022-03-17 13:05:09 +00:00
nickchapman-da
042d60a51f
Complete stack-safety fixes for speedy ANF transform (#13312)
* enable Anf stack-safety tests for EUpdate cases

* fix stack-safety for closures in Anf transform

* fix stack-safety for try-catch handling in Anf transform

* add missing testcases for scope-exercise/prevernt-catch ANF stack-safety, and fix the overflow

changelog_begin
changelog_end
2022-03-17 09:59:53 +00:00
pbatko-da
f1949b44f5
Update """'tools.dade-exec-nix-tool' not found""" section in BAZEL.md (#13269)
changelog_begin
changelog_end
2022-03-16 23:26:10 +01:00
Robin Krom
f7a73c5a87
ifaces: more tests for requires (#13309)
This adds tests for circular and non-closed requires in interfaces on
the daml-lf side.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-16 18:15:26 +01:00
Stefano Baghino
caa8025788
Reduce noise when building //daml-lf/encoder:testing-dar-* (#13313)
changelog_begin
changelog_end

Adding Logback to the runtime dependencies allows to avoid having
logging noise when building this due to the missing logger implementation.

Before:

```
> bazel build //daml-lf/encoder:testing-dar-1.12
INFO: Invocation ID: fd46d196-8780-4b3a-9c23-41501a4668d2
INFO: Analyzed target //daml-lf/encoder:testing-dar-1.12 (1 packages loaded, 27 targets configured).
INFO: Found 1 target...
INFO: From Executing genrule //daml-lf/encoder:testing-dar-1.12:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Target //daml-lf/encoder:testing-dar-1.12 up-to-date:
  bazel-bin/daml-lf/encoder/test-1.12.dar
INFO: Elapsed time: 0.365s, Critical Path: 0.01s
INFO: 5 processes: 1 remote cache hit, 4 internal.
INFO: Build completed successfully, 5 total actions
```

After:

```
> bazel build //daml-lf/encoder:testing-dar-1.12
INFO: Invocation ID: d79a9df8-8243-49db-bd67-56a4f53ca746
INFO: Analyzed target //daml-lf/encoder:testing-dar-1.12 (1 packages loaded, 27 targets configured).
INFO: Found 1 target...
Target //daml-lf/encoder:testing-dar-1.12 up-to-date:
  bazel-bin/daml-lf/encoder/test-1.12.dar
INFO: Elapsed time: 0.332s, Critical Path: 0.01s
INFO: 5 processes: 1 remote cache hit, 4 internal.
INFO: Build completed successfully, 5 total actions
```

Notice the lack of SLF4J warnings.

See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2022-03-16 16:24:16 +00:00
Stefano Baghino
1c33a824c6
Remove dead code from Java codegen (#13311)
I found this while having a look at reproducing #13308.

changelog_begin
changelog_end
2022-03-16 16:23:42 +00:00
Stefano Baghino
0a92bd7431
Fix binary for Coursier (#13310)
The binary should be called `cs`, the full `coursier` name causes the following error

```
/path/to/digital-asset/daml/dev-env/bin/../lib/dade-common: line 143: /nix/store/hsbnxsgqhaxavqdwmqyvcdp3ng22gvaf-coursier-2.0.16/bin/coursier: No such file or directory
```

changelog_begin
changelog_end
2022-03-16 15:30:07 +01:00
pbatko-da
35c5812703
[Error codes] Update docstring for com.daml.ledger.participant.state.v2.PruningResult.NotPruned [DPP-861] (#13305)
changelog_begin
changelog_end
2022-03-16 15:07:42 +01:00
pbatko-da
c6a0275f6e
[Error codes] Fill in missing contexts that were lost where reflection based context population was removed [DPP-606] (#13264)
And rename error arguments that haven't been in camel case yet.

changelog_begin
changelog_end
2022-03-16 15:07:24 +01:00
pbatko-da
3f0ded9274
Remove ErrorFactories [DPP-606] (#13285)
changelog_begin
changelog_end
2022-03-16 14:00:30 +01:00
pbatko-da
b63fdc7031
[Error codes] Increase visibility of formatContextAsString (#13304)
changelog_begin
changelog_end
2022-03-16 13:26:57 +01:00
azure-pipelines[bot]
5bd58a907f
update NOTICES file (#13303) 2022-03-16 08:12:02 -04:00
Robin Krom
93c53da3df
requires checks (#13300)
* interfaces: tests for requires typing

We add tests for the correct typing of the interface requires field.

CHANGELOG_BEGIN
CHANGELOG_END

* security evidence
2022-03-16 12:05:30 +00:00
pbatko-da
e0965709fe
[Error codes] Remove .asGrpcStatusFromContext and .asGrpcErrorFromContext from BaseError trait [DPP-606] (#13262)
changelog_begin
changelog_end
2022-03-16 09:30:07 +01:00
Stephen Compall
0b5ad7a7bd
interface support in the interface library (#13154)
This adds the presence of interface names, as well as lists of choices
and their argument/return types for each interface.

It also changes the semantics of DefTemplate and EnvironmentInterface:
each may contain "unresolved choices", which are the choices inherited
from interfaces for each implementing template;
EnvironmentInterface#resolveChoices will copy the full type information
as a concrete choice for each implementing template, which should be
much simpler for codegen and json-api.

A type generator should take account of the astInterfaces as well as
typeDecls in EnvironmentInterface; interfaces aren't included in
typeDecls because where I is an interface only ContractId I is
serializable.

* Ast.DataInterface is empty, just use the interfaces map directly
* port json-api for interface API changes; does not solve #12689
* port Scala codegen for interface API changes; does not add support
* port Java codegen for interface API changes; does not solve #11350

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 19:34:54 +00:00
Stefano Baghino
739173bf84
Remove references to missing appender (#13294)
changelog_begin
[Trigger Service] Spurious logging warnings will not be printed when running `daml trigger-service`
[Oauth2 Middleware] Spurious logging warnings will not be printed when running `daml oauth2-middleware`
changelog_end

Removed references to a missing `stderr-appender` in several configuration file.

This removes warnings when running `daml trigger-service` and `daml oauth2-middleware`.

This will also remove those same warnings from several tests (HTTP JSON API and Trigger Service).
2022-03-15 18:02:02 +01:00
Gary Verhaegen
2dc42a3fc2
release instructions typos (#13297)
Thanks @S11001001 for reporting.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 16:12:18 +00:00
Stefano Baghino
0ffb88a6ca
Add logback.xml file in the distributable JAR for the Trigger Service (#13295)
Fixes #13042

changelog_begin
[Trigger Service] Debug logging is now hidden by default. See #13042
changelog_end

Summary of changes:
- remove unused `exports_files`
- refactor trigger-service-binary rules in a single comprehension
- add the `logback.xml` file in the JAR root

Tested manually: listed the contents of the output of `bazel build //triggers/service:trigger-service-binary-ce_deploy.jar` and `bazel build //triggers/service:trigger-service-binary-ee_deploy.jar` before and after the fix, observed that the only difference is the `logback.xml` file in the JAR root; added a debug logger call and ran both JARs before and after the fix, observed that after the fix the debug logging line is no longer printed.
2022-03-15 16:03:01 +00:00
azure-pipelines[bot]
54847efb20
rotate release duty after 2022-03-09 (#13213)
@stewSquared is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-15 16:19:13 +01:00
Stephen Compall
153a5e6bcc
parallelize long-running custom/user token tests (#13290)
Saves about 90 seconds in test wallclock time. Other tests considered
either ran too short to bother splitting, or were Oracle and thus won't
affect the main run at all.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 10:59:36 -04:00
Sofia Faro
1feb4d25eb
Drop typerep argument from ExerciseInterface. (#13284)
* ifaces: Remove typerep arg from UExerciseInterface

changelog_begin
changelog_end

* Drop typerep argument in protobuf and haskell ast

changelog_begin
changelog_end

* scalafmt

* fix ExprParser

* fix PhaseOneTest

* fix validation test

* update evidencing security
2022-03-15 13:53:06 +00:00
Gary Verhaegen
da20fae6cb
retry 1.18.2 snapshot (#13293)
Something went wrong with Maven but no idea why. I'm hoping it was a
transient issue on their side.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 13:45:35 +01:00
Robin Krom
e2c13694f2
daml-lf:encoder/decoder for requires and tests (#13272)
This adds the parser for interface requires plus tests for it.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 12:56:49 +01:00
pbatko-da
c7266dd60c
Remove ErrorCauseExport + some file renames [DPP-606] (#13259)
changelog_begin
changelog_end
2022-03-15 12:51:32 +01:00
azure-pipelines[bot]
ee1177df07
update NOTICES file (#13291)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-15 12:28:57 +01:00
Gary Verhaegen
154dafb804
merge release instructions (#13292)
Turns out splitting the file (#13160) was not such a good idea.

Also tweak the text a little bit, hopefully making it clearer.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 11:27:36 +01:00
Sergey Kisel
a4f4300502
Naming and logging improvements [DPP-956] (#13270)
* Naming and logging improvements [DPP-956]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 09:40:39 +01:00
Stephen Compall
2056f0a5cf
nonempty-cats refactoring (#13282)
* move ImplicitPreference to scala-utils
  - test it
  - use it instead of tags for json-api testing
  - fix a somewhat nonsensical type therein
* several new tests for the NonEmpty Foldable instances

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 20:48:41 -04:00
Marton Nagy
3a6b8071d2
Improve logging for AkkaExecutionSequencer (#13286)
changelog_begin
changelog_end
2022-03-14 21:42:43 +00:00
tudor-da
b081a469dd
Enrich LoggingContext Commands extractor with submission id (#13280)
changelog_begin
changelog_end
2022-03-14 18:37:31 +00:00
pbatko-da
ee6a5f9e0e
Handle misc error codes todos. [DPP-606] (#13248)
changelog_begin
changelog_end
2022-03-14 17:16:31 +01:00
mziolekda
a8d55727c5
release 1.18.2-snapshot.20220310.8437.0.5221a5d1 (#13273)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 17:10:55 +01:00
Stefano Baghino
24d3da70e8
Do not point at a milestone from the HTTP JSON API docs (#13281)
We recently started to use a project board to prioritize our work.

As such, we will soon remove our milestones and move relevant tickets
to the board after ensuring that all items that belong to us are
tracked by the appropriate team label (`team/app-runtime`).

changelog_begin
changelog_end
2022-03-14 16:31:35 +01:00
Stefano Baghino
e1d677c3ef
Return a wrapper GetUserResponse type for the Java bindings (#13276)
Fixes https://github.com/digital-asset/daml/issues/13274

changelog_begin
[Java bindings] The `UserManagementClient.getUser` methods have been changed to return a
custom wrapper type `GetUserResponse` instead of a `User` directly. If you were already
using these methods, you can make your code work as before by adding a call to the
`getUser` method defined on the `GetUserResponse` type you now get back. You can read
more about this issue here: https://github.com/digital-asset/daml/issues/13274
changelog_end
2022-03-14 16:31:17 +01:00
Stephen Compall
2ce4223b97
fix maven_coordinates for nonempty-cats (#13278)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 15:05:50 +00:00
Stefano Baghino
4b864854a8
Improve description of the HTTP JSON API in the Ledger API docs (#13271)
Improve description of the HTTP JSON API in the Ledger API docs

changelog_begin
changelog_end

Fixes #13029
2022-03-14 14:59:20 +00:00
pbatko-da
e69343dfb3
[Error codes] Reorganize error groups file structure for better readability and easier modification. [DPP-606] (#13263)
changelog_begin
changelog_end
2022-03-14 15:13:26 +01:00
Robin Krom
492e5fdd07
ifaces:tests: extend encoder tests, fix bugs (#13253)
This extends the Scala encoder tests to include interface definitions
and interface implementatioins. Some bugs in the encoder and ast
rewriter are fixed.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 12:55:27 +01:00
Sofia Faro
83bdd983da
interfaces: Mark interface functions as 1.dev only in docs (#13268)
* iface: Mark functions as 1.dev only in docs

changelog_begin
changelog_end

* Update compiler/damlc/daml-stdlib-src/DA/Internal/Interface.daml

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2022-03-14 11:47:14 +00:00
pbatko-da
92e3e9e2df
Add unit tests for ErrorCode [DPP-799] (#13236)
changelog_begin
changelog_end
2022-03-14 12:38:23 +01:00
pbatko-da
a8c0984d9b
[User management] Make use of UM error group in the docs (#13260)
changelog_begin
changelog_end
2022-03-14 12:09:48 +01:00
pbatko-da
a27fa0c95a
[Error codes] Move and test logging value string serializer [DPP-606] (#13261)
changelog_begin
changelog_end
2022-03-14 12:09:10 +01:00
Sofia Faro
930bceeea8
Assign codeowner for /compiler/ and related (#13255)
Also add @ray-roestenburg-da to the codeowners for daml-assistant

Just following up on this:
https://github.com/digital-asset/daml/pull/13246/files#r823623864

changelog_begin
changelog_end
2022-03-14 09:19:48 +00:00
Kamil Bozek
ab6e085f6e
Move ExecutionContext to the CommandExecutor implementing classes [DPP-945] (#13153)
* Move ExecutionContext to the CommandExecutor implementing classes from method arguments

CHANGELOG_BEGIN
CHANGELOG_END

* Added information about the CPU-intensive computations executed by an ExecutionContext
2022-03-11 18:45:10 +01:00
pbatko-da
f210ee933c
Add missing context in PackageServiceError (#13258)
changelog_begin
changelog_end
2022-03-11 13:20:59 +01:00
nickchapman-da
e1030365f0
Fix the ANF transform for case-alternatives to be stack-stafe. (#13251)
changelog_begin
changelog_end
2022-03-10 17:33:28 +00:00
Stephen Compall
c9b5750968
NonEmpty utilities, new nonempty-cats library (#13115)
New instances and collection methods, many of which included
as-is from @andreaslochbihler-da's experiments downstream.

* mk, a version of apply with special inference
* new names for the conversion functions suggested by
  @andreaslochbihler-da
* groupBy1, zipWithIndex, reduceLeft, last1, distinct, toVector1
* a derived Semigroup instance
* a more explicit subtyping utility to specify implicit preference than
  what we get with shapeless @@
* from method, alias for unapply
* cats functorial, foldable instances in the new nonempty-cats library
* new NonEmpty utilities

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Lochbihler <36634420+andreaslochbihler-da@users.noreply.github.com>
2022-03-10 16:30:42 +00:00
Stephen Compall
e73963c88d
restrict SC's codeowners to desired notifications (#13252)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 15:20:31 +00:00