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

Migrating the reflection API #460

Open
advancedwebdeveloper opened this issue Mar 15, 2021 · 0 comments
Open

Migrating the reflection API #460

advancedwebdeveloper opened this issue Mar 15, 2021 · 0 comments

Comments

@advancedwebdeveloper
Copy link

Hi.

Not that I am an adept of this project - but I thought that it could be used as a playground, for migrating to the upcoming/improved version of the "reflect" package.

Here is my .diff file, where you could see what/how I patched.

Here is the reported error:

$ make
go build ./...

github.com/AsynkronIT/protoactor-go/persistence/protocb

persistence/protocb/envelope.go:36:23: cannot use t (type "reflect".Type) as type *"github.com/goccy/go-reflect".rtype in argument to "github.com/goccy/go-reflect".New

github.com/AsynkronIT/protoactor-go/remote

remote/json_serializer.go:53:23: cannot use t (type "reflect".Type) as type *"github.com/goccy/go-reflect".rtype in argument to "github.com/goccy/go-reflect".New
remote/proto_serializer.go:35:23: cannot use t (type "reflect".Type) as type *"github.com/goccy/go-reflect".rtype in argument to "github.com/goccy/go-reflect".New
make: *** [Makefile:7: build] Error 2

.
Here are some insights of my environment:

$ go env && go version && uname -a
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/home/oceanfish81/.cache/go-build"
GOENV="/home/oceanfish81/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oceanfish81/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oceanfish81/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GOVCS=""
GOVERSION="go1.16.2"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3398748838=/tmp/go-build -gno-record-gcc-switches"
go version go1.16.2 linux/arm64
Linux ams1-c2-large-arm-01 5.4.0-40-generic #44-Ubuntu SMP Mon Jun 22 23:59:48 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

There where two suggestions, for this:

  • to benchmark your middleware itself
  • to benchmark reflection functions

. It would allow to compare with the results of benchmarks, comping from your "default" build, which relies on the "reflect" package .
Eventually it would allow to open a PR and propose a patch, for libgo's "reflect" package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant