Skip to content

Commit

Permalink
fix: Correct two errors in generated types (#6498)
Browse files Browse the repository at this point in the history
Output is now validated in the build - CI will fail if there is an error
in the future.

Fixes DH-18194
  • Loading branch information
niloc132 authored Dec 17, 2024
1 parent 77fdddf commit e7f9b7b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.deephaven.javascript.proto.dhinternal.grpcweb.client.RpcOptions;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.TerminationNotificationResponse;
import io.deephaven.web.client.api.event.HasEventHandling;
import io.deephaven.web.client.api.grpc.GrpcTransportFactory;
import io.deephaven.web.client.ide.IdeSession;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.console_pb.*;
import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.ticket_pb.Ticket;
Expand Down Expand Up @@ -255,7 +256,7 @@ public <T> T createClient(BiFunction<String, Object, T> constructor) {
public RpcOptions makeRpcOptions() {
RpcOptions options = RpcOptions.create();
options.setDebug(getOptions().debug);
options.setTransport(getOptions().transportFactory.adapt());
options.setTransport(GrpcTransportFactory.adapt(getOptions().transportFactory));
return options;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import com.vertispan.tsdefs.annotations.TsInterface;
import com.vertispan.tsdefs.annotations.TsName;
import jsinterop.annotations.JsNullable;
import jsinterop.annotations.JsProperty;

/**
Expand All @@ -31,7 +30,6 @@ public String getType() {
}

@JsProperty
@JsNullable
public T getDetail() {
return detail;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.deephaven.javascript.proto.dhinternal.browserheaders.BrowserHeaders;
import io.deephaven.javascript.proto.dhinternal.grpcweb.transports.transport.Transport;
import io.deephaven.javascript.proto.dhinternal.grpcweb.transports.transport.TransportFactory;
import jsinterop.annotations.JsIgnore;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
Expand All @@ -17,7 +18,7 @@
* Factory for creating gRPC transports.
*/
@TsInterface
@JsType(namespace = "dh.grpc", isNative = true)
@JsType(namespace = "dh.grpc")
public interface GrpcTransportFactory {
/**
* Create a new transport instance.
Expand All @@ -40,10 +41,10 @@ public interface GrpcTransportFactory {
/**
* Adapt this factory to the transport factory used by the gRPC-web library.
*/
@JsOverlay
default TransportFactory adapt() {
@JsIgnore
static TransportFactory adapt(GrpcTransportFactory instance) {
return options -> {
GrpcTransport impl = create(GrpcTransportOptions.from(options));
GrpcTransport impl = instance.create(GrpcTransportOptions.from(options));
return new Transport() {
@Override
public void cancel() {
Expand Down
1 change: 0 additions & 1 deletion web/client-api/types/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def typedocAndTarball = Docker.registerDockerTask(project, 'typedoc') {
mv deephaven-jsapi-types*.tgz /out/; \\
node_modules/.bin/typedoc dist/index.d.ts \\
--out /out/documentation \\
--skipErrorChecking \\
--hideGenerator \\
--disableSources \\
--customCss theme.css; \\
Expand Down

0 comments on commit e7f9b7b

Please sign in to comment.