Commit Graph

108 Commits

Author SHA1 Message Date
Samir Talwar
83ed13d799
Split the ledger-api-test-tool into libraries, under /ledger/ledger-api-tests. [KVL-1076] (#12771)
* Move //ledger/ledger-api-test-tool to //ledger/ledger-api-tests/tool.

And conformance.bzl to //ledger/ledger-api-tests.

* Move test tool infra to //ledger/ledger-api-tests/infrastructure.

* Split the ledger API test tool into smaller libraries.

There is no change to behavior.

CHANGELOG_BEGIN
CHANGELOG_END

* ledger-api-tests: Encapsulate performance tests.

* ledger-api-tests: Extract a "runner" library.

* ledger-api-tests: Publish libraries to Maven Central.

* ledger-api-tests: Fix Scaladoc so it compiles correctly.

Unfortunately I had to remove some Scaladoc in ActiveContractsServiceIT
which is incorrectly interpreted as not being attached to anything.
Fortunately, it's not actually that helpful.

* compatibility: Fix paths to the Ledger API Test Tool.

* Fix release types for ledger API test libraries.

* test-common: Publish generated Scala.

These libraries are dependencies of the ledger API tests components.

* ledger-api-tests: Use "com.daml" as the group ID everywhere.

* ledger-api-tests: Check that tests in `--additional` are valid.

* compatibility: Fix a reference to ledger-api-test-tool I missed.
2022-02-10 13:25:23 +00:00
Stefano Baghino
aec3390904
Replace silencer plugin with built-in warning configuration (#12543)
Since Scala 2.13.2, Scala introduced built-in support to
manage warnings in a more granular fashion, thus making
the silencer plugin we are currently using no longer
strictly useful. Removing compiler plugins also removes
friction from migrating to Scala 3 in the future. As a
cherry on top, the built-in warning configuration also
allows to check whether a `@nowarn` actually does
anything, allowing us to proactively remove unused
warnings should the need arise.

[Here][1] is s a blog post by the Scala team about it.

Warnings have been either solved or preserved if useful,
trying to minimize the scope (keeping it at the single
expression scope if possible). In particular, all
remaining usages of the Scala Collection API compatibility
module have been removed.

Using the silencer plugin also apparently hid a few
remaining usages of compatibility libraries that were used
as part of the transition from Scala 2.12 to Scala 2.13
that are no longer needed. Removing those warnings
highlighted those.

changelog_begin
changelog_end

[1]: https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
2022-01-24 15:01:35 +00:00
pbatko-da
4fe6e53b9d
[User management] Persistence with caching (#12344)
Adding
 - `PersistentUserManagementStore` and `CachedUserManagementStore`,
 - `UserManagementStorageBackendTemplate` and sql migrations,
 - CLI flags: `--user-management-max-cache-size` and `--user-management-cache-expiry`;
 And wiring `PersistentUserManagementStore` where before we had `InMemoryUserManagementStore`.
2022-01-18 15:59:22 +01:00
Moritz Kiefer
ce624915d5
Fix damlc warnings & compile flags (#12404)
`--ghc-option=-Werror` turns warnings into errors, `--ghc-option=-Wwarn`
undoes exactly that so this clearly was not doing anything sensible.

changelog_begin
changelog_end
2022-01-13 18:32:31 +00:00
mziolekda
fafb86b389
Add static time feature flag and test tool coverage [DPP-849] (#12336)
* Add static time feature flag and test tool coverage

CHANGELOG_BEGIN
CHANGELOG_END

* incorporate the review feedback
2022-01-11 12:21:05 +00:00
Gary Verhaegen
ea55ea2d14
Further copyright updates (#12249)
Somewhat error-prone, so please review carefully.

Reasons we need this:

- Some file types are not properly handled by the script.
- The only exclusion mechanism we currently have (`NO_AUTO_COPYRIGHT`)
  is overly coarse.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-04 16:32:17 +01:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
Moisés Ackerman
ba0c6c9841
Set --enable-scenarios to False by default (#12156)
* Set --enable-scenarios to False by default

changelog_begin
changelog_end

* Enable scenarios for shake test

* Add --enable-scenarios=yes for //compiler/lsp-tests

* Add enable_scenarios arg to rules_daml/daml.bzl helpers

* daml_compile
* daml_build_test
* daml_test

* Add enable_scenarios to ledger/test-common helper da_scala_dar_resources_library

* Add --enable-scenarios=yes for //ledger/test-common

* Remove unused scenario in //ledger/test-common PingPong test

* Add --enable-scenarios=yes for //daml-lf/tests

* Add --enable-scenarios=yes for //language-support/java tests

* Add --enable-scenarios=yes for group-chat example

* Add --enable-scenarios for //ledger/sandbox-perf LargeTransaction test

* Add --enable-scenarios=yes for //docs tests

* Add --enable-scenarios=yes for //daml-lf/scenario-interpreter tests

* format bazel

* Add --enable-scenario=yes for 'daml_doc_test's

* Add --enable-scenarios=yes for DamlDocTestIntegration

* Add --enable-scenarios=yes for DamlcTest

* Add --enable-scenarios=yes for Test/DataDependencies

* Add --enable-scenarios=yes for daml-ghc-deterministic.sh

* Add --enable-scenarios=yes for Test.IncrementalBuilds

* Add --enable-scenarios=yes for tests:memory-bond-trading and tests:memory-examples

* Add --enable-scenarios=yes for daml-assistant/integratio-tests
2021-12-20 19:31:06 +01:00
pbatko-da
0613a712c9
[DPP-767] Add assertion for logged messages in ErrorFactoriesSpec (#11973)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-08 09:54:49 +01:00
Moritz Kiefer
85e2fa551c
Avoid CPP in ledger API test tool daml code (#11993)
Apparently this works very poorly with damlc_legacy which fails to
find hpp after the latest nixpkgs upgrade. Somewhat confusingly it
only fails to find that on release builds and I don’t understand how
it ever worked but this seems more sensible anyway.

changelog_begin
changelog_end
2021-12-07 07:06:12 +01:00
Moritz Kiefer
31cc540cf9
Turn package name & version warnings into an error (#11859)
* Turn package name & version warnings into an error

fixes #11321

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-26 18:46:33 +00:00
Remy
58e69ade1a
LF: replace "dev" LF version by "1.dev" in bazel files (#11894)
the more consistent, as asked by Moritz in review of #11820

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 12:23:17 +00:00
mziolekda
f2aa09c114
Allow encoded server key files to be in base64 [DPP-761] (#11796)
* Allow encoded server key files to be in base64

CHANGELOG_BEGIN
CHANGELOG_END

* format

* dry tests
2021-11-23 09:49:52 +00:00
Kamil Bozek
d9c7031fc3
ACS testing - payload support [DPP-661] (#11308)
* Generating random payload of configurable size in ledger-api-bench-tool command submission

CHANGELOG_BEGIN
- [Integration Kit] - ledger-api-bench-tool can generate test contracts with configurable payload size.
CHANGELOG_END

* Fix for Scala 2.12

* Multi-template support for command submission in the ledger-api-bench-tool [DPP-659] (#11365)

* Added multi-template support for command submission in the ledger-api-bench-tool

CHANGELOG_BEGIN
- [Integration Kit] - Added multi-template support for command submission in the ledger-api-bench-tool
CHANGELOG_END

* Simplified distribution calculation

* Improved throttling - set max 100 in-flight commands
2021-10-26 17:19:03 +02:00
Kamil Bozek
0ee59f57c9
Command submission in the ledger-api-bench-tool. (#11296)
CHANGELOG_BEGIN
- [Integration Kit] - The ledger-api-bench-tool is now capable of generating test contracts for testing purposes.
CHANGELOG_END
2021-10-25 09:57:53 +02:00
nicu-da
b8e21d8f48
Fix takeFilter for the test StreamConsumer (#10918)
* Reorder the observers for StreamConsumer to first filter and then take just one element, not the other way around

CHANGELOG_BEGIN
CHANGELOG_END

* Refactor the test to get better stacktraces during failures

* Remove unused import
2021-09-17 16:16:04 +02:00
tudor-da
38227a8ed7
[Ledger API error codes] ErrorCode enrichments [DPP-591] (#10874)
* [Daml error codes API] Further implementations
* Implements ErrorCode.asGrpcError (and test)
* Error code logging now accepts correlation id and an extra context map
* Full error context is included into enriched logging context

CHANGELOG_BEGIN
CHANGELOG_END

* Fixed Scala 2.12 compilation issues
2021-09-15 07:43:32 +02:00
Moritz Kiefer
90b008ef0d
Stop using controller … can syntax in ledger tests (#10814)
* Stop using `controller … can` syntax in ledger tests

We’re planning to deprecate that in SDK 2.0 to reduce the confusion
around the implicit observer behavior so in preparation for that, this
PR drops the syntax from all ledger tests.

changelog_begin
changelog_end

* shuffle let above usage

changelog_begin
changelog_end
2021-09-09 14:06:06 +00:00
pbatko-da
1ded42f185
[DPP-418] Protect TLS keys - follow-up cleanup (#10696)
CHANGELOG_BEGIN
CHANGELOG_END
2021-08-31 10:42:47 +02:00
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
Remy
d54adb2543
Ledger-API: Conformance tests for contract IDs suffixing (#10654)
This is part of #10504

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-26 16:14:02 +02:00
Remy
1971274893
Reactive canton conformance test aginst LF 1.13 (#10458)
Now we compile the conformance test for 1.13, we can run conton
against 1.13.

follow up of #10456

CHANGELOG_BEGIN
CHANGELOG_END
2021-08-02 19:43:37 +02:00
Moritz Kiefer
4cf5641678
Build & releases 1.13 Ledger API test tool (#10456)
Temporary hack to unblock Canton until they finish their exception support.

changelog_begin
changelog_end
2021-08-02 13:27:45 +00:00
Remy
72cf2f36d3
LF: replace bazel keyword stable by default (#10410)
to refer to the compiler default LF output.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-27 09:27:03 +02:00
tudor-da
96f048330a
[Divulgence pruning] Conformance tests implementation [DPP-484] (#10385)
* [Divulgence pruning] Conformance tests implementation

CHANGELOG_BEGIN
[Integration kit] Extended the Ledger API test tool with tests for the pruning of all divulgence events.
CHANGELOG_END

* Addressed review comments
2021-07-23 14:33:52 +02:00
Remy
63739fa712
Add conformance test for deeply nested values (#10319)
CHANGELOG_BEGIN
CHANGELOG_END
2021-07-21 20:00:26 +02:00
Remy
a8f190214c
LF: change type from Try to Either in archive module (#10277)
* LF: change type from Try to Either in archive module

This is the first part of restructuring errors in archive module.
This is part of #9974.

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* remove type alias

* apply stephen suggestion

* fix after rebase

* fix test

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-07-14 19:24:31 +00:00
Remy
caf85a2270
LF: rationalize archive Parser/Reader/Decoder (#10239)
CHANGELOG_BEGIN
CHANGELOG_END
2021-07-14 11:05:17 +02:00
Remy
f19f5b0821
LF: Simplify DarReader (#10217)
This PR simplifies a bit DarReader and UniversalDarReader

This is a follow up of #10208.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-08 17:03:45 +02:00
Samir Talwar
5493e4e2b1
language-support/scala/codegen: Set the logging level to WARN. (#10165)
I don't find the output from Bazel very helpful most of the time. It
does, however, produce a lot of noise which I have to filter through
when something else goes wrong.

CHANGELOG_BEGIN
CHANGELOG_END
2021-07-01 16:49:46 +00:00
Kamil Bożek
ef9a04caf5
Divulgence crash tests [DPP-433] (#9942)
* A test case for crashing participant in a multi-node env with divulged contracts

* Fixed test naming

CHANGELOG_BEGIN
CHANGELOG_END

* Additional usability check for the disclosed contract

* A newline

* Verify that fetching an archived contract is not possible

* Second test case

* A `ledger-api-test-tool` test case for divulging a contract with key twice on multiple participants [DPP-433] (#9970)

* A test case for divulging a contract with a key twice on multiple participants

CHANGELOG_BEGIN
CHANGELOG_END

* Use autogenerated archive method

* Trigger build

* Increased timeout for TransactionServiceIT:TXInvisibleTransactionTreeByEventId
2021-06-29 15:49:23 +02:00
Moritz Kiefer
1b428be7d2
Add ledger API test tool tests for rollback projections (#9778)
* Add ledger API test tool tests for rollback projections

This adds 3 tests for projections under rollback nodes.

The first one is relatively clear hopefully and tests divulgence.

The other two are a bit more intricate. For both of those we can also
not test too much via the ledger API since we don’t actually get
access to rollback nodes. However, it still seems useful to at least
exercise those code paths and make sure they don’t do anything
horribbly wrong.

The second test tests the normalization rules from
https://github.com/digital-asset/daml/blob/main/docs/source/concepts/ledger-model/ledger-exceptions.rst#privacy

The last one tests a more complex structure with deeply nested
rollback nodes and different informees.

changelog_begin
changelog_end

* Update ledger/test-common/src/main/daml/semantic/Exceptions.daml

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2021-05-25 08:53:43 +02:00
Moritz Kiefer
4b3b9ef165
Add race condition tests for exceptions (#9688)
* Add race condition tests for exceptions

This PR addresses
https://github.com/digital-asset/daml/pull/9400#pullrequestreview-634770251
and adds tests that match RaceConditionTests but to the read side in a
rollback (we cannot do writes in rollbacks, they are rolled back :)).

The tests are as close as possible to the other race condition tests
to ease maintenance and reduce confusion.

changelog_begin
changelog_end

* remove commented lines

changelog_begin
changelog_end

* Disable accidentally enabled ClosedWorldIT

changelog_begin
changelog_end
2021-05-14 17:36:25 +02:00
Moritz Kiefer
dce6a16649
Add Ledger API test tool tests for exceptions (#9400)
* Add Ledger API test tool tests for exceptions

changelog_begin
changelog_end

* Update daml-lf/language/daml-lf.bzl

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>

* Address review comments

changelog_begin
changelog_end

* Shuffle around test

changelog_begin
changelog_end

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2021-05-03 18:40:52 +02: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
Moritz Kiefer
4e1c5fedb3
Check visibility for by-key operation of local contracts (#9470)
* Check visibility for by-key operation of local contracts

fixes #9454

I tried out two approaches for this:

1. The one here where we add a new callback. This has the advantage
   that the engine remains oblivious to visibility checks. They are all
   done outside and the engine doesn’t even know about the reading
   parties.
2. Make the engine aware of the reading parties. A start of that is in
   #9458.

Both work in principle but I ended up going for 1 in the end. Doing
half of the visibility checks outside the engine and half inside just
seems worse than the current state.

changelog_begin

- [Daml Engine] Fix a bug where it was possible to
  fetch/lookup/exercise a local contract by key even if the reading parties
  are not stakeholders. See #9454 for details.

changelog_end

* Disable new test on Canton

changelog_begin
changelog_end

* Exclude from compat tests

changelog_begin
changelog_end

* s/LocalLookup/LocalFetch/

changelog_begin
changelog_end

* Address review

changelog_begin
changelog_end
2021-04-22 21:39:12 +02:00
Samir Talwar
f6e2e2d384
ledger-api-test-tool: A bit of refactoring around RaceConditionIT. (#9428)
* test-common: Simplify RaceTests.daml using `isSome`.

* ledger-api-test-tool: Make IntelliJ happy about RaceConditionIT.

It doesn't seem to like the combination of `Future.traverse` and ranges.

* ledger-api-test-tool: Pull out methods and re-use when possible.

I prefer helper methods to be in the companion object where possible.

CHANGELOG_BEGIN
CHANGELOG_END
2021-04-16 09:20:49 +00:00
Kamil Bożek
c91d9ec3ff
Race condition test suite for the ledger-api-test-tool [DPP-274] (#9138)
* Early draft of the race condition ITs

* Archival vs Successful lookup by key test

* More descriptive failure messages

* Unsuccessful lookup vs non-transient creation test

* Double-archival test

* Fixed a test case name

* Archival vs Creation order test

* Reduced number of test templates

* Improved race test template naming

* Helper object with transaction and template utils

* Simplified transaction util

* Fixed wrong choice name

* Removed redundant println

* Formatted code changes

* Minor change

* CHANGELOG_BEGIN
- Integration Kit - added a test suite for race condition to the ledger-api-test-tool
CHANGELOG_END

* Removed unnecessary sorting of transactions

* Added explanatory comments to test cases

* Mechanism for running ledger-api-test-tool test cases multiple times

* Running each race condition test case 5 times

* Fixed WWArchiveVsNonTransientCreate test case

* Fixed flakiness of RWArchiveVsNonConsumingChoice

* Disabled RaceConditionIT in Canton tests

* Formatted code changes

* Moved RaceConditionIT to conformance tests with unique contract keys mode on for Canton

* Nicer delay mechanism

* Improved WWArchiveVsNonTransientCreate to take contention into account

* Fixed RWTransientCreateVsNonTransientCreate conditions for Canton

* Increased the delay before reading the transaction trees stream to 1 second

* Fixed incorrect conformance tests definition for RaceConditionIT

* Running race condition tests sequentially to avoid timeouts

* Simplified race condition test case definition

* Return sum of durations for repeating test cases in the ledger-api-test-tool

* Reverted previous change with computing sum of durations

* Exclude RaceConditionIT from sandbox-on-x conformance tests

* Print the number of a test run only for cases when the number of repetitions is > 1

* Fixed RWArchiveVsFetch scenario
2021-03-25 23:07:01 +01:00
Hubert Slojewski
51f495e758
KVL-203 Share participant state integration test harness (#9143)
* Expose libraries for integration testing purposes

The motivation of these changes is to eliminate manual work and reduce duplication between the SDK and oem-integration-kit repos by reusing the same test fixture for integration testing participant state implementations. Also, the DARs required for running these tests won't need to be manually updated.

CHANGELOG_BEGIN
CHANGELOG_END

* Fix a concurrency issue in integration tests

* Fix Bazel error

* Fix conflict resolution

* Move inline daml-lf to separate dar files

* Add a comment

* Add a missing artifact

* Extract method

* Remove maven tags

* Add a macro for Scala libraries with dar resources

* Improve the macro

* Add missing artifact

* Simplify the tests

* Format signature

* Fix the maven tag

* Add missing copyright headers

* Format bazel files

* Make //ledger/test-common lf version dependent (to avoid jar hell)

* Move da_scala_dar_resources_library to a separate bzl file

* Add missing artifacts

Co-authored-by: Hubert Slojewski <hubert.slojewski@tesco.com>
2021-03-19 16:29:02 +01:00
Remy
d17dd7e5f1
Ledger API test tool: test against legacy and preview version. (#8913)
* Ledger API test tool: test against legacy and preview version.

+ use dictionary instead of alias to map version keywords to LF version 

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-23 09:19:17 +01:00
Remy
d92f2c7003
Ledger: refactor bazel packaging of tedger test tool (#8894)
improve previous generalization from #8695

- use lf version instead keyword (like 'stable', 'latest', 'dev') to
  tag actual target.  This will allow two keywords to map to the same
  versions without doing twice the compilation/test work.

- use alias to map keywords tag target to versioned tag target.

- move package manage dar to test_commong.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-22 11:41:19 +01:00
Moritz Kiefer
f02e0fe42b
Generate Scala code compatible with Scala 2.13 (#8841)
fixes #8498

This fixes the error in 2.13 wtr to the location change of Predef. It
doesn’t yet address the warning wtr to the import of higherKinds. For
now, our build ignores that warning. Trying to figure out if we can
get away with a breaking change here or if we need to hide that change
behind a flag but either way, no need to block fixing the actual error
on that.

changelog_begin
changelog_end
2021-02-15 09:06:40 +01:00
Robert Autenrieth
cd66cfcb5a
Run the ledger api test tool with dev packages (#8695)
* Add CLI options to enable daml-lf dev version

* Compile test-common with multiple compiler versions

* Run the ledger API test tool with multiple compiler versions

changelog_begin
changelog_end

* Fix scaladoc issues

* Apply reviewer comments

regarding lf_preview_version
2021-02-05 17:53:31 +01:00
Robert Autenrieth
7c891ae49e
Use real identifiers in JdbcLedgerDaoSpec (#8670)
This prepares the test for the retrofitting of removed
type identifiers in verbose mode.

changelog_begin
changelog_end
2021-02-01 09:13:07 +01:00
Kamil Bożek
d2a9e1e5b3
--client-auth param for kvutils app [DPP-212] (#8589)
* --client-auth param for kvutils app

CHANGELOG_BEGIN
-- enabled --client-auth for kvutils config
CHANGELOG_END

* TLS integration tests for StandaloneApiServer client authorization parameter

* Refactored TlsFixture to reduce duplication

* Improved description of the client-auth parameter

* Added test cases with invalid certificates

* Improved readability of the test cases

* Formatted changes
2021-01-28 13:21:43 +01:00
Moritz Kiefer
cdb2c2d0ba
Port the rest of //ledger/... to Scala 2.13 (#8497)
* Port the rest of //ledger/... to Scala 2.13

draw the rest of the fcking owl

Omitted for now are the ledger API test tool which has a dependency
only compatible with 2.12 and the generated code of the Scala
codegen (the codegen compiles and runs with 2.13, the generated code
does not).

changelog_begin
changelog_end

* Less symbols

changelog_begin
changelog_end
2021-01-13 22:23:31 +01:00
Moritz Kiefer
22ce940954
Upgrade scalafmt and enable trailing commas (#8437)
This PR updates scalafmt and enables trailingCommas =
multiple. Unfortunately, scalafmt broke the version field which means
we cannot fully preserve the rest of the config. I’ve made some
attempts to stay reasonably close to the original config but couldn’t
find an exact equivalent in a lot of cases. I don’t feel strongly
about any of the settings so happy to change them to something else.

As announced, this will be merged on Saturday to avoid too many conflicts.

changelog_begin
changelog_end
2021-01-09 11:37:37 +01:00
Moritz Kiefer
3a8f5e8aaa
Port //language-support/scala to Scala 2.13 (#8442)
The one thing that is still missing is making the generated Scala code
from the codegen compatible with Scala 2.13 so the examples are
excluded for now.

changelog_begin
changelog_end
2021-01-08 20:28:15 +01:00
Bernhard Elsner
cda93db944
Daml case and logo (#8433)
* Replace many occurrences of DAML with Daml

* Update docs logo

* A few more CLI occurrences

CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END

* Fix some over-eager replacements

* A few mor occurrences in md files

* Address comments in *.proto files

* Change case in comments and strings in .ts files

* Revert changes to frozen proto files

* Also revert LF 1.11

* Update get-daml.sh

* Update windows installer

* Include .py files

* Include comments in .daml files

* More instances in the assistant CLI

* some more help texts
2021-01-08 12:50:15 +00:00
Moritz Kiefer
424faa923a
Port damlc dependencies to Scala 2.13 (#8423)
* Port damlc dependencies to Scala 2.13

I got a bit fed up by the fact that going directory by directory
didn’t really work since there are two many interdependencies in
tests (e.g., client tests depend on sandbox, sandbox tests depend on
clients, engine tests depend on DARs which depend on damlc, …).

So before attempting to continue with the per-directory process, this
is a bruteforce approach to break a lot of those cycles by porting all
dependencies of damlc which includes client bindings (for DAML Script)
and Sandbox Classic (also for DAML Script).

If this is too annoying to review let me know and I’ll try to split it
up into a few chunks.

changelog_begin
changelog_end

* Update daml-lf/data/src/main/2.13/com/daml/lf/data/LawlessTraversals.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* fixup lawlesstraversal

changelog_begin
changelog_end

* less iterator more view

changelog_begin
changelog_end

* document safety of unsafeWrapArray

changelog_begin
changelog_end

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-01-08 07:22:38 +01:00