* Support for contract keys to kvutils
* Fix handling of CreateEvents with contract keys in semantic tester
* Add ContractKeysIT to tests and fix issues related to fetchByKey
* Address code review
Speed up file modification checks
Summary: `getModificationTime` from the `directory` package is really
slow. The `unix` package is faster but still slow. This PR brings the
time spent checking file modifications (which is required on every
change) from ~0.5s to ~0.15s.
* Add anchor self-links in Rst docs
* Refactor a little with unwords
* Fix silly type error
* Refactoring and better type rendering
* Rename rst renderer functions.
* Update tests
* lint
This is a breaking change on the ledger api. So far we could rely on the
assumption that contractId == eventId. This assumption doesn't hold
anymore in a daml-on-x setting, where the eventId is created by the
api server, but the absolute contractId is created by the ledger
implementation.
Instead of going through weird contortions to store the relevant data in
the existing database schema, it is more viable in the long term to
remove that field and instead provide facilities to lookup transactions
by contractId.
Contributes to #2068.
* ledger: refactor validateValue from CommandsValidator to new ValueValidator
* daml-lf: add a matchable class for leaf Values except ValueContractId
* ledger: use IdentifierResolverLike for CommandsValidator
* daml-lf: add Traverse[FrontStack]
* navigator: define readRecordArgument and readArgument in terms of ledger-api-common ValueValidator
* navigator: clean up fillInVariantTI
* navigator: replace ledger-api Value writer with LfEngineToApi from ledger-api-common
* navigator: use traverse
* navigator: remove dead sequenceMap
* navigator: adapt to new ValueValidator structure
* ledger: dealias validateValue call
* navigator: a good use case for traverseEitherStrictly
* language: a shake rule to get interface/hie files
This adds a shake rule to get module interfaces and hie files. This
gives more control on when to build them and also an opportunity to
change the package name after typechecking. This is used in the next
PR to add package hashes to the package name in the interface files.
* generate hie files only on demand
Currently, we call `force` on every result of a rule. This was
problematic for the rules that produce LF packages:
Even if only the top-level module changes, the package for that module
contains all its dependencies. This means that we end up RNFing every
module that the current module depends on. On a project with ~900
dependencies this added up to over 1s for both GeneratePackageDeps and
GeneratePackage which corresponded to more than half of the overall
runtime.
This PR introduces a newtype for packages that does not evaluate the
modules in a package to NF. With this PR both rules are below 0.02s so
his is quite a significant improvement. We do not introduce any
potential space leaks here since the modules are produced by rules
that already force them to NF.
* Fix typo in README.md and stale link in CONTRIBUTING.md
* Fix minor typos in quickstart
* Fix various minor typos/mistakes in DAML Intro
* Make DAML code in quickstart-java example cleaner
Also update module hash as well as screenshots in docs
* Improve debugging output
Displaying the exception makes it easier to figure out what is going
wrong.
I’ve also added a HasCallStack constraint to `locateRunfiles` since it
looked like that was failing. Turned out to be a call to `create` that
didn’t go via `locateRunfiles` but I think it’s useful either way.
Should be more useful with https://github.com/tweag/rules_haskell/pull/1007
* Update compiler/hie-core/src/Development/IDE/Core/Shake.hs
Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* Upgrade ghc-lib
* Patch bazel_tools : hazel-include-paths patch, no-isystem patch.
* Provide "haskell_c2hs" for package name to cabal_haskell_package
* Package name haskell_c2hs => c2hs.
* Switch to less hacky patch for include dirs
* Fix inserting contracts in Navigator
Fixes#2271
* Add release notes
* Log all database errors
* Fix typo in release notes
* Better express intent
* NonFatal is not necessary here, as we are not catching exceptions. Bad advice on my part
* remove unused import
* damlc visual: detect ledger actions at surface level
Instead of detecting the DAML-LF primitives for `create` and `exercise`,
we detect the corresponding surface DAML functions and ignore the
dictionaries for the `Template` and `Choice` classes. This will be
necessary for swiching to the new template desugaring.
This is the quickest way to get this working but might turn into a brittle
maintenance nightmare one day. If that happens, we should switch to doing
proper symbolic evaluation, which will we be a bit more code though.
* Fix explanation
Co-Authored-By: Rohan Jacob-Rao <rohanjr@gmail.com>
* Add explanation for special casing archive
The sourceRoot tag of the maven exec plugin isn't supported by the maven
integration in VS Code (which really is the eclipse stack).
Using the much more verbose build-helper-maven-plugin to make the
generated sources folder known to maven now makes the project properly
loadable by VS Code.
Fixes#887.
* Add CommandSubmissionTtlIT to Ledger API Test Tool
* Add ActiveContractsServiceIT to Ledger API Test Tool
* Add WitnessesIT to Ledger API Test Tool
* Delete useless test
* Move time manipulation in TransactionServiceHelpers
* Add CommandServiceIT to Ledger API Test Tool
* Add the missing summary case to the ToolReporter
* Support depending on potentially stale values in damlc
For now, this is opt-in and only enabled for the scenario service.
Locations should be properly mapped so if lines are inserted above a
scenario, the scenario link will move down.