In #3706 we fixed the SDK versions of the daml-trigger an daml-script
libraries and (rightfully) stopped filtering out 0.0.0 from the SDK
version check in `damlc build`. However, this broke daml-sdk-head
since we still distributed the DARs in daml-sdk-head with the
Sdk-Version set to whatever the current release is rather than 0.0.0.
* Refactor packaging logic
This is a first step towards cleaning up the packaging logic and
adding some comments to make it clearer what is going on. There are no
functional changes in this PR.
There is more stuff here that we can and should cleanup but I will
leave that for separate PRs.
* Update compiler/damlc/lib/DA/Cli/Damlc/Packaging.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* Update compiler/damlc/lib/DA/Cli/Damlc/Packaging.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* Update compiler/damlc/lib/DA/Cli/Damlc/Packaging.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* Update compiler/damlc/lib/DA/Cli/Damlc/Packaging.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* Document topological sorting
* Undo requiredE change
* toSqlWhereClause WIP
* literal cases for SQL predicate generation
* fill in the remaining Literals' sql-equal data
* add other likely elements of the toSqlWhereClause fold
* SQL ListMatch case
* SQL VariantMatch case
* partial SQL RecordSubset case
* SQL Range case
* comments on JSON encoding for DB
* new relationship for the 3 paths in toSqlWhereClause Rec
- conversion to Fragment is further delayed to allow mixed-mode matching
of records
* handle new Rec semantics in ListMatch (can't drop @> on the floor anymore)
* compile RecordSubset to SQL
* compile MapMatch to SQL
* note optimization for record & map
* optimize = when @> unavailable for record subsets
* optimize range when degenerately =
* don't discard the @> safety of empty test sets
* unnested SQL optional matching
* converting DB JSON to response body JSON
* compiling nested optionals to SQL
* add missing length check to ListMatch
* remove unneeded parens from generated predicates
* remove 1 = 1 leader from generated predicates
* test the generated SQL from toSqlWhereClause
* searchDb WIP
* searchDb integrated
* coerce party to text in selectContracts; log that query
* fixing query
* fixing scala formatting
* removing unused functions
* removing unused type alias
* checking a that search returned exactly what we searched for,
also checking that all contracts got stored in the DB
* factor commonalities of MapMatch and RecordSubset
* cleanup
* cleanup
* changelog
CHANGELOG_BEGIN
- [JSON API - Experimental] Queries will always run against Postgres if Postgres is
configured. See `issue #3388 <https://github.com/digital-asset/daml/issues/3388>`_.
CHANGELOG_END
* fix record =-unsafe detection
Sadly, I haven’t managed to come up with an isolated test case for
this but I’ve tested this on a large internal codebase and it fixes an
issue with damlc build --incremental=yes.
* sandbox: If the Flyway migrations fail, crash the process.
Otherwise running it in the background can make it look like
everything's OK.
* reference-v2: If the Flyway migrations fail, crash the process.
Otherwise running it in the background can make it look like
everything's OK.
* sandbox: Remove an errant debugging `println`.
* sandbox: Use `DirectExecutionContext.implicitEC`.
This still contains the main class so you can use it like you would
use the fat jar but publishing fat jars to maven central is apparently
bad practise and some peple have asked for the library.
This includes some slight tweaks to the scala_docs rule to make it
capable of coping with the generated source file and a hack in the
release script to avoid it complaining about the scenario proto
library not being published to Maven even though it is included in the
transitive deps.
* Spin off TokenHolder into a new library
Avoids having weird dependencies between different packages, makes TokenHolder available on Maven
* Fix auth-utils path
* language: suffix all dalfs dependencies in a dar with the pkgid.
This makes sure that dalf dependencies are not accidentally overwritten
when two packages with equally named dalfs are imported.
* factor out parseUnitId
* daml assistant expected auth token in Bearer format
* Daml assistant does no validation of the auth token before passing in on to the ledger.
* clarify code with newtype Token
* convert party allocation to the new committer pattern
* scalafmt
* Use map with optional values for kvutils input state
We need to do this to detect when a submission has maliciously
omitted an input key.
This is a first step towards making sure that the package ids for
types defined in daml-prim and daml-stdlib don’t change. This PR
mostly adds all the necessary infrastructure for that and moves
GHC.Types and GHC.Prim to make sure it works.
Until data-dependencies are really solid and we have verified that we
no longer have performance issues with an increasing number of Haskell
packages, we still include the source files in daml-prim and then just
rewrite the references.
We will also need to add tests that these packages really have stable
ids but I’ll leave that for separate PRs since this doesn’t make that
much sense anyway until all of the types have moved to stable
packages.
CHANGELOG_BEGIN
- [DAML Compiler] The modules GHC.Prim and GHC.Types from daml-prim
have been moved to separate packages.
CHANGELOG_END
* Track used packages during whole of engine submit
- Introduce MutableCompiledPackages interface
- Add TrackingCompiledPackages that tracks fetched packages
- Make used packages in transaction optional to distinguish between
missing dependencies and empty set of dependencies.
* Reimplement package dependency tracking
- Compute direct dependencies of a package during decoding
- Compute transitive dependencies of a package when adding a package
to engine.
- Annotate the resulting transaction with package dependencies
in Engine.submit.
* Create Ast.Package with proper direct deps in scenario service
While we don't have use for direct dependencies of a package in
scenario service (only Engine.submit needs it), it's better to be
accurate.
This of course overapproximates the direct dependencies.
* Compile a each new package once in ConcurrentCompiledPackages
* Support authentication in DAML triggers
fixes#3259
CHANGELOG_BEGIN
- [DAML Triggers - Experimental] DAML triggers can now be run against
an authenticated ledger.
CHANGELOG_END
* Remove debug printf
* Windows is bad
Previously, we constructed the tarball used by daml-sdk-head by first
building the regular SDK release tarball only to the extract it, patch
the version file and recompress it. This adds about 30-60s to every
invocation of daml-sdk-head.
This PR changes this by factoring out the logic from building the
release tarball into a macro that we instantiate twice, once with the
proper version file and once with a dummy HEAD version file set to
0.0.0.
This does change the format of the sdk-head-tarball slightly, in
particular the files are now located under sdk-0.0.0 instead of
sdk-head. However, this doesn’t matter anyway afaik and I think the
new format makes more sense anyway considering that the regular
release tarballs have something like sdk-0.13.38.
This makes sure that navigator picks up things such as
`frontend-config.js` which is needed for custom tabs.
To get there, this PR does two things:
1. Change navigator such that it prefers a config file specified
explicitly via -c over the SDK config file.
2. Change daml-helper to pass in the config file via -c instead of
changing the directory
CHANGELOG_BEGIN
- [DAML Assistant] ``daml ledger navigator`` now loads
``frontend-config.js`` properly.
- [Navigator] Explicit config files passed via ``-c`` are preferred
over ``daml.yaml``.
CHANGELOG_END
This release contains a canton flakiness fix to prevent the
occurrence of `Disputed: Failed to select first domain: The
following parti(es) are not available on any connected domain`
during SemanticTest runs.
* Revert "ledger-api-test-tool: The endpoints are mandatory. (#3611)"
This reverts commit 603ee9367b.
* Restore LedgerTestContext requirement
* Exit early if there are no participants to test
* Error handling improvements,
partitioning the Soruce[Error \/ JsValue], folding all errors and
producing the final status and errors element based on the above fold
* Test case + fixes,
for some reason GeneratorDrivenPropertyChecks does not like AsyncFreeSpec
* changing the order of elements in the response,
would be better if we were checking the JSON objects not JSON strings.
* Fixing the GET contracts/search endpoint,
Returning all active contracts for all known templates, skipping the
query store persistence.
* minor cleanup
We only use the `templateId` function in a module only when the module
contains at least one template definition. Thus, we don't generate it if
there are no modules. That's the only functional change. The other changes
are due to the fact that we want better readability of the code.