Commit Graph

905 Commits

Author SHA1 Message Date
Remy
b475d710aa
LF: Create LF 1.15 in scala to park basic interface constructs (#14534)
basic interface constructs contain:
- interface definition
- interface implementation
- retroactive template implemenation
- exerciseInterface and fetchInterface
- basic builin

but do not contain:
- "requires"
- exercise guards

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-29 20:09:57 +02:00
Stephen Compall
3a33b3bcde
make getInterfaceId optional (#14485)
* remove hasInterfaceId, add Optional to type

* add some missing properties in ExercisedEvent to equals, hashCode, toString

* mark ExercisedEvent final, as with other events

CHANGELOG_BEGIN
- [Java bindings] ``ExercisedEvent#getInterfaceId`` has a different type
  since 2.3.x, indicating its optionality.
CHANGELOG_END
2022-07-25 12:50:33 -04:00
Simon Maxen
f26b9b2761
Add metering_report_json to GetMeteringReportResponse [DPP-1104] (#14496)
* Add metering_report_json to GetMeteringReportResponse

changelog_begin
changelog_end
2022-07-25 14:21:49 +01:00
Stephen Compall
d4bae0c518
Java bindings interface id blind booleans (#14423)
* add a test that breaks on missing identifier

* fix both hasInterfaceId boolean inversions

- confirmed that the test in parent breaks unless both changes are made

* add changelog

CHANGELOG_BEGIN
- [Java bindings] Fix a regression found in 2.3.0 RC with the
  introduction of interface IDs in ``ExercisedEvent``s.
CHANGELOG_END
2022-07-14 20:08:24 +00:00
tudor-da
9d5115da0b
[Explicit disclosure] Introduces Protobuf changes for supporting explicit disclosure payloads [DPP-1093] (#14336)
* Introduces Protobuf changes for supporting explicit disclosure payloads

changelog_begin
changelog_end

* Update ledger-api/grpc-definitions/com/daml/ledger/api/v1/event.proto

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* Enrich metadata description according to Marcin's suggestion

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2022-07-12 07:58:49 +00:00
Sergey Kisel
e151090cf3
Introduction of HOCON configuration for SoX [DPP-1033] (#14029)
* Introduction of HOCON configuration

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-05 15:35:16 +02:00
Stephen Compall
6e3069d220
add retroImplements to lf/iface DefInterface (#14192)
* add resolveRetroImplements to EnvironmentInterface
* test that resolveRetroImplements does nothing with no data
* resolve retroactive interfaces in Java codegen
* resolve retroactive interfaces in Scala codegen
* resolve retroactive interfaces in json-api

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-29 13:13:02 -04:00
Stephen Compall
ebe7a04191
export LedgerOptions from @daml/ledger (#14277)
Fixes #14073.

CHANGELOG_BEGIN
- [js] Type ``LedgerOptions``, the type of `new Ledger` arguments, can
  be imported by name from ``@daml/ledger``, and is included in the
  documentation.
CHANGELOG_END
2022-06-28 13:45:01 +00:00
Dharmaraj Parmar
162100a30b
Timeout for LedgerIdentityClient (#14098)
* Fixes #14097

CHANGELOG_BEGIN
- [Java Bindings] Enable timeout for `LedgerIdentityClientImpl.getLedgerIdentity().
CHANGELOG_END

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-06-28 08:58:59 -04:00
Sergey Kisel
6a80a1a82f
Removal of sandbox-classic module and binary (#14201)
* Removal of sandbox-classic module and binary

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-21 11:09:51 +02:00
Gary Verhaegen
3e8a49cdae
scala quickstart: remove examples (#14207)
These are not referenced from anywhere in the repo, and running them
manually is made very annoying by the removal of the Scala codegen and
the `quickstart-scala` template.

If they were deliberately kept to serve as examples of using the Scala
bindings (which I understand are still in use despite being deprecated),
I think we should find another way to keep that bit of documentation
alive, specifically a way that actually gets tested.

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-16 19:16:05 +02:00
Sergey Kisel
b1d8c14c55
Removal of Sandbox Classic in Haskell code [DPP-1073]. (#14127)
* Removal of Sandbox Classic in Haskell code.

CHANGELOG_BEGIN
CHANGELOG_END

* Further sandbox-classic removals

* Upload dar files when withSandbox is used.

* fix formatting

* Moved upload of dars in createSandbox.

* Fixed test by passing the token before the token file is created.

* Added implicit party allocation argument for haskell tests.

* DPP-1073 Infer sandbox token from the shared secret.

* Different slicing of runLedgerUploadDar

Co-authored-by: Andreas Triantafyllos <andreas.triantafyllos@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-06-16 14:14:39 +02:00
Gary Verhaegen
8d6cde3484
docs: fix ts docs pages (#14157)
- The "version replacement" step was broken: it replaced
  `0.0.0-SDKVERSION` with `{sdk_version}` instead of the current SDK
  version. This is fixed by adding a `format` call in the `ts_docs`
  Bazel rule.
- The section removal was broken as it assumed the version number was
  not replaced at all (so tried to detect `0.0.0-SDKVERSION` still).
  This is fixed by using a more robust "section removal" method.

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-15 13:19:18 +02:00
Stephen Compall
d4251ead05
choice name overloads in TypeScript codegen (#14092)
* move template/interface combination to daml/types library
* interface collision stops overloading at runtime
* include Omit in template extends interfaces clauses

CHANGELOG_BEGIN
- [codegen js] When a choice is inherited from two or more interfaces,
  the template object no longer inherits one of the choices at random.
  Such choices must always be invoked directly by referring to the
  interface object.
CHANGELOG_END

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2022-06-13 08:49:39 -04:00
Sergey Kisel
5a63ed85ea
build-and-lint-test removal dependency to sandbox-classic (#14120)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-09 16:57:13 +02:00
Stephen Compall
4075389f92
remove inherited choices from Scala codegen, test interface/template IDs (#14113)
* 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
2022-06-08 08:37:56 -04:00
Sergey Kisel
1d8f195438
Sandbox Classic Removal in Tests (#13934)
CHANGELOG_BEGING
CHANGELOG_END
2022-06-07 19:54:52 +00:00
Stephen Compall
15b82efb87
toInterface and unsafeToTemplate in Scala codegen (#13991)
* 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
2022-06-07 16:55:19 +00:00
Stephen Compall
4341130fe0
interface contract ID types in Scala codegen (#13975)
* 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
2022-06-07 14:30:11 +00:00
Stephen Compall
9a086ec225
remove two-argument fromIdAndRecord from Java codegen output (#14104)
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
2022-06-07 08:58:27 -04:00
Stephen Compall
eef97d04d2
remove inherited exercise methods from Java codegen (#14078)
* 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
2022-06-03 09:08:24 -04:00
Stephen Compall
eb3425b6c6
don't exclude interface-only modules in JS codegen (#14003)
* 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
2022-06-02 11:17:59 -04:00
Stephen Compall
4f7eefc8d5
two-phase create-and-exercise with unified exercise methods in Java (#14037)
* new getCompanion methods generated for contract IDs
* document new output for exercise methods
* link to #14039

CHANGELOG_BEGIN
- [Java codegen] ``createAndExercise*`` and ``exerciseByKey*`` methods
  are deprecated; instead, use the new ``createAnd().exercise*`` and
  ``byKey(key).exercise*`` methods.

  When the ledger API supports it, interface choices will be reachable
  via ``createAnd().toInterface(Ifc.INTERFACE).exercise*`` and
  ``byKey(key).toInterface(Ifc.INTERFACE).exercise*``, exactly the
  syntax supported by contract-ID exercise; see #14056.
CHANGELOG_END
2022-06-02 12:09:59 +00:00
Stephen Compall
1dbebba03a
toInterface, unsafeFromInterface overloads in Java codegen (#14004)
* InterfaceCompanion marker parent
* define INTERFACE singleton class and sole value with every interface
* don't allow instantiation of interface classes; they are never what you want
* use singleton for to<interface>, rename unsafeFrom<interface> to unsafeFromInterface
* rename to<interface> to toInterface
* document Java interface output changes

CHANGELOG_BEGIN
- [Java codegen] For interface types ``Ifc``, the template contract ID
  conversion method ``toIfc()`` has been removed and replaced with
  ``toInterface(Ifc.INTERFACE)``, and the interface contract ID
  conversion method ``unsafeFromIfc`` has been replaced with
  ``unsafeFromInterface``, always the same name.
CHANGELOG_END
2022-06-02 06:28:35 -04:00
Stephen Compall
96a6fe62e4
choice name overloading in lf/interface (#13938)
* introduce TemplateChoices to mediate template choice resolution
* if any resolutions fail in EnvironmentInterface, discard the template's resolution
* if any resolutions fail in Interface, discard the remaining unresolved

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-31 08:41:48 -04:00
Stephen Compall
49a5474232
javadocs for codegen support in javaapi bindings (#13959)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
2022-05-24 11:26:27 +00:00
Remy
ea0d101913
Interface: Rename fixedChoice to choice (#13883)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-17 12:03:53 +02:00
Remy
6f6a3052a1
Repurpose templateId in ExerciseCommand and add interfaceId in ExerciseEvent (#13660)
part of #13653

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-16 15:30:07 +00:00
Gary Verhaegen
7434fb0f86
fix build-and-lint (#13876)
To be clear, this is a hotfix. Whoever is responsible for this test
should provide a more comprehensive fix with a fairly high degree of
urgency.

Current main is broken because we have a transitive dependency on
`@types/prettier` with a version constraint of `"*"`, and the latest
version (`2.6.1`) is not compatible with our pinned-down version of the
TypeScript compiler (`3.8.3`). A short-term solution would seem to be to
generally bump most of our npm dependencies in this test.

Currently, main tests are _not_ failing because they're still using the
cache, which has a success for this test (and its inputs, as far as
Bazel can determine, have not changed). This is in my opinion a more
important failure (that it doesn't fail), and so a proper fix of this
issue should include pinning down all of our transitive dependencies
(not just `@types/prettier` as I've done here). Arguably _in addition
to_ bumping most of them to recent-ish versions.

The daily releases break because the version string invalidates the
cache, which is how the problem surfaced.

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-16 10:55:16 +02:00
Stephen Compall
30e9b87279
minimal Scala codegen interface support (#13858)
* add inherited choices for Scala codegen, test output exercises

CHANGELOG_BEGIN
- [scala codegen] Choices inherited from interfaces may be exercised
  directly from those templates via ``createAnd``, contract ID, or
  exercise-by-key.  Exercise by interface-contract-ID and
  interface-contract-ID types in signatures are not supported.
  See `issue #13858 <https://github.com/digital-asset/daml/pull/13858>`__.
CHANGELOG_END
2022-05-12 08:03:00 -04:00
Stephen Compall
59498586a5
Override annotation for create; add toValue to Template (#13859)
CHANGELOG_BEGIN
- [daml codegen java] Templates now have a generic ``toValue`` method.
  See `issue #13859 <https://github.com/digital-asset/daml/pull/13859>`__.
CHANGELOG_END
2022-05-12 07:58:56 -04:00
Moisés Ackerman
ad123f9b22
Add da-hls helper (#13853)
* Add haskell-language-server executable

* Add da-hls alias

* strip prefixes in da_haskell_libraries

* Remove dev-env-provided ghcide

* Update mentions of 'ghcide' to 'hls'

changelog_begin
changelog_end
2022-05-12 10:53:10 +02:00
Stephen Compall
5a50916493
fix small doc typo (#13857) 2022-05-11 19:30:36 +00:00
Stephen Compall
08ed5a9071
add missing imports in some interface-implementation cases (#13844)
* new test case without confounding symbols
* include inherited interfaces' modules in module references
* refer to #13845 regarding qualifiedModuleRef

CHANGELOG_BEGIN
- [daml codegen js] Some imports were missing in TypeScript declarations
  and JavaScript module definitions when those imports were only used to
  implement interfaces; these imports are now properly generated.
  See `issue #13844 <https://github.com/digital-asset/daml/pull/13844>`__.
CHANGELOG_END
2022-05-11 08:25:34 -04:00
Stephen Compall
226dcc0eea
non-reflective abstractions for Java codegen Contracts (#13724)
* shift some generated Contract code to a handwritten superclass
* generate a `COMPANION` for each template
* use the companion in some ledger reading tests
* document changes in template Java codegen

CHANGELOG_BEGIN
- [daml codegen js] Generated templates have types, inherited methods,
  and a new static ``COMPANION`` that enable writing more
  template-generic utilities directly in Java.  New classes
  ``Contract``, ``ContractWithKey``, and ``ContractCompanion``, have
  been introduced; if you are importing
  ``com.daml.ledger.javaapi.data.codegen.*`` and have imported classes
  with these names from any other package, these references will stop
  working; use individual imports instead.
  See `issue #13724 <https://github.com/digital-asset/daml/pull/13724>`__.
CHANGELOG_END
2022-05-06 18:47:17 +00:00
Nicu Reut
a792de39a5
Update scalafmt to 3.5.1. (#13584)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 09:57:04 +00:00
Stephen Compall
782f90a77d
don't overwrite interface properties with template properties (#13720)
* test for all varieties of mistaken interface assignment
* fresh object for templates, do not mutate interfaces

CHANGELOG_BEGIN
- [daml codegen js] Some interface IDs were overwritten with template
  IDs, making exercise by interface ID impossible in those cases; this
  has been fixed.  Prior codegen output is invalid; codegen must be
  re-run to get the fix.
  See `issue #13720 <https://github.com/digital-asset/daml/pull/13720>`__.
CHANGELOG_END
2022-04-27 15:43:06 +00:00
Victor Peter Rouven Müller
f74a8543ea
Revert "Remove usages of Flowable.fromFuture and Single.fromFuture (#12425)" (#13717)
This reverts commit 98c9461b72.

changelog_begin

- [Java bindings] The Single resulting from calling several of the services
exposed by the bindings are blocking again because the implementation was causing deadlocks. See https://github.com/digital-asset/daml/issues/13645

changelog_end
2022-04-27 10:23:22 -04:00
Stephen Compall
26add4af76
type pairs of Texts in TypeScript codegen (#13683)
* newtypes for genTypeCon's return values
* type genType's result to eliminate some fst/snds
* note that genTypeCon returns constructors, not full types/serializers
  - suggested by @cocreature; thanks

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-27 09:26:02 -04:00
Stephen Compall
c8b37a1ddf
different representation of Leibniz and Liskov in Scala codegen base library (#13687)
* replace TemplateCompanion#describesTemplate with <:<
* replace TextMap.leibniz === with =:=

CHANGELOG_BEGIN
- [Scala codegen] The signatures of Scala codegen's base classes have
  changed; existing Scala codegen output must be recompiled.  The
  functions ``describesTemplate`` and ``TextMap.leibniz`` have different
  types; it is extremely unlikely that users have used these functions
  directly, but will need to adjust any callers if they have.
  See `issue #13687 <https://github.com/digital-asset/daml/pull/13687>`__.
CHANGELOG_END
2022-04-26 15:22:34 +00:00
Stephen Compall
3a8d0b3a77
add missing type parameter evidence to Java codegen output when Numeric used (#13658)
* reproduce issue in Java codegen integration tests
* don't discard type parameters when encountering a numeric literal type

CHANGELOG_BEGIN
- [daml codegen java] The Java codegen could produce non-compiling Java code
  for Daml data types with type parameters that also used Numeric or
  Decimal in their definitions; this has been fixed.
  See `issue #13658 <https://github.com/digital-asset/daml/pull/13658>`__.
CHANGELOG_END
2022-04-22 09:43:01 -04:00
Stephen Compall
b98c55cbe4
narrow CodegenCommonConfig."reject empty versions" to property-satisfiable inputs (#13616)
* test names were backwards

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Stewart Stewart <stewinsalot@gmail.com>
2022-04-20 15:51:46 +00:00
Stephen Compall
6a570ea2ac
reenable no-unnecessary-type-assertion eslint warnings (#13617)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-20 15:39:49 +00:00
Stephen Compall
cb91febcd5
support cross-module interface implementation in typescript codegen (#13636)
* reproduce the cross-module codegen error
* let genTypeCon calculate the JS name, don't just tack on exports

CHANGELOG_BEGIN
- [daml codegen js] Support templates implementing interfaces that are defined in
  separate modules.
  See `issue #13636 <https://github.com/digital-asset/daml/pull/13636>`__.
CHANGELOG_END
2022-04-20 10:53:28 -04:00
Stefano Baghino
84c8be8181
Restrict Java codegen to types that can be seen over the Ledger API (#13571)
* Restrict Java codegen to types that can be seen over the Ledger API

Fixes #13324

Builds on top of refactorings part of #13372, #13439 and #13440,
alongside adding interface support to the transitive closure function
in #13557.

changelog_begin
[Java codegen] The Java codegen now restricts its output to Daml definitions
that are either directly or indirectly referred as part of a template or
interface (that is, only the types that can be seen over the Ledger API).
See #13324 for further details.
changelog_end

* Adapt tests to add template references for every type

* Address https://github.com/digital-asset/daml/pull/13440#discussion_r837318725

* Avoid invoking the recursion from two different places.

* Address https://github.com/digital-asset/daml/pull/13571#discussion_r848441581

* Address https://github.com/digital-asset/daml/pull/13571#discussion_r848442738

* Address https://github.com/digital-asset/daml/pull/13571#discussion_r848314960
2022-04-12 18:16:29 +02:00
Sergey Kisel
8a2761d837
Cleanup unused classes related to pureconfig (#13559)
* Cleanup unused classes.

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-11 21:00:31 +02:00
Stefano Baghino
10cd76a5d4
Add interface support to transitiveClosure (#13557)
* Remove unused field from `Node`

* Add interface support to `transitiveClosure`

Contributes to #13324

changelog_begin
changelog_end

This work can be reused to address #13349 and I left `TODO`s where appropriate.

* Address https://github.com/digital-asset/daml/pull/13557#discussion_r847434729

* Address https://github.com/digital-asset/daml/pull/13557#discussion_r847435412

* Turn the bulk of the logic of `transitiveClosure` into a smart constructor
2022-04-11 16:36:23 +00:00
Stefano Baghino
b245703b39
Refactor Java codegen (#13440)
* Remove unused class `JavaConf`

* Adapt tests to add template references for every type

* Minimize the data passed to `collectDamlLfInterfaces`

* Separate `CodeGen` from `CodeGenRunner`

* Refactor interfaces collection and resolution

* Refactor Java codegen

* Return `InterfaceType`s from `transitiveClosure`, move `DefTemplateWithRecord` to the Scala codegen

* Remove unused abstractions from the Java codegen

changelog_begin
changelog_end

* Minimize diff: move as much as possible to `CodeGenRunner`

* Revert "Adapt tests to add template references for every type"

This reverts commit 37c8c827179daa29668fa843c79afc8cef09e431.

* Fix compilation errors

* Minimize diff: restore imports in `ClassForType`

* Minimize diff: get rid of unnecessary refactorings

* Further simplications and fixing compilation errors

* Minimize diff: move `collectDamlLfInterfaces` back to its previous position

* Address https://github.com/digital-asset/daml/pull/13440#discussion_r846301958
2022-04-11 10:06:30 +00:00
Victor Peter Rouven Müller
91a6ad7f36
Add generation of FromInterfaceContractId methods for supporting templates in the java codegen (#13460)
* Add generation of FromInterfaceContractId methods for supporting templates in the java codegen

changelog_begin

- Add generation of `unsafeFrom{InterfaceName}` methods to the `ContractId` class for templates implementing interfaces in the Java codegen. That allows to convert between interface contract IDs and template contract IDs. If a conversion was wrong it will raise an exception at runtime during the execution of a command. The conversion is thus not exception-safe.

changelog_end

* Update language-support/java/codegen/src/ledger-tests/scala/com/digitalasset/InterfacesTest.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* Fix missing import

* Address https://github.com/digital-asset/daml/pull/13460#discussion_r838522450

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stefano Baghino <stefano.baghino@digitalasset.com>
2022-04-11 08:49:12 +00:00
Stefano Baghino
9d6eecaa4f
Refactoring codegen (#13439)
* Remove unused `name` field from `InterfaceTreeBuilder`, inline builder construction

* Remove unused `Traverse` instance for `TypeDeclOrTemplateWrapper`

* Remove unneccessary type parameter from `TypeDeclOrTemplateWrapper`

* Remove some unnecessary copies `.toList`

* Remove `TypeDeclOrTemplateWrapper`, use `Either` directly as a wrapper

* Use `bimap` instead of explicitly wrapping and unwrapping the `Either`

* Remove unnecessary type `Mode`

* Remove unnecessary type parameter from `WriteParams`

* Remove unnecessary binding

* Pull `OrderedDependencies` out of `Graph`

* Move computation of relevant packages to `codegen-common`

* Move `templateCount` from `LFUtil` into `CodeGen`

* Comment the purpose of `TransitiveClosure`

* Pull the variance cache out of `LFUtil`

`LFUtil`'s purpose is that of limiting passing around certain
values. While the purpose is questionable, the variance cache did
not need to access any of those values and it's quite easy to
move to a separate class where the purpose and the scope are clearer.

* Make `DependencyGraph` work directly on type declarations

* Add constructor for a collection of interfaces to `EnvironmentInterfaces`

* Factor the error message from `cyclicDependencies` out of `DependencyGraph`

changelog_begin
changelog_end
2022-03-29 16:29:22 +02:00