Skip to content

protobuf v1.28.1 compile issue + missing MapOf in reflect #3376

Open
@abourget

Description

@abourget

With tinygo's dev branch (commit 0566bbf), compiling google.golang.org/protobuf v1.28.1 I get:

$ /Users/abourget/dev/tinygo/build/tinygo build -scheduler=none -o eth_xfer.wasm -target wasi eth_xfer.go
# google.golang.org/grpc/internal/channelz
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:39:54: SOL_SOCKET not declared by package syscall
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:39:74: SO_LINGER not declared by package syscall
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:42:55: SOL_SOCKET not declared by package syscall
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:42:75: SO_RCVTIMEO not declared by package syscall
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:45:55: SOL_SOCKET not declared by package syscall
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:45:75: SO_SNDTIMEO not declared by package syscall
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:48:55: SOL_TCP not declared by package syscall
../../../../../go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:48:72: TCP_INFO not declared by package syscall

Been trying to chase the compilation issue, and there's always something creeping back in.

Prior to this, I had an issue with MapOf and added:

func MapOf(key, elem Type) Type {
    panic("not implemented in tinygo")
}

to src/reflect/type.go, to not get:

# github.com/golang/protobuf/proto
../../../../../go/pkg/mod/github.com/golang/[email protected]/proto/registry.go:224:16: MapOf not declared by package reflect

I'm running on go version go1.19.4 darwin/arm64.

Relates to #2667

Metadata

Metadata

Assignees

No one assigned

    Labels

    reflectionNeeds further work on reflection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions