Closed evgeniy-krivenko closed 9 months ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Hi, mate. Could you please do not ignore
A minimal reproducible example or link to a public repository
And push your example from point 5
Updated issue, new project with example from point 5
@evgeniy-krivenko thanks
looks like some issue with go.temporal.io
🤔
I cloned sdk and did the next:
$ go version
go version go1.22.0 darwin/arm64
$ golangci-lint version
golangci-lint has version 1.56.2 built with go1.22.0 from 58a724a0 on 2024-02-15T18:01:51Z
$ golangci-lint run ./...
WARN [runner] Can't run linter goanalysis_metalinter: inspect: failed to load package activity: could not load export data: no export data for "go.temporal.io/sdk/activity"
ERRO Running error: can't run linter goanalysis_metalinter
inspect: failed to load package activity: could not load export data: no export data for "go.temporal.io/sdk/activity"
$ go mod edit -replace=go.temporal.io/sdk=../sdk-go
$ go mod tidy
$ golangci-lint run cache clean
$ golangci-lint run ./...
go.mod:11:1: local replacement are not allowed: go.temporal.io/sdk (gomoddirectives)
replace go.temporal.io/sdk => ../sdk-go
^
internal/phonevalidator/service.go:12: File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(fastronom) --custom-order (gci)
internal/phonevalidator/service.go:25:2: field `defaultRequestTimeout` is unused (unused)
defaultRequestTimeout time.Duration `default:"5s"`
could not load export data
thanks, yep, it's go.temporal.io
problem with grpc version deps. If set v1.26.0-rc.1 for temporal sdk, lint is okey!
Welcome
Description of the problem
I've included the Temporal SDK package in my project and am now encountering the following error:
"Running error: 1 error occurred: * can't run linter goanalysis_metalinter: inspect: failed to load package activity: could not load export data: no export data for "go.temporal.io/sdk/activity".
This error occurs when running locally, within a Docker container, and on a CI machine when installing the binary file. The error persists with both golangci-lint versions 1.54.1 and 1.56.2.
I've come across similar questions regarding this error and have attempted several solutions, including:
go clean -modcache && go clean -cache
golangci-lint cache clean
go.mod
fileAny guidance or suggestions for resolving this issue would be greatly appreciated
Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation