* comparison query parser given scalar parser
- written in half-error-propagation style to better suit other potential
error features
* factor dupes in RangeExpr
* text range parsing
* interpreting Range into in-memory predicate; points out bad dedupe from earlier
* make reuse of the scalar extractors much nicer
* express date, time, int64 as factored-out range exprs
* express numeric as factored-out range expr
* factor \&/ usage
* refactor LF value extractors for reuse in range queries
* factor mkRange usage
* totally deconstruct the int64 and text cases
* totally deconstruct the date and timestamp cases
* totally deconstruct the numeric case
* document comparison queries
* use Utf8.Ordering for text comparison queries
* int64 range query tests
* more int64 range query tests
* date, string, numeric range query tests
* include line # in query test successes table
* timestamp range query tests
* add release note
* remove duplicate changelog entry from #3425
* Update bazel-common to fix javadoc issues
Specifically, to fix the following error
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
javadoc_library(name = 'rs-grpc-bridge_javadoc')
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```
* Define Maven deps using rules_jvm_external
* Pin artifacts
* Remove bazel-deps generated targets
* Remove bazel-deps
* Switch to rules_jvm_external targets
* update bazel documentation
* pom_file: There are no more bazel-deps targets
* BAZEL-JVM.md `maven_install` typo
* Add TemplateTypeRep to AnyContractId
* Define Trigger.ContractId t
* Use Trigger.ContractId t
* Implement fromCreated and fromArchived
* instance MapKey TemplateTypeRep
* More efficient ACS access using Map TemplateTypeRep
* ./fmt.sh
* toString and fromString for Identifier
* Replace Identifier by TemplateTypeRep
* TheContractId --> AbsoluteContractId
https://github.com/digital-asset/daml/pull/3245#discussion_r338033546
* speedy: limit allocation of trivial SValue constants
* daml-lf: limit allocation of constants for Value, Exp, Type
* weaken numeric equality in ledger service test
* engine: create persisted value for numeric
* engine: update info test
* Apply suggestions from code review
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* engine: weaken scale constraints when transalting value
* Address Stephen's comments
* Address one of Stefano's comments
* daml-lf: fix transaction test
* ADT for json-api's LF value query predicates
* expand predicates into primitive cases
* expand more cases for the predicate reader
* instantiating type references
* record case
* get super-reductionist with ValuePredicate so we can tease out the proper model by operations
* just put the literal predicates in the ADT
* more primitive predicates
* properly build RecordSubset predicates
* tests for ValuePredicate LF value predicate functions
- false cases fail because outer layer still stubbed
* outer RecordSubset always used
* tests for comparing literal predicate and ApiCodecCompressed parsing
* map querying
* Adding ListMatch
* removing List test cases covered by LF-JSON encoding tests
* Optional support; precompile ListMatch elements
* use go instead of toFunPredicate
- deals with potential subst introduction as we make VP more abstract
* test cases for optional queries
* Adding VariantMatch
* Fixing comments
* some precompiling and fusion
* Adding value predicate to contracts/search endpoint, WIP
* Adding value predicate to contracts/search endpoint, WIP
* add filtering to ContractsService#filterSearch
* Adding contracts/search result filtering based on the constructed predicates
* cleanup
* make error throwing in ValuePredicate a little nicer
* scalafmt
* cleanup
* follow JSON format rules for numeric queries
* test that apiValueToLfValue . lfValueToApiValue = arr id
* API value -> LF value discards scale; account for that in ValuePredicate
- fixes queries that match numerics
* document query
* release note
* test for contracts/search with query
* more tests for contracts/search with query
* More tests and cleanup
* more cleanup
* better test
* Adding disclaimer
* records, not documents
* better error message in the fromCon case
* add Numeric.java
* ledger-api: rename `decimal` field to `numeric` in value protobuf
* Address Gerolf's comment
* ledger-api: add missing renammings
* ledger-api: relax syntax of numbers that can be sent as numerics
* extractor: fix
* leger-api: change format of number though ledger api
* daml-lf: fix numeric regexp
* ledger: fix tests
* daml-lf: rename data.assert function to data.assertRight
* daml-lf: implement internal Numeric type
* Apply suggestions from Gerolf
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* Address Gerolf's comments
in particular add tests for round and toLong
* Show function names in stack trace on failing scenario
So far, we've only shown the location of the function but not its name.
Now, we add the name of the function as well.
* daml-lf: make match2's fallback lazy, and add tuple2 syntax for better inference
* lf-value-json: when decoding, branch on type, *then* on value
- restores totality checking for interface ADT
- makes alternate input formats obvious at a glance
- lets us restructure in the future to cache type branch lookups
* lf-value-json: support numbers for int64s
* lf-value-json: test failures and more timestamp cases
* lf-value-json: adapt timestamp decoding to new rules
* lf-value-json: cleanup
* lf-value-json: decode Number as decimal
* lf-value-json: forbid yet another timezone format
* lf-value-json: don't copy
* lf-value-json: replace {Some, {None optional format with nest-sensitive [] format
* lf-value-json: round decimals rather than rejecting, in either string or number form
* lf-value-json: support output to JsNumber for int64s and decimals, separately
- not dependent on JavaScript safe integer range, because that is not
the purpose of this option
* lf-value-json: uncomment some now-tested rounding cases
* allow None record fields to be omitted in object syntax
* release notes
* new data-scalacheck library for ImmArray, FrontStack, et al
* add checkLaws functions as library to data-scalacheck
* make checkLaws more configurable at use points
* 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
* move ApiCodecCompressed, ApiValueImplicits, and some aliases to new lf-value-json package
* adapt navigator to moved pieces
* start defining scalacheck extension to ApiCodecCompressedSpec
* experiment with an inductive case in TypedValueGenerators
* finish a List case for TypedValueGenerators; it's revealing
* remove accidentally readded duplicate aliases
* start tying knots in TypedValueGenerators
* verbatim copy ApiCodecCompressedSpec to lf-value-json
* shift some tests from navigator to lf-value-json
* test Optional and Map for ApiCodecCompressed
* heavier random testing of ApiCodecCompressed
* remove unused dependencies from lf-value-json
* replace ApiValue ADT with aliases to daml-lf/transaction Value ADT
* porting rest of navigator to LF Value ADT
* porting more of navigator to LF Value ADT
* last error, not first
* rename ApiValueImplicits file
* special conversion features for ImmArray and FrontStack
- just .to[ImmArray] or .to[FrontStack] any random collection
* finish porting most of navigator main code
* use numeric indices for record field name fallback when pretty-printing
* tuples are not serializable
* use numeric indices for label fallback in JSON verbose encoding
* make traverseEitherStrictly more likely to preserve the seq's class
* to shortcut for ImmArraySeq .to[ImmArraySeq]
* compiling, passing navigator backend tests
* test traverseEitherStrictly more, er, strictly
* pass scalacopts through to scaladoc
* deal with unused warning
* remove unneeded function
* simpler error reporting, more private functions in ApiCodecCompressed
* move slowApply to FrontStack, test it so it actually works
* remove unneeded toStrings; better error from impossible ValueTuple case
* scalafmt FrontStackSpec
* support alternative, label-free record JSON encoding
* fuse some list operations
- suggested by @stefanobaghino-da; thanks
* blue error message
* store archive size in `DarReader`
* rename `SandboxTemplateStore` to `SandboxPackageStore`
* store package info in `SandboxPackageStore`
* introduce package upload / read to write / index services
not tested yet, just a ton of plumbing
* WIP test the package service
* Fix build errors after rebase
* Move packages service to v2
* Ledger API client uses ledger API types
* Fix ReflectionIT
* Correctly handle uploading invalid dar files
* Fix reading DAR entry file sizes
* Improve package management IT
* Improve handling of duplicate packages
* Fix language-support build
* Use unique party and command names
* Rename lfpackage to language
* Rename SandboxPackageStore to InMemoryPackageStore
* Remove getCurrentTime ledger method
* Improve package management IT
* Move InMemoryActiveContracts and InMemoryPackageStore
* Use case object for UploadDarResult.Ok
* Address review comments
* Update release notes
Fixes#1311
* Use BazelRunfiles in test
* encode ast in protobuf
* daml-lf parser: make defaultPackageId and languageVersion parametric
* daml-lf rewritting of AST
* test ast encoder
* copyright
* test function type encoding
* daml-lf add parameter to parser implicits
* damlfl-as stands for "damllf assembler"
* move encoder in its own private package
* Allow slashes in ledger strings
Using '/' as the divider is a natural choice for some ledger backend
implementations and in application/workflow etc. identifiers.
* Update value.proto to include slash in LedgerStrings
* Update release notes
ImmArray, FrontStack, and BackStack violated the contract between equals
and hashCode. ImmArray had a wrong implementation of hashCode, and
FrontStack and BackStack had no implementation at all.
Fixes#1623.
* Isolate daml-on-x prototype
* Implement TransactionService of index api.
Towards the first milestone of the daml-on-x integration steps
* fix compiler error after last-minute refactoring
* formatting
* remove unnecessary dependency from api-server-damlonx
* Fix some inconsistencies.
* Rename Value's ContractId to VContractId
* daml-lf: a bit more about PartyId
* daml-lf: Concatenable MatchingStringModule
* daml-lf make clear type used for Scenarios only
* daml-lf create ContractId, LedgerId, TransactionId
* sandbox-sql conversion util
* LedgerName -> LedgerString
* futher type cleanup in the sandbox
* daml-lf add test for LedgerString
* fixing tests
* a bit more safety in the DB
* Address Stephen's comments
* fix rebase
* More fixes for StringModule
* change length of LedgerString (256 -> 255)
* stub away the components of LedgerValue
* rewrite v1 api converters to produce transaction Value ADT
* a needless 'case'
* shortcut methods for ImmArraySeq and tests
* porting extractor's JSON encoders to transaction Value
- JSON object ordering now matches record field order, instead of being
its reverse
- Includes a new encoding for records missing labels, to a list of
2-tuples
* porting extractor main transaction Value
- JSON date/time is just <num>s since epoch, maybe revisit
* adapt to Decimal newtype
* use daml-lf/data stringification for decimals in JSON
* snap aliases for Cid-less LedgerValue subtypes
* snap aliases for Cid-containing LedgerValue subtypes
* remove needless indirection
* test new missing-label Record JSON encoding
* write ImmArray traverse with syntax extension
* remove RecordField; move Name parsing to former RecordField converter
* daml-lf: make Decimal type safe
* daml-lf: create Utf8String type
* daml-lf: cleanup in data package
* Address Stephen Comments
* daml-lf: remove UTF8String
* enable Return wartremover wart
* remove return keyword from various places in daml-lf
* remove return keyword from various places in ledger
* simpler ImmArray equals
* move traverseEitherStrictly to point of use
* remove return from ledger-api-server-example
* Map case of Equal[Value] was not properly recursive
* protect SortedLookupList from equals incoherence
* simplify ImmArray creation
* clean up boilerplate in Equal[Value] definition
* use match2 for isReplayedBy