* Update ghc-lib to speed up sdist generation
To incorporate https://github.com/digital-asset/ghc-lib/pull/379, which
is a more generic version of the changes introduced in
41ab1c2cba
to speed-up ghc-lib(-parser) sdist generation in Daml.
The slowest step in the ghc-lib(-parser) sdist generation is the
generation of `.hs` files from `.hsc` files via `hsc2hs` and from `.x`
or `.y` files via `alex` or `happy`. The reason that it's slow is that
`ghc-lib-gen` performs these through GHC's build system, hadrian, and
these steps require almost a full stage1 GHC build.
The `.hs` files are only needed to enable dependency discovery through
`ghc -M`, as it doesn't understand `.hsc|.x|.y` files. Apart from that
we can use the original `.hsc|.x|.y` files in the final sdist.
With this update `ghc-lib-gen` finds all relevant `.hsc|.x|.y` files
and replaces them with dummy `.hs` files that have the same module name
and the same imports. These dummy files are only used for the purposes
of dependency discovery via `ghc -M` and are not included in the final
sdist.
With this update the sdist generation is sped up between 4.3 to 4.5
times:
- ghc-lib-parser: 3m2s down to 42.04s (4.3x)
- ghc-lib: 3m5s down to 40.96s (4.5x)
I've applied `diffoscope` to the generated sdist tarballs with and
without this update to ensure that no unexpected differences are
introduced with this change.
https://github.com/digital-asset/ghc-lib/pull/379 reports a less
dramatic speed up of about a third reduction in build time for `stack
runhaskell CI.hs`. The reason for the discrepancy is that `CI.hs`
performs more steps than just the sdist generation, e.g. checking out
GHC's source tree, or building hadrian. These steps are not included in
the above benchmarks, because they are executed in separate Bazel
actions and can be cached separately.
CHANGELOG_BEGIN
CHANGELOG_END
* Update Cabal files
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Sandbox Classic dependency removal from daml-script integration test
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Allow the possibility to have a shared StringInterningView
changelog_begin
changelog_end
* Solve TODO in RecoveringIndexerIntegrationSpec
* Addressed Marton's review comments
* Added thread-safety mentionsin string interning interfaces
Running the `docker` command on today's Ubuntu images crashes the
kernel. (Which is super reassuring from a security pov.)
CHANGELOG_BEGIN
CHANGELOG_END
@nickchapman-da is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.
Please do not merge this before the release is fully tested.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
* Update redirects.map
Updated to redirect from outdated versions of the Daml ledgers page to the newest version.
[CHANGELOG_BEGIN]
[CHANGELOG_END]
* Update docs/redirects.map
[CHANGELOG_BEGIN]
[CHANGELOG_END]
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
* inherited choices are gone, convert to interface
* use toInterface for conformance tests on interfaces
CHANGELOG_BEGIN
- [Scala codegen] Interface choices can no longer be invoked directly on
template IDs, or via ``createAnd`` or ``key`` directly. Instead, use
``toInterface[Ifn]`` before calling the relevant ``exercise*`` method.
The resulting ledger commands now contain the correct interface ID
rather than template ID for looking up the choice, but see #13993 for
a caveat regarding create-and-exercise and exercise-by-key.
CHANGELOG_END
* Template.Implements marker, and toInterface for contract IDs
* unsafeToTemplate for interface contract IDs
* toInterface for create-and-exercise, exercise by key
CHANGELOG_BEGIN
- [Scala codegen] Template contract IDs and interface contract IDs have
new coercion methods, ``toInterface`` and ``unsafeToTemplate``,
respectively.
``toInterface`` can also be used with ``createAnd`` as well as ``key``
for create-and-exercise and exercise-by-key respectively; however, see
#13993 for a caveat regarding ledger API support.
CHANGELOG_END
* define Interface and InterfaceCompanion parent classes
* generate package ID aliases for interface-only modules
* generate choice methods for interfaces
* include all interfaces in what to write from Scala codegen
* handle interface references in variance resolution
CHANGELOG_BEGIN
- [Scala codegen] Interface contract ID types, and references to them in
serializable types, are now supported, as is exercise of interface
choices on interface contract IDs. To support this, ``DomainCommand``
now includes a ``ContractTypeCompanion``, which may describe either a
template or an interface, rather than a ``TemplateCompanion``.
CHANGELOG_END
CHANGELOG_BEGIN
- [Java codegen] The two-argument overload for ``fromIdAndRecord``,
deprecated since SDK 0.12.18, has been removed. Code that still uses
this should use either ``fromCreatedEvent``, or the remaining overload
of ``fromIdAndRecord`` if no ``CreatedEvent`` is available.
CHANGELOG_END
* Adds exponential ID page retrieval to aid low stream initialization
* Adds Working-Memory concept to calculate parameters to aid guaranteed memory footprint
* Switches to dynamic BatchN batching instead of static grouping to aid stream initialization
changelog_begin
changelog_end
* stop resolving in Java codegen, and use direct choices only
* wrong issue reference in Scala codegen
CHANGELOG_BEGIN
- [Java codegen] Direct invocation of interface exercise methods on
templates is no longer supported, and the ``exercise*`` methods, which
could generate invalid commands in some cases anyway, are removed.
Use ``toInterface`` to access interface exercise methods.
CHANGELOG_END
This adds parameters to the "split release" job. At the moment, when
run, the job just builds the current commit with a snapshot version.
With this change, we'll be able to build a split release for any commit
with any version tag.
The reason for this change is we want to trigger this job from the
assembly repo, to reduce the number of manual interventions needed in
the release process.
CHANGELOG_BEGIN
CHANGELOG_END
* reproduce
This produces no files for EmptyIfaceOnly and yields the error
src/__tests__/test.ts(571,39): error TS2339: Property 'EmptyIfaceOnly' does not
exist on type 'typeof import(".../node_modules/@daml.js/build-and-lint-1.0.0/lib/Lib/index")'.
* generate files with no serializable types, but interfaces
- fixes parent test
CHANGELOG_BEGIN
- [codegen js] Files are now generated for Daml modules with interfaces
even if no serializable types are present, and the module contents are
generally propagated as if they had serializable types in them.
CHANGELOG_END
* disclosures: fix buildDiscTable
This removes the pattern match on the template id for the argument
record in buildDiscTable. The arguments don't contain the template id
any longer.
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-lf/engine/src/main/scala/com/digitalasset/daml/lf/engine/Engine.scala
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>