* install script: check available disk space
This fixes#6993. We check that /tmp offers enough space to extract the
sdk tarball and fail otherwise. An alternative extraction directory can
be set by setting the TEMPDIR environment variable.
CHANGELOG_BEGIN
CHANGELOG_END
* don't remove user specified directory
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-assistant/get-daml.sh
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* kvutils: Remove fingerprints from the pre-executing validator.
The submission validator doesn't care about fingerprints, it only needs
to know about them in order to discard them from the state value. This
introduces a new typeclass, `HasDamlStateValue`, which can be customized
for various state value types to make submission validation generic.
A little more code for now, but we're setting things up so it can be
deleted later.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Add more comments for `PreExecutingSubmissionValidator`.
* Make choice observers mandatory when available.
This is an invariant of the DAML-LF proto.
The haskell AST allows missing choice observers for any version, because the AST represents what was written in the syntax. However, if we are targeting a new DAML-LF version (>= `featureChoiceObservers`) then `Nothing` is converted to `Just (ENil TParty)` by the haskell encoder (`EncodeV1.hs`) to satisfy the proto invariant.
On the scala side, the decoder (`DecodeV1.scala`) now insists that choice observers are present when_ the version is new. (>= `LV.Features.choiceObservers`).
changelog_begin
changelog_end
* LF: LF encoder generate always choice observer if lf >= 1.dev (#8318)
This is a follow up of #8316.
This advances the state of #7709
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Remy <remy.haemmerle@daml.com>
See [discourse].
[discourse]: https://discuss.daml.com/t/best-practice-for-getting-ledger-state-in-multiple-nested-react-components/1814/3
CHANGELOG_BEGIN
* [JavaScript Client Libraries] When using our React wrapper from
TypeScript, users could end up having to manually reconstruct a
`QueryResult` type for a specific template, leading to code looking
like (assuming a `User` template):
```
const allUser: QueryResult<User.User, User.User.Key, typeof User.User.templateId> = useStreamQueries(User.User);
```
Our codegen will now generate an additional type definition per
template such that the above can be rewritten as
```
const allUser: User.User.QueryResult = useStreamQueries(User.User);
```
Developers using our JavaScript bindings directly (i.e. without taking
advantage of the TS type definitions) are not affected. Existing
(long-form) type declaractions will also keep working.
Note: In order to make this change, we had to move the definition of
the `QueryResult` type from the `@daml/react` package to the
`@daml/ledger` package. However, the `@daml/react` package is still
exporting it as before, so this is a backwards-compatible change.
CHANGELOG_END
@sofiafaro-da is taking care of 1.8.0-snapshot.20201215.5907.0.a6ed34c5 (#8306), so they get pushed back to the end of the line.
Please do not merge this before #8306.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
The previous escaping syntax doesn’t seem to work (after the first
layer you no longer have a variable) and has broken our build
reporting completely.
changelog_begin
changelog_end
* Extract actor system and execution context from request context
* Extract actor system and execution context from request context
* Extract actor system, materializer, and execution context from request context
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
When including commit titles in Slack messages, care has to be taken to
escape what Slack considers [control characters], namely `&`, `>` & `<`.
[control characters]: https://api.slack.com/reference/surfaces/formatting#escaping
CHANGELOG_BEGIN
CHANGELOG_END
We're rotating the nix key used by CI to sign our artifacts. This is step
1: add the new public key.
Step 2 will be to update the CI configuration to use the new key, and
step 3 will be the removal of the old key from this conf file.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Move read set generation to the commit strategy.
* kvutils: Make the submission validator abstract over the read set.
* kvutils: Split post-execution conflict detection from finalization.
* kvutils: Ignore the read set in the post-execution finalizer.
* kvutils: Extract a trait for conflict detection.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Extract out a trait for post-execution finalization.
* kvutils: Generalize the write set in PreExecutingValidatingCommitter.
* kvutils: In submission validation, create the input state once.
* kvutils: Generalize PreExecutingCommitStrategy over keys and values.
* kvutils: Extract KeyNotPresentInInputException to the top level.
* kvutils: Inline type aliases where they're only used once or twice.
* kvutils: Improve naming and commentary around post-execution.
* damlc: Don't warn on ExplicitNamespaces extension
Since we allow the `TypeOperators` extension, which implies
`ExplicitNamespaces`, there is no point in warning in warning about
the latter.
There's not much to test for this wrt to `data-dependencies` since we
don't reconstruct export lists.
CHANGELOG_BEGIN
damlc: Don't warn on ExplicitNamespaces extensions anymore.
CHANGELOG_END
* Fix a test expecting a warning about ExplicitNamespaces
CHANGELOG_BEGIN
CHANGELOG_END
This is not intended for general consumption.
This reverts the following PRs, in reverse order:
- #8082
- #8146
- #8153
- #8180
- #8194
CHANGELOG_BEGIN
- [Integration Kit] Reverted a fix to the kvutils input state that
caused performance degradation on some ledgers. This is a temporary
measure that we do not expect to be used outside of very specific
circumstances, as it can trade correctness for performance if the
semantics are not completely understood.
CHANGELOG_END
* Do not checkout release commit in scala 2.13
At least for now, this fails because older commits don’t have the
necessary infrastructure so far. At some point we probably do want to
run this on release commits but that can wait a bit and this unblocks
release PRs for bugfix releases.
changelog_begin
changelog_end
* Update azure-pipelines.yml
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
* kvutils: Remove QueryableReadSet, and simplify caching a little.
* kvutils: Generalize the caching ledger state reader.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Make StateReader even more general (no Option).
* kvutils: Convert LedgerStateReaderWithFingerprints to a type alias.
And DamlLedgerStateReaderWithFingerprints too.
* kvutils: Replace LedgerStateReaderWithFingerprintsFromValues.
With LedgerStateOperationsReader and a `.map`.
* kvutils: Replace RawToDamlLedgerStateReaderWithFingerprintsAdapter.
With a `.comapKeys`.
* kvutils: Delete duplicate caching code.
* caching: Move `Cache#get` into its own subtrait.
This method is used by the submission validator, but not by the
caching state readers.
* caching: Move cache mapping from CachingStateReader into Cache.
* caching: Remove an over-eager comment.
* kvutils: Rename `StateReader#comapKeys` to `contramapKeys`.
I got contravariant functors confused with cofunctors.
* caching: Add Scaladoc and improve parameter names in MappedCache.
* kvutils: Adapters everywhere!
* caching: Rename the base test class.
* Build //libs-scala/... on 2.13
One test is unfortunately disabled at the moment since I utterly
failed to figure out why I get a ClassNotFoundException on 2.13.
changelog_begin
changelog_end
* Copyright headers
changelog_begin
changelog_end
* I can’t bazel today
changelog_begin
changelog_end
* Apply suggestions from code review
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
* Update libs-scala/resources/src/main/2.13/com/daml/resources/UnitCanBuildFrom.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* No split on view
changelog_begin
changelog_end
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Bundle hpp with damlc.
This PR eliminates the red squiggly lines you get when opening up the
standard library in daml studio (e.g. after a Go To Definitien).
(When CPP is used, Go To Definition is still pointing to the wrong place,
because the line numbers are messed up. But it's better than having a
million error messages.)
We could also remove --cpp flag in a separate PR, though that may be
considered a breaking change.
changelog_begin
changelog_end
* cleanup locateRunfiles jank
* Revert "cleanup locateRunfiles jank"
This reverts commit 82552003ae.
* damlc: warn on bad package names/versions.
This fixes#7208 and #7317. When package names or versions are
encountered in the daml.yaml that will be rejected by ghc-pkg when the
package is loaded as dependency, a big warning is output.
CHANGELOG_BEGIN
CHANGELOG_END
* hlint
* multiline strings
* update version regex
* update package name regex
* better error formatting regex printing
These are basically identical to create-daml-app-tests-proj-name
except for the fact that they use the default project name and they
are super slow so we don’t want to run them twice.
changelog_begin
changelog_end
* Add a Scala 2.13 build pipeline
This adds initial support for multiple Scala versions controlled via
the DAML_SCALA_VERSION env var and a CI job to make sure we don’t
regress. For now we only test //libs-scala/ports/... which seemed like
the easiest starting point I could find. We can incrementally expand
that over time.
changelog_begin
changelog_end
* Document pinning
changelog_begin
changelog_end
* Address review comments
changelog_begin
changelog_end
* Upgrade Scala dependencies for 2.13 compatibility
This upgrades a bunch of Scala libraries to versions that have 2.13
support. There are two libraries that are still missing:
- diffson, this has a new version but with significant breaking
changes and it is only used in Naigator console which I hope to kill
before I have to worry about this.
- ai.x:diff, this is used in the ledger API test tool. The library is
abondened but there are a few alternatives.
changelog_begin
changelog_end
* Fix pureconfig
changelog_begin
changelog_end
* Fix Navigator
changelog_begin
changelog_end
We use the constants defined in LanguageVersion/TransactionVersions instead
repeating the somewhat magic constants "6", "7", "8", "10" and "dev" in multiple places?
CHANGELOG_BEGIN
CHANGELOG_END
This prevents the `dade-copyright-headers` script from changing those
files (and from checking them for copyright headers, unfortunately).
CHANGELOG_BEGIN
CHANGELOG_END
At the moment, updating copyright headers requires the following dance:
1. Update the COPY file.
2. Run `./fmt.sh`
3. Update the `dev-env/bin/dade-copyright-headers` file to update the
expected copyright marker.
Forgetting to do 3 results in `./fmt.sh` (really the underlying
`dev-env/bin/dade-copyright-headers update`) to not be idempotent, and
to add an extra 3 lines of copyright headers on each run (with
`dade-copyright-headers check`, and therefore `./fmt.sh --test`, never
succeeding). This small tweak removes step 3.
CHANGELOG_BEGIN
CHANGELOG_END
We drop the distinction (at the type level) of Dev and Stable language
version. The two main reason that motivate this choice:
* we never really used this distinction.
* we want to add the concept of "preview" version (which is neither Dev nor Stable)
CHANGELOG_BEGIN
CHANGELOG_END
* Run bazel scan for all but haskell first, then haskell at end so they do not stomp on each other
CHANGELOG_BEGIN
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>
* use common prefix between runs so results are aggregated, get branch name from running job rather than assuming master
* DO NOT MERGE: disable all jobs except for blackduck scan
* haskell before full scan
* parens instead of braces
* differentiate haskell and jvm bazel runs with unique code location
* unique code location prefix
* fix syntax
* unique code location to avoid clashing bazel runs
* Use master security-blackduck script helper
* reenable all jobs to make mergeable
* cleanup whitespace
* Use Build.SourceBranchName for branch
* Update ci/cron/daily-compat.yml
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
* DO NOT MERGE: skip all jobs but blackduck, skip update notices file step
* reenable all jobs to make mergeable
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Changes:
- replaced submitter: Party with actAs: Set[Party] and readAs: Set[Party] in com.daml.ledger.api.domain.Commands
- adapted contract and key lookups for multi-party submissions
* Changed single Commands to accept multiple submitters
* Removed submitter field from Commands
* Replaced submitters with actAs and readAs in Commands
* Moved actAs and readAs to com.daml.ledger.api.Commands
* Contract lookup tests
* Key lookup tests
CHANGELOG_BEGIN
CHANGELOG_END
* Formatted code changes
* Remove unused method
* Formatting fixes
* Simplified logical condition for active contracts visibility
* Removed unused temporary method in Commands
* Unified contract key lookup query for different type of db types
* Simplified ContractReader class structure
* Improved dao unit tests
* Unit tests for lookups as a divulgee
* Reduced code duplication in unit tests
* Minor improvement
* Formatted code
* Fixed a ContractsReader's query
* Improved unit tests
* Explanation for engine's command authorizers and contract readers
* Minor fixes
* Adapted SpannedIndexService for the multi-party submission
* Factor out authorization middleware client
changelog_begin
changelog_end
* Factor out token refresh
* Factor out auth request
* Factor out auth middleware URIs
* factor out auth directive
* Factor out login directive
* Add login response type to api library
* Allow error handling in login callback
* Factor error handling out of authorize directive
* Move tagged token types into middleware api
* Factor out the auth middleware client
* Dedicated exception types in middleware client
* Handle auth middleware client exception
Restores the behavior of authorize before factoring out the client
* expose middleware URIs
* Use the middleware client in the middleware tests
* Use localhost/CALLBACK in testing
https://github.com/digital-asset/daml/pull/8244#discussion_r540328001
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>