Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correct two errors in generated types #6498

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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