Skip to content

OTP 24 golang 1.18 can not worked,but i make it work by change the code #21

@xiaodoudou12

Description

@xiaodoudou12
  1. when compile show error deps/http2_client/ebin/http2_client.app" is missing kernel from applications list
    I change src/http2_client.app.src '{applications, [cowlib]}' to '{applications,[cowlib,kernel,stdlib]}'

  2. when connect golang server will show unknown service
    https://github.com/grpc/grpc-go/blob/master/server.go

func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream, trInfo *traceInfo) {
	sm := stream.Method()
	if sm != "" && sm[0] == '/' {
		sm = sm[1:]
	}
	pos := strings.LastIndex(sm, "/")

when golang grpc client connect server, the sm will be "/helloworld.Greeter/SayHello"
but erlang grpc_client connect, sm is "/Greeter/SayHello"
so i change https://github.com/Bluehouse-Technology/grpc_client/blob/master/src/grpc_client_stream.erl default_headers
Path = iolist_to_binary(["/", Package, atom_to_list(Service), "/", atom_to_list(Rpc)]),
to
Path = iolist_to_binary(["/", atom_to_list(Encoder), ".", Package, atom_to_list(Service), "/", atom_to_list(Rpc)]),

i do not know why get unknown service and is this change ok?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions