1. Google says the instance is currently overutilized and suggests
g1-small as a more appropriate size.
2. It occurred to me that the reason no error was logged might be that
we lose them, so explicitly redirecting stderr too.
CHANGELOG_BEGIN
CHANGELOG_END
Update the TypeScript version we're using in `daml2ts` and its support
libraries. Also update the versions of ESLint and its TypeScript
plugin we're using for linting the generated code. (And remove more
occurrences of `HashMap Text Text` at the same time.)
CHANGELOG_BEGIN
CHANGELOG_END
Using `on` to add event listeners is a Node.js idiom. In the brosers,
it's `addEventListener`, which works in Node.js too.
CHANGELOG_BEGIN
CHANGELOG_END
* Turn warnings for module name/record name mismatches into errors
The module name warning existed for ages. We started warning about the
record name mismatch in 0.13.55 so I’d like to turn it into an error
before 1.0
changelog_begin
- [DAML Compiler] File names must now match up with module names. This
already produced a warning in previous releases.
- [DAML Compiler] It is now an error to define a record with a single
constructor where the constructor does not match the type
name. To fix the error you need to change ```data X = Y { … }``` to
```data X = X { … }```. This restriction only applies to
single-constructor records. Variants and enums are not affected.
This already produced a warning in 0.13.55.
changelog_end
* Fix integration tests
* Fix docs
* Fix lsp tests
This PR adds a new test suite for DAML triggers based on scala test
rather than the client_server_test macro + a custom main. This seems
much nicer than the client_server_test (we get a lot of useful stuff
from scalatest, e.g., useful output of assertion failures, things
don’t blow up after the first test failure, …).
This PR only ports over a small fraction of the tests to make review
easier. The plan is then to port over everything and kill off the
existing test stuff once everything is ported over.
changelog_begin
changelog_end
Those were originally used for `damlc migrate`. However, that command
no longer exists and the only call site of `runNew` sets those
arguments to an empty list.
changelog_begin
changelog_end
* Remove old time model from ledger config
CHANGELOG_BEGIN
- [Ledger API] Fields related to the old ledger time
model have been removed from the configuration
management service and the ledger configuration service.
CHANGELOG_END
* Update ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/tests/LedgerConfigurationService.scala
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
Co-authored-by: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* Remove documentation for a removed option
CHANGELOG_BEGIN
- [DAML Integration Kit] The CLI option command-submission-ttl-scale-factor was
removed, as the LET/MRT/TTL fields have recently been removed
from the command submission service.
CHANGELOG_END
* Minor renaming
It appears that most of our Windows machines have not been rebooted
since Tuesday 24. We detected this because one of them has run out of
disk space.
This is not good, but what's worse is I currently have no idea what
could be going wrong, and we are not logging anything at all in the
current setup, so even ssh'ing into the machine provides no insight.
This PR hopefully addresses that by:
1. Redirecting the outputs of the script to a file, and
2. `tail`iing that file from the startup script, so the logs will appear
directly in the GCP web console. (This is what we currently do for
the Azure agent logs on Linux.)
This PR also tells the script to not stop on the first failed machine
and keep trying.
CHANGELOG_BEGIN
CHANGELOG_END
* prepare playground for perf testing
The goal of this commit is to provide me with a playground to test out
various GCP machine configurations and assess what impact they have on
build performance. I need separate pools for that as changing the
machine type requires a machine restart, which would be disruptive to
any running job if I did that in the existing pools.
The first commit in this PR does the following:
- Deactivate Bazel caching.
- Create two new machine groups (of size 1) for Linux and Windows pools.
- Disable all jobs that are not building the project on Linux or
Windows.
- Change the Linux and Windows jobs to use the new pools.
The plan is for me to manually change the machine types in the new pool
and rerun the build repeatedly. Once I believe I have the information I
need, the expected end result for this PR is only a change to the
machine type (or no change at all if the current machine size is already
optimal). All other changes will be undone and the additional pools will
be destroyed.
Note: as of the opening of this PR, the two new pools have not been
created yet at the Azure level (this is a separate, manual step not
managed by Terraform) and the Terraform files have not been applied.
See corresponding PR (#4520) for full details. The gist of it is:
- We need at least 28GB of memory to build at all, 30 is better.
- Additional memory beyond 30GB does not seem to provide any benefit.
- CPU speed matters more than number of CPU cores, but both help.
CHANGELOG_BEGIN
CHANGELOG_END
* New comamnd: daml ledger fetch-dar
`daml ledger fetch-dar [PID] [PATH]`
Download a `Package` and it's dependencies from a ledger, given a root `packageId`, and re-construct a valid `.dar` file. Addresses issue #5037.
The original package names are not reconstructed.
CHANGELOG_BEGIN
CHANGELOG_END
* address some comments
* fix spello
* attempt: recoverPackageName
* recover main package name & version
* Try to fix integration tests on Windows
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* sandbox: On reset, wait for the API server to start before replacing it.
Hopefully this addresses the flickering behavior we're seeing in CI.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Scale the retries in ResetServiceIT along with everything else.
Adding more syntax is just confusing for beginners so these are not
particularly helpful and I would argue that they aren’t that useful in
general even once you move past the beginner stage.
changelog_begin
changelog_end
* Allow to have both verbose and succinct row parsers
This will be used when we need to stream transactions and not individual
events.
changelog_begin
changelog_end
* Succinct parser should have verbose = false
As I said previously, all instances of the dreaded `HashMap Text Text`
can go away if write our code more direct. Here we go.
CHANGELOG_BEGIN
CHANGELOG_END
Semicolons at the end of every line seem to be good style. Logging to
the console does not help with the example. The `WebSocket` class is
built-in in the browser and you only need a package like `ws` on
Node.js.
CHANGELOG_BEGIN
CHANGELOG_END
There was a brief period of time where `daml build` did not work
outside of the assistant. When we fixed that we added it to the
integration tests since there was no other test suite that used damlc
as a binary (as opposed to using it as a library which runs through
different codepaths). However, in the meantime we have tons of tests
all over the place (e.g. the packaging tests) that call `damlc build`
outside of the assistant so these tests serve no purpose.
Also they are somewhat confusing since the point of the integration
tests is to test an installed SDK whereas these tests do not need an
installed SDK (that’s the whole point of those tests).
changelog_begin
changelog_end
We do not need to have templates in the `.daml` files we generate
during these templates, any serializable type is good enough. Thus,
let's make the tests shorter by using a simple serializable type
instead of templates.
Also make the tests easier to debug when expected failures of `daml2ts`
do not happen in the anticipated way.
CHANGELOG_BEGIN
CHANGELOG_END
* Support running DAML script over the JSON API
This is still in a somewhat messy state and some things don’t
work (documented in a comment) so I deliberately didn’t add this to
the documentation. However, there are tests and the PR is already
pretty large so I’d like to move the rest to separate PRs to not turn
this into more of a review nightmare than it already is.
changelog_begin
changelog_end
* Address review comments
This ensures that -l and -p work properly in the integration tests
since they no longer depend on the order.
There is lots of other crap to cleanup in those tests but I’m trying
to keep it to small steps.
changelog_begin
changelog_end
* daml2ts: Fix the A:X vs A.B bug
Currently, the TypeScript generated by `daml2ts` does not compile when
there are a modules `A` and `A.B` which both contain serializable types.
(Note: there can't be a type called `B` in `A` due to the name collision
check.)
Since fixing this within the current layout using TypeScript
namespaces would be very challenging since we would need to inject
subnamespaces into existing namespaces. Thus, we switch the code
generation to use ES2015 modules. Since TypeScript namespaces are
considered (somewhat) deprecated, this is a good move anyway.
As a result of this change to ES2015 we need to write `index.ts` files
at each node of the module hierarchy. These `index.ts` files reexport
the module at the current node (if present) and all child modules.
At the same time we also remove the default export of the top-level
`index.ts` file. It is not clear if they are actually useful and to
add them to the new scheme requires a technique that feels like a hack.
To give an example, assume we have modules `A` and `A.B.C`. We now write
the following directory structure:
```
src/
+- index.ts <- reexports A
+- A/
+- index.ts <- reexports module.ts and B
+- module.ts
+- B/
+- index.ts <- reexport C
+- C/
+- index.ts <- reexports module.ts
+- module.ts
```
If you import the package like
```typescript
import * as foo from '@daml.js/foo-1.0.0';
```
you can acces the `A` and `A.B.C` modules as `foo.A` and `foo.A.B.C`.
CHANGELOG_BEGIN
CHANGELOG_END
* Adapt build-and-lint-test
CHANGELOG_BEGIN
CHANGELOG_END
* Add new test
CHANGELOG_BEGIN
CHANGELOG_END
* ContractKeyStreamRequest with different types for whether offset-preceded or not
- should replace EnrichedContractKey as the WS StreamQuery type
* add the ContractKeyStreamRequest layer everywhere
* split StreamQuery parse from the other steps
* make StreamQuery type depend on the input JsValue
* only StreamQueryReader is a typeclass now
* scalafmt
* wrong type arg
* letting the request data and phantom archive removal choice flow
- from work with @leo-da
* finish threading request-derived phantom state to removal flow
- from work with @leo-da
* make it clear that hints are contract IDs in StreamQuery
- from work with @leo-da
* treat StreamQueryReader's type parameter fully as a phantom
- from work with @leo-da
* remove unused type alias
- from work with @leo-da
* test fetch resume, with and without various offsetHints
* document offsetHints
* missing ` in rst
- thanks @hurryabit
* rename offsetHint to contractIdAtOffset
CHANGELOG_BEGIN
- [JSON API - Experimental] New field ``contractIdAtOffset`` for fetch-by-key streams
to restore proper archive filtering.
See `issue #4511 <https://github.com/digital-asset/daml/issues/4511>`_.
CHANGELOG_END
* we never unify the two ContractKeyStreamRequest types
* doc update for contractIdAtOffset
* Make name collision check more strict
This PR extends the name collision check to catch collisions between
A:B (type B in module A) and module A.B.C. For now this is just a
warning and not an error. Once we turn it into an error, we also need
to add this to the Scala collision checker.
There is a fair bit of plumbing required to make warnings work but on
the plus side we get multiple errors at once now instead of erroring
out on the first one.
changelog_begin
- [DAML Compiler] The name collision check has been extended to also
count the case as a collision where you have a type B in module A and a module
A.B.C (but no module A.B). This is a warning in this SDK release but
will become an error in a future release. The typescript codegen is
not usable on packages that don’t uphold this restriction.
changelog_end
* Address review comments
* Remove unused da_doc_package
The only use-site was `//compiler/daml-licenses:daml-licenses`, which
itself was unused.
* Remove unused notices-gen
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* sdk-release-tarball: zip is unused
* daml-lf/archive: Use bazel_tools zipper
@bazel_tools//tools/zip:zipper avoids timestamps and sources of
indeterminism when creating an archive, so that the result is
reproducible.
CHANGELOG_BEGIN
CHANGELOG_END
* Remove unused @zip_dev_env
zip is fully replaced by @bazel_tools//tools/zip:zipper.
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Introduce DamlSubmissionBatch and the BatchingLedgerWriter
This introduces the DamlSubmissionBatch message to group
submissions into a single message and extends Envelope to
carry the batch. We're using the envelope wrapping for consistency
and compatibility.
We're adding this to kvutils version 3 as it has not yet been released
into the wild and as this is not backwards incompatible change.
Support for batching is implemented with the BatchingLedgerWriter
that wraps a LedgerWriter and groups submissions into a batch based
on size and time duration.
For implementing the validation of a batch we will require some rework
in the SubmissionValidator to be able to produce multiple "LogResult"s,
e.g. commit on the in-memory ledger results in an "Index" which is used
to signal new head to dispatcher. With a batch we'd need to pick max index.
CHANGELOG_BEGIN
CHANGELOG_END
* Add missing copyright header
* Address code reviews
* Post rebase fixes
* Rename BATCH -> SUBMISSION_BATCH
* Address code reviews, add further tests and cleanup.
* Add test for DefaultBatchingQueue.close
* Use generous timeouts
* Renamed BatchMessage => SubmissionBatchMessage. Added default boolean parameter value. Added simple test case.
* Removed unused include.
* Address final code review
Co-authored-by: Miklos Erdelyi <miklos.erdelyi@digitalasset.com>
* Make SDK release tarball reproducible
Without these changes multiple factors contribute to a different SDK
release tarball on each rebuild:
* Without `--sort=name` the order of files in the archive is determined
by the OS and essentially random.
* Without the `--owner/group/mtime` flags the archive contains metadata
that depends on the environment.
* Without `-n` `gzip` would write a timestamp into the produced
artifact.
CHANGELOG_BEGIN
CHANGELOG_END
* sdk-release-tarball: zip is unused
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Instead of writing the TypeScript for DAML module `A.B.C` into the file
`src/A/B/C.ts` we now write it into `src/A/B/C/module.ts`. This is in
preparation for also writing a file `src/A/B/C/index.ts`, which
re-exports `src/A/B/C/module` but also `src/A/B/C/D` for each `D`.
We also make sure to use the correct path separator on Windows.
CHANGELOG_BEGIN
CHANGELOG_END
* release: Reformat Markdown to fit 80 characters, and adding punctuation.
CHANGELOG_BEGIN
CHANGELOG_END
* release: Formatting, an extra test step, and a bit of clarification.
Add keys with maintainers to Fetch nodes
The new field is populated by the interpreter whenever the fetched
contract has a key. Used for contract key reinterpretation in Canton.
CHANGELOG_BEGIN
- [DAML-LF] Add keys with maintainers to Fetch nodes in transactions.
CHANGELOG_END