Fixes to kvutils when used as external workspace (#984)

* Export daml_kvutils_java_proto and add (un)packDamlLogEntryId

Export needed when using kvutils via bazel from another workspace.

* Use 'String' for participant state's LedgerId

Ref.PackageId is the wrong thing, and likely MatchingStringModule
isn't very usable from Java.
This commit is contained in:
Jussi Mäki 2019-05-07 17:55:11 +02:00 committed by GitHub
parent 8534e2837f
commit 0dc49ea811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,7 @@ da_scala_library(
visibility = [
"//visibility:public",
],
exports = [":daml_kvutils_java_proto"],
runtime_deps = [],
deps = [
":daml_kvutils_java_proto",

View File

@ -36,6 +36,9 @@ object KeyValueCommitting {
def packDamlLogEntry(entry: DamlLogEntry): ByteString = entry.toByteString
def unpackDamlLogEntry(bytes: ByteString): DamlLogEntry = DamlLogEntry.parseFrom(bytes)
def packDamlLogEntryId(entry: DamlLogEntryId): ByteString = entry.toByteString
def unpackDamlLogEntryId(bytes: ByteString): DamlLogEntryId = DamlLogEntryId.parseFrom(bytes)
/** Pretty-printing of the entry identifier. Uses the same hexadecimal encoding as is used
* for absolute contract identifiers.
*/

View File

@ -58,7 +58,7 @@ import com.digitalasset.daml.lf.value.Value
package object v1 {
/** Identifier for the ledger, MUST match regexp [a-zA-Z0-9-]. */
type LedgerId = Ref.PackageId
type LedgerId = String
/** Identifiers for transactions.
* Currently unrestricted unicode (See issue #398). */