instana / go-sensor

:rocket: Go Distributed Tracing & Metrics Sensor for Instana
https://www.instana.com/
MIT License
122 stars 39 forks source link

[Bug]: go-sensor uses an old github.com/looplab/fsm v0.1.0 and conflicts for the module which uses latest go-sensor and latest looplab/fsm #415

Closed ashutosrath closed 1 year ago

ashutosrath commented 1 year ago

Problem Description

# github.com/instana/go-sensor
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:68:25: cannot use ret.lookupAgentHost (value of type func(e *fsm.Event)) as type fsm.Callback in map literal
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:69:25: cannot use ret.announceSensor (value of type func(e *fsm.Event)) as type fsm.Callback in map literal
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:70:25: cannot use ret.testAgent (value of type func(e *fsm.Event)) as type fsm.Callback in map literal
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:71:25: cannot use ret.ready (value of type func(e *fsm.Event)) as type fsm.Callback in map literal
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:73:16: not enough arguments in call to ret.fsm.Event
        have (string)
        want (context.Context, string, ...interface{})
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:149:14: not enough arguments in call to r.fsm.Event
        have (string)
        want (context.Context, string, ...interface{})
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:156:15: not enough arguments in call to r.fsm.Event
        have (string)
        want (context.Context, string, ...interface{})
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:209:15: not enough arguments in call to r.fsm.Event
        have (string)
        want (context.Context, string, ...interface{})
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:268:15: not enough arguments in call to r.fsm.Event
        have (string)
        want (context.Context, string, ...interface{})
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:274:14: not enough arguments in call to r.fsm.Event
        have (string)
        want (context.Context, string, ...interface{})
../../.go/pkg/mod/github.com/instana/go-sensor@v1.52.0/fsm.go:274:14: too many errors

Minimal, Complete, Verifiable, Example

go get -u .../ go mod tidy go test

Go Version

go 1.19

go.mod

module github.ibm.com/xxx/yyy

go 1.19

require (
   require github.com/looplab/fsm v1.0.1
)

go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/asrath/.cache/go-build"
GOENV="/home/asrath/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/asrath/.go/pkg/mod"
GONOPROXY="github.ibm.com"
GONOSUMDB="github.ibm.com"
GOOS="linux"
GOPATH="/home/asrath/.go"
GOPRIVATE="github.ibm.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/asrath/repo/gw-deploy/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build969956151=/tmp/go-build -gno-record-gcc-switches"
sanojsubran commented 1 year ago

Thanks @ashutosrath for reporting the issue. We will check the issue and update you.

sanojsubran commented 1 year ago

We are updating the fsm package to the v1. We'll provide a release soon.

sanojsubran commented 1 year ago

Hi @ashutosrath , Please find the latest release with the updated fsm package.

sanojsubran commented 1 year ago

Hi @ashutosrath, Kindly let us know whether the issue got resolve in the latest release so that we can close the ticket.