You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot make genswagger work on Ubuntu 18 on Windows (WSL1)
My setup:
$ uname -a
Linux DESKTOP-BGT2SIH 4.4.0-18362-Microsoft #476-Microsoft x86_64 x86_64 x86_64 GNU/Linux
$ go version
go version go1.10.3 gccgo (Ubuntu 8.3.0-6ubuntu1~18.04.1) 8.3.0 linux/amd64
I'm using protoc 3.0.0 from Ubuntu package protobuf-compiler 3.0.0-9.1ubuntu1 amd64
The same happens if I replace the binary (and the include files) from latest version 3.11.1
$ protoc --swagger_out=logtostderr=true:. -I. sample.proto
panic: reflect.Set: value of type genswagger.alias is not assignable to type genswagger.alias [recovered]
panic: reflect.Set: value of type genswagger.alias is not assignable to type genswagger.alias [recovered]
panic: reflect.Set: value of type genswagger.alias is not assignable to type genswagger.alias
goroutine 1 [running]:
panic
../../../src/libgo/go/runtime/panic.go:554
json.r
../../../src/libgo/go/encoding/json/encode.go:293
json.func1
../../../src/libgo/go/encoding/json/encode.go:287
panic
../../../src/libgo/go/runtime/panic.go:495
json.r
../../../src/libgo/go/encoding/json/encode.go:293
json.func1
../../../src/libgo/go/encoding/json/encode.go:287
panic
../../../src/libgo/go/runtime/panic.go:495
reflect.Value.assignTo
../../../src/libgo/go/reflect/value.go:2075
reflect.Value.Set
../../../src/libgo/go/reflect/value.go:1213
genswagger.extensionMarshalJSON
/home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go:134
github_com_grpc_ecosystem_grpc_gateway_protoc_gen_swagger_genswagger.swaggerInfoObject.MarshalJSON
/home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go:86
json.marshalerEncoder
../../../src/libgo/go/encoding/json/encode.go:445
encoding_json.structEncoder.encode
../../../src/libgo/go/encoding/json/encode.go:639
encoding_json.encodeState.reflectValue
../../../src/libgo/go/encoding/json/encode.go:325
encoding_json.encodeState.marshal
../../../src/libgo/go/encoding/json/encode.go:298
encoding_json.Marshal
../../../src/libgo/go/encoding/json/encode.go:161
genswagger.extensionMarshalJSON
/home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go:138
github_com_grpc_ecosystem_grpc_gateway_protoc_gen_swagger_genswagger.swaggerObject.MarshalJSON
/home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go:81
json.marshalerEncoder
../../../src/libgo/go/encoding/json/encode.go:445
encoding_json.encodeState.reflectValue
../../../src/libgo/go/encoding/json/encode.go:325
encoding_json.encodeState.marshal
../../../src/libgo/go/encoding/json/encode.go:298
encoding_json.Encoder.Encode
../../../src/libgo/go/encoding/json/stream.go:200
genswagger.encodeSwagger
/home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go:146
github_com_grpc_ecosystem_grpc_gateway_protoc_gen_swagger_genswagger.generator.Generate
/home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/genswagger/generator.go:212
main.main
/home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/main.go:119
--swagger_out: protoc-gen-swagger: Plugin failed with status code 2.
Using the latest go packages:
$ cd /home/hernan/go/src/github.com/grpc-ecosystem/grpc-gateway
/go/src/github.com/grpc-ecosystem/grpc-gateway$ git log
commit 3c06998610d4d2edea99d12228b1f6ea2d943ce4 (HEAD -> master, origin/master, origin/HEAD)
Author: Guilherme Santos <xguiga@gmail.com>
Date: Tue Dec 3 18:02:09 2019 +0100
Override operation_id when available
...
The text was updated successfully, but these errors were encountered:
I cannot make genswagger work on Ubuntu 18 on Windows (WSL1)
My setup:
I'm using protoc 3.0.0 from Ubuntu package
protobuf-compiler 3.0.0-9.1ubuntu1 amd64
The same happens if I replace the binary (and the include files) from latest version 3.11.1
Tested with this
sample.proto
fileGeneration works ok
$ protoc --go_out=. sample.proto
But the swagger generation fails systematically:
Using the latest go packages:
The text was updated successfully, but these errors were encountered: