Skip to content

Commit

Permalink
Fixes to kvutils when used as external workspace (#984)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
Jussi Mäki authored May 7, 2019
1 parent 8534e28 commit 0dc49ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions ledger/participant-state/kvutils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ da_scala_library(
visibility = [
"//visibility:public",
],
exports = [":daml_kvutils_java_proto"],
runtime_deps = [],
deps = [
":daml_kvutils_java_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand Down

0 comments on commit 0dc49ea

Please sign in to comment.