* Fix qualified name handling in DAML REPL
This fixes the issue reported in
https://discuss.daml.com/t/how-to-use-qualified-template-names-in-repl-queries/1329/7
We need to print names qualified otherwise, the type signature for
following lines will be ambiguous even if users qualified the name in
their input. Figuring out the right name to use in qualification is
tricky but Luckily GHC provides this already so we just have to make
sure to plug it into the right places.
changelog_begin
- [DAML REPL] Fix a bug where you got an error about a name being
ambiguous even if you used a qualified name.
changelog_end
* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs
Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* Factor out typechecking of imports
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* Write proper SDK version in DAR manifest for snapshots
Currently, we don't write the actual SDK version in the DAR manifest but
rather the version that has been sanitized for `ghc-pkg`. For proper
releases, these are identical but for snapshots the latter does not
contain the `-snapshot` part and the commit hash because `ghc-pkg` can
only handle numeric components.
This PR changes this behaviour such that we write the actual
unsanitized SDK version in the DAR manifest.
The implementation might look a bit unintuitive. However, we use the
`PackageSdkVersion` type for exactly two things:
1. Writing it into the manifest.
2. Using it to initialize the package database.
As mentioned above, the former should not be sanitized whereas the
latter should. So far, we've done the sanitization right after reading
the SDK version from `daml.yaml` or `DAML_SDK_VERSION`. Now, we do the
sanitization only in the code concerned with initializing the package
database.
CHANGELOG_BEGIN
[DAML Compiler]
- Bugfix: write the proper SDK version in the DAR manifest for
snapshot releases instead of a sanitized version
CHANGELOG_END
* Drop SdkVersion.toGhcPkgVersion entirely
CHANGELOG_BEGIN
CHANGELOG_END
This is a first, very incomplete step in the spirit of small,
incremental PRs. Known missing features:
- Should check all versions, not just the 30 most recent ones.
- Should also download from GCP backup and compare.
- Should alert on Slack if anything is unexpected.
- Should handle versions prior to us starting to sign (and do what?).
- Should also check artifacts in Artifactory, not just GitHub Releases.
- Optionally should save to GCP if we don't have a backup already.
So at the moment it's just downloading the artifacts for the 30 most
recent releases and printing a message stating whether we have a
signature and whether it's valid.
CHANGELOG_BEGIN
CHANGELOG_END
* Revert "Revert "Speedy Compiler: factorize and clean code (#7493)""
This reverts commit d99f35b3cd.
* Speedy: Reintroduce usage of muti-binding let.
This PR fixes recursion issue with `closureConvert` and `freeVars`.
The explosion of muti-binding in single binding makes the function
`closureConvert` crash with stackoverflow in some cases.
We reintroduce the usage of multi-binding let in the first pass of the
compiler. The ANF transformation pass will replace them with nested
single binding let. ANF pass do not have issue with deep expression,
as it handle them with trampoline.
CHANGELOG_BEGIN
CHANGELOG_END
We currently pass the token to all builtins named `SBU*` aka the
update builtins. Since we pass the token immediately on all call sites
of these builtins, there's no point in passing the token at all.
This PR removes the token passing for the `SBU*` builtins.
Unfortunately, this does not improve execution performance. However,
since it simplifies the code, I still consider it worthwhile.
CHANGELOG_BEGIN
CHANGELOG_END
* Fix data-deps dictionary function name mismatches.
Fixes#7362. Incredibly, it's possible to fix this issue in
data-dependencies by sorting instance names in a funny way.
This is definitely a hack, but it should fix this issue,
which affects overlapping instances as well.
This PR adds a regression test.
changelog_begin
changelog_end
* Fix comments
* apply suggestion
@sofiafaro-da is taking care of 1.6.0-snapshot.20200929.5303.0.f1e58206 (#7522), so they get pushed back to the end of the line.
Please do not merge this before #7522.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
We factorize scala code in the compiler:
Here are some example of changes:
* factorize the common part of `compileChoice` and `compileChoiceByKey`
* factorize the common part of `compileFetch` and `compileFetchByKey`
* application patterns like
```
SEApp(expr1, Array(expr2))
```
are replaced by:
```
app(expr1, expr2)`
```
* let binding patterns like
```
val x1 = expr1
val x1Pos = nextPosition()
SLet(x1, ...)
```
are replaced by pattern
```
let(expr){ x1Pos => ... }
```
* function binding pattern like
```
Abs(1){
val x1Pos = nextPosition()
x1
}
```
are replaced by
```
function{ x1Pos => ... }
```
CHANGELOG_BEGIN
CHANGELOG_END
Right now our artifacts are only stored on GitHub. Should they have any
issue, we're toast, as we can't always rebuild old artifacts. With this
change, we also store our artifacts on a GCS bucket, so we'd need both
GitHub and Google to have simultaneous issues to lose data.
CHANGELOG_BEGIN
CHANGELOG_END
I originally implemented this for another change where I didn’t need it
in the end. However, it seems like a nice cleanup so spinning it out
into a standalone PR.
changelog_begin
changelog_end
* release 1.6.0-snapshot.20200929.5303.0.f1e58206
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.
@sofiafaro-da is in charge of this release.
CHANGELOG_BEGIN
CHANGELOG_END
* Bump release commit
changelog_begin
changelog_end
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This does not get used very often so it is likely nobody will remember
how it works when we do use it. It's And due to the ordering Azure makes
of jobs in its UI, it's very easy to miss that there is a final,
Linux-based step and the values are actually printed there.
So this adds a little note to remind us of that.
Note that as this changes the `ci/patch_bazel_windows` folder, this will
also generate a new Bazel, so this PR will also update the Scoop
reference.
CHANGELOG_BEGIN
CHANGELOG_END
To make `--import` work we also need to expose the
packages. Otherwise, we end up with a ton of confusing errors as soon
as you try anything. Luckily, we can do this fairly cheaply by using
the fact that GHC can expose both unit ids as well as just package
names. Until I realized that I started working on a different approach
of reading the DALFs first to resolve unversioned packages but that
seemed much more messy.
changelog_begin
changelog_end
* Remove reference to release-notes.rst
https://github.com/digital-asset/daml/pull/7458 shuffled this
around. While we could update it, it doesn’t really make any sense. We
post our release notes to the blog now and not in the docs so this
whole checkout procedure is redundant. This is also true if we wanted
to make a bugfix release for a release < 1.5 where this file still
existed. The trigger_sha is always on master (following our current
release process) so the file would still not exist.
I did also remove it from the docs cronjob. We never reupload old docs
so this doesn’t make a difference.
changelog_begin
changelog_end
* Stupid whitespace change because windows is pissing me off
changelog_begin
changelog_end
* kvutils: Document the deterministic nature of commit strategies.
* kvutils: Run the commit strategies in as parallel a fashion as possible.
Trees are faster than lists.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Move `serializeStateKey` into its own class.
With this PR, the profiler nicely handles the new SDefinitionRef's added in #7472.
We add labels for:
'create'
'exerciseByKey'
'fetch'
'fetchByKey'
'lookupByKey'
CHANGELOG_BEGIN
CHANGELOG_END
* add parameter information to "fall back to limit-based query with consistent results" test
* run only one test in CI, and run it a lot more
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* considering a grouped reporter
* never mind that
* clean up the error report
* link to #7521
* remove harder testing
* Some minor improvements to the DAML Intro docs
CHANGELOG_BEGIN
CHANGELOG_END
* Intro to DAML Chapter 8
CHANGELOG_BEGIN
CHANGELOG_END
* Incorporate feedback
* Update docs/source/daml/intro/8_Upgrading.rst
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Remove wrong statements about interface files
* Complete rework to focus on dependencies, not upgrades
* Intro to DAML Chapter 9
CHANGELOG_BEGIN
CHANGELOG_END
* Apply suggestions from code review
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Make the JS code actual JS
* Update Chapter 9 to incorporate Chapter 8 changes
* Copyright headers and feedback
* Update toctree
* Get rid of warnings
* Explain `when` short circuiting.
* Fix template
* Fix some literal-includes
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* concurrent: Tag DirectExecutionContext.
1. Tag `DirectExecutionContext` as `ExecutionContext[Nothing]`, thereby
stating that it works for any tagged `Future`.
2. Move `DirectExecutionContext` to the _libs-scala/concurrent_
library, as it requires it and it's tiny.
CHANGELOG_BEGIN
CHANGELOG_END
* concurrent: Fix the privacy of `DirectExecutionContextInternal`.
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* kvutils: Always commit serially.
Committing in parallel will cause the set of writes to be emitted in a
random order.
CHANGELOG_BEGIN
- [Integration Kit] In kvutils, the ``BatchedSubmissionValidator`` no
longer has a parameter for commit parallelism. Commits are now always
written serially to preserve order.
CHANGELOG_END
* kvutils: Sort the output state before writing.
We previously wrote the output state in a random order, leading to
writes that could not be easily compared for integrity. Sorting them
allows us to validate not just the values, but the order.
This means that the exporter no longer sorts the write set, and the
integrity checker does not sort before checking.
CHANGELOG_BEGIN
- [Integration Kit] In kvutils, state is now sorted before committing.
This allows us to provide stronger guarantees with regards to the
serialized write sets.
If you have implemented your own ``CommitStrategy``, you should also
ensure the output state is sorted before committing.
CHANGELOG_END
* ledger-on-sql: Implement SQL typeclasses as values, not functions.
Let's pretend performance is important here.
* kvutils: Allow Iterables in batching ledger state operations.
A `Map[Key, Value]` is an `Iterable[(Key, Value)]`, but not a `Seq`.
This allows us to pass a `Map` straight from the committer.
* kvutils: Construct a `SortedMap` in the commit strategy.
This should be more performant than generating and then sorting a
`Vector`.
* kvutils: Sort state updates when committing after pre-execution.
* Some minor improvements to the DAML Intro docs
CHANGELOG_BEGIN
CHANGELOG_END
* Intro to DAML Chapter 8
CHANGELOG_BEGIN
CHANGELOG_END
* Incorporate feedback
* Update docs/source/daml/intro/8_Upgrading.rst
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Remove wrong statements about interface files
* Complete rework to focus on dependencies, not upgrades
* Copyright headers and feedback
* Update toctree
* Get rid of warnings
* Fix template
* Fix tests
changelog_begin
changelog_end
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Improve the user error message if the upload-dar command fails.
In particular we want to catch the case of a gRPC timeout exception which we know can occur if the DAR is too large. But it seems helpful to catch any exception, and shows what we caught along with the helpful message.
* use safe-exceptions
Recently we have been seeing lots of issues with the Bazel cache. It
does not seem like it would need to delete things, but the issues
cropped up about the same time we restricted the permissions, so it's
worth trying to revert that.
CHANGELOG_BEGIN
CHANGELOG_END
This includes:
* Create
* ExceciseByKey
* Fetch
* FetchByKey
* LookupByKey
This change allows us to reference the code used in a template definition from another package instead of having to inline it at the use-site
CHANGELOG_BEGIN
CHANGELOG_END
In order to introduce versioning of the ledger api we
first add a central container of the version for tracking
purposes.
CHANGELOG_BEGIN
CHANGELOG_END