* Update .vscode/settings.json
The "files.useExperimentalFileWatcher" setting was deprecated at some point. I tried to add "files.watcherExcluded" to see if this will help with the extreme CPU usage issues on macOS. Also removed the "buck" exclusions since we don't use buck anymore as far as I know. And I added node_modules exclusions because that seems like a sensible thing to exclude.
changelog_begin
changelog_end
* make it valid JSON
Don't run the preprocessor on DA.Maybe since it doesn't need it, and the
preprocessor was generating a bunch of warnings due to use of the
PatternSynonyms extension. We can safely ignore these warnings.
Also refactors that part of the preprocessor a little bit.
changelog_begin
changelog_end
This commit fixes a few copyright headers that have been missed in the
automatic update on Jan 1, as well as the generation code in the compat
workspace so it generates the right headers.
CHANGELOG_BEGIN
CHANGELOG_END
@robin-da is taking care of 1.9.0-snapshot.20210105.5984.0.c68ba110 (#8403), so they get pushed back to the end of the line.
Please do not merge this before #8403.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* Port //daml-lf/interpreter to Scala 2.13
For now the perf tests are left out since they depend on a DAR built
by damlc which depends on daml script which depends on the world
:exploding-head:
changelog_begin
changelog_end
* Scala 2.13-style to for ImmArray and FrontStack
changelog_begin
changelog_end
* Avoid extra conversion
changelog_begin
changelog_end
* Bounded auth middleware client callback store
changelog_begin
changelog_end
* Json format for login response
* Add middleware client binding to test fixture
* Test middleware client callback store size
* Make max auth callbacks and timeout configurable on trigger service
changelog_begin
changelog_end
* Bounded pending login requests at auth middleware
* Make max logins and timeout configurable on middleware
* Test middleware login store size
* fmt
* Fix Windows
failed with `"localhost" != "127.0.0.1"`. Hardcode "localhost" to avoid
platform specific resolution.
* Use FiniteDuration for login timeout
* Respond with 503 on full login request store
Addresses https://github.com/digital-asset/daml/pull/8351#pullrequestreview-560859604
* Add tests for RequestStore
* Lower DefaultMaxLoginRequests
b48050eb91 (r552649275)
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Support DAML_PROJECT in daml codegen java
fixes#8406
We need to resolve the DAR path relative to the project
root. Otherwise, we’ll just fail to find the file if daml codegen java
is invoked from a different directory.
changelog_begin
changelog_end
* Fix test
changelog_begin
changelog_end
* fmt lalala
changelog_begin
changelog_end
* fix another test
changelog_begin
changelog_end
Apparently it's been silently broken since introduction all the way back
in #7196.
Huge thanks to @SamirTalwar-DA for reporting.
CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
* Release preview of LF 1.11. Preview versions can be changed only to
include bug fixes. Changes of LF 1.11 include:
- add support for generic map;
- add support for choice observers;
- reduce archive size thanks to type interning.
CHANGELOG_END
* release 1.9.0-snapshot.20210105.5984.0.c68ba110
This PR has been created by a script, which is not very smart and does not have all the context. Please do double-check that the version prefix is correct before merging.
@robin-da is in charge of this release.
CHANGELOG_BEGIN
CHANGELOG_END
* Bump commit to include #8402
changelog_begin
changelog_end
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Our CI nodes install nix in multi-user mode. This means that changing
cache information is only available to certain trusted users for
security reasons. The CI user is not part of those so the cache info
from dev-env/etc/nix.conf is silently ignored.
We could consider not running in multi-user mode although from a
security pov this seems like a pretty sensible decision and our
signing keys change very rarely so for now, I would keep it.
changelog_begin
changelog_end
Fixes#8338
This is a bit of a weird one. The basic issue is fairly clear. We have
code which looks something like:
```
interface MyTemplate<K> {
keyEncode: (k: K) => unknown;
keyDecoder: () => K;
}
interface MyChoice<K = unknown> {
template: () => MyTemplate<K>;
}
function exercise(c: MyChoice) {
console.log(c);
}
const y = (x : MyChoice<undefined>) => {
exercise(x);
}
```
The key type is invariant here since it occurs in both covariant and
contravariant positions. We compile in strict mode so this is a
typescript error. This fails in all typescript versions I tested
including 3.8 which we use in our tests. So why don’t the tests fail?
Afaict, this is because the template constant is defined as an
intersection of the template type and the choices available on the
template. In TypeScript 3.8, this seems to (mostly, we’ll get to a
bit) hide this error. In TypeScript 3.9 and later, you hit it. There
is something in the release notes about intersection types but only
about optional properties which don’t seem to be required
here. Nevertheless, it is definitely related to the typescript
version.
So there are two more weird things about TypeScript 3.8:
1. Sometimes you get the error in the IDE but not in `npm start` and
`npm run build`. Afaict, this is caused by the VSCode plugin being
based on a different TypeScript version, e.g., mine was at 4.1.2 so
this seems to match up with the 3.9 hypothesis.
2. In some cases (not all afaict), the issue shows up in `npm start`
but only intermittendly. As described in #8338, it goes away after
a restart. I have no idea what is going on here. something
something incremental builds are hard 🤷 I’ve spent way too
much time trying to figure it out but since the underlying issue
seems clear, I gave up at some point.
changelog_begin
- [JS Client Libraries] Fix a bug where in some cases calls to
`exercise` and `createAndExercise` failed to typecheck with a mismatch
in the key type.
changelog_end
* participant-integration-api: Dedicated execution context for requests.
CHANGELOG_BEGIN
CHANGELOG_END
* participant-integration-api: Construct the services executor outside.
* participant-integration-api: Share the services EC with the GRPC stack.
* participant-integration-api: Use the new EC wherever possible.
And stop using DirectExecutionContext.
* sandbox-classic: Fix DevModeIT to use the right configuration.
I have no idea why this breaks now, but it was always technically
broken, so I'm fixing it.
* participant-integration-api: Push the services EC up one more level.
* Update newly added ApiParticipantPruning service accordingly
see https://github.com/digital-asset/daml/pull/7988#discussion_r525319097
* participant-integration-api: Ensure the LedgerConfigProvider is ready.
Somehow this slipped through.
* sandbox-classic: Fix `DefaultConfig` in tests.
* language-support/java: Disable seeding in tests again.
Co-authored-by: Oliver Seeliger <oliver.seeliger@digitalasset.com>
* KV pre-exec: don't prefetch indirect state inputs from keys
CHANGELOG_BEGIN
CHANGELOG_END
* Ensure that the submission validator reads only once
* Fix test and improve readability
* Fix test and improve readability
* Clarify tested condition
* Tidy up code
* Address review comments
* Remove test about double load not happening with DAML contract key inputs
* Remove stale test that once was about de-referencing DAML contract keys when loading inputs
* StateReader.read ScalaDoc: document that it must be called only once per validation.
* assistant: get the latest sdk version form docs.daml.com
We get the latest sdk version from docs.daml.com/latest instead of
github.com. Getting the latest release from github proved to be tricky
because github defines 'latest' by the tag timestamp.
CHANGELOG_BEGIN
CHANGELOG_END
* hlint
* Cut down data-dependencies test.
This PR reduces the data-dependencies test from quadratic to linear in the number of LF versions. It does so by only testing sequential version pairs, e.g. 1.6 to 1.7, 1.7 to 1.8, 1.8 to 1.11, 1.11 to 1.dev, and 1.dev to 1.dev. These pairs covers almost all potential problem.
changelog_begin
changelog_end
* add sort to scope
* Remove Navigator console
This was a labs feature so we can remove it without a deprecation
cycle. It doesn’t have any known users and is almost completely
superseded by DAML REPL.
@bame-da agreed to the removal.
This also has the nice side effect of eliminating 1 of our 2
dependencies that were not Scala 2.13 compatible.
changelog_begin
- [Navigator Console] The labs feature Navigator Console has been
removed. Users are encouraged to use DAML REPL instead.
changelog_end
* Kill Navigator database docs completely
changelog_begin
changelog_end
* Port //daml-lf/(parser|validation) to Scala 2.13
changelog_begin
changelog_end
* Rename (Expr|Type)Traversable to (Expr|Type)Iterable
changelog_begin
changelog_end
For a couple weeks now there has been a warning on the Azure Pipelines
web UI that says `ubuntu-latest` is in the process of switching from
18.04 to 20.04. I am not aware of any specific issue this would cause
for our particular workflows, but I don't like my dependencies changing
from under me.
CHANGELOG_BEGIN
CHANGELOG_END
This is another take on #8276, with the same underlying motivation.
However, this approach is mostly duplication-free, which seems better,
especially given the already-pretty-sorry state of our CI config.
Like #8276, this is done in 2 commits for ease of review. The first
commit is wholly unintresting and just copies `azure-pipelines.yml` to
both `ci/prs.yml` and `ci/build.yml`; the second commit removes from
each part what it shouldn't have. The intention is for `ci/build.yml` to
have all of the common parts.
CHANGELOG_BEGIN
CHANGELOG_END
Highly unlikely this actually makes a difference in practice but it’s
one less thing I need to look at next time someone makes me analyse
spotbugs results.
changelog_begin
changelog_end
* Fix queryContractKey for complex keys over gRPC
Unfortunately the Equal instance of Value only performs structural
equality which includes optional field names and constructor
names. While we could try to ensure that they are always present or
always absent, the more reliable solution seems to be to not rely on
this at all and instead use the equality on SValues which is
explicitly designed for this.
changelog_begin
- [DAML Script] Fix a bug where queryContractKey incorrectly returned
None despite their being an active contract with the given key. This
only affected DAML Script over gRPC.
changelog_end
* Update daml-script/runner/src/main/scala/com/digitalasset/daml/lf/engine/script/LedgerInteraction.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
Co-authored-by: Remy <remy.haemmerle@daml.com>
This commit changes the docs cron to create a new file
`docs.daml.com/latest`, a simple text file containing the version number
of the latest released version. This is done in response to #8354, to
avoid having to replicate the logic for which version is the latest
across this, the assistant and the get-daml.sh script.
This commit also cleans up a small transitional FIXME in the docs cron
regarding the transition from `snapshots.json` to `hidden.json`.
For the solution to #8354 to be complete, we'll also need to update
get-daml.sh and the assistant to use the new latest file. Note that this
file would only be published on the next stable release, so this commit
also includes a temporary hack to re-generate it (and `versions.json`
and `hidden.json`) unconditionally on every run; this can be removed as
soon as this has run once.
CHANGELOG_BEGIN
CHANGELOG_END
* LF: Scala type checker handle exceptions
This includes some fixes of the DAML-LF specifications.
This is part of #8020.
CHANGELOG_BEGIN
CHANGELOG_END