yzhaoa

Results 8 comments of yzhaoa

For posterity - resetForTest doesn't actually work if you need to capture the opencensus traces. By the time you call resetForTest the opencensus-shim has already captured in a static variable...

toObject() for proto3 optional fields are still generated like so by the protoc js compiler: ``` optionalField: jspb.Message.getFieldWithDefault(msg, 1, ""), ``` Note the `Default` part. This conforms with the google-protobuf...

**Root cause** The root cause seems to be a bad interaction between `CompletionStage.asDeferred` and `CompletableFuture`. Specifically: 1. When `future` completes, it calls the `CompletionStage.handle` callback at https://github.com/Kotlin/kotlinx.coroutines/blob/1bffe67a32d9d0285320f5b23fa94bc2b5f2b92e/kotlinx-coroutines-core/jdk8/src/future/Future.kt#L126. 2. The callback...

**Workaround** The above issue can be worked around by breaking the recursive `CompletableFuture.cancel` call. For example: ```kotlin fun CompletableFuture.safeAsDeferred(): Deferred { val parent = this val safeCompletableFuture = object :...

Looks like the standard opentelemetry export even wrote a custom protobuf serializer system to serialize the grpc requests. At this point it makes a lot more sense to rewrite the...

**Cause**: According to https://github.com/bufbuild/buf/issues/1035 and https://github.com/diffplug/spotless/pull/1208#discussion_r1264439669, `buf format` does not read from stdin, and reads from the file name in command line arguments. https://github.com/diffplug/spotless/blob/6f1919f2175b3a3dea785a1da69883244b567a2f/lib/src/main/java/com/diffplug/spotless/protobuf/BufStep.java#L109 shows that the BufStep passes the...

**Workaround**: You can work-around this issue by creating a wrapper around `buf` that discards stdin, e.g. (untested) ``` #!/bin/bash # Discard input cat >/dev/null exec buf "$@" ``` **Caution!** It...

Another easier workaround with a custom patched formatter: ```kotlin protobuf { class State(private val pathToExe: String) : Serializable { fun toFunc(): FormatterFunc.Closeable { return FormatterFunc.Closeable.of(ProcessRunner()) { runner, _, file ->...