bazel-contrib / bazel-contrib/rules_go
nogo 1.18/1.19
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 760
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 12
Description
### What version of rules_go are you using?
v0.33.0
### What version of gazelle are you using?
v0.26.0
### What version of Bazel are you using?
v5.2.0
### Does this issue reproduce with the latest releases of all the above?
Y
### What operating system and processor architecture are you using?
Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
### What did you do?
nogo is working with the current config and `gov1.17.11`:
```json
{
"shadow": {
"exclude_files": {
"external/.*": "Third party code"
}
},
"unsafeptr": {
"exclude_files": {
"external/org_golang_x_sys/.*": "Third party code"
}
},
"unreachable": {
"exclude_files": {
"external/org_golang_google_protobuf/.*": "Third party code"
}
},
"copylocks": {
"exclude_files": {
"external/org_golang_google_protobuf/.*": "Third party code"
}
},
"composites": {
"exclude_files": {
"external/org_golang_google_protobuf/.*": "Third party code",
"external/com_github_bazelbuild_buildtools/.*": "Third party code"
}
}
}
```
switching to `gov1.18.3` results in:
```bash
compilepkg: nogo: errors found by nogo during build-time code analysis:
analyzer "asmdecl" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "assign" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "atomicalign" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "bools" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "buildssa" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "buildtag" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "ctrlflow" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "deepequalerrors" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "errorsas" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "httpresponse" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "ifaceassert" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "loopclosure" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "lostcancel" failed: failed prerequisites: ctrlflow@google.golang.org/protobuf/internal/detrand
analyzer "nilfunc" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "nilness" failed: failed prerequisites: buildssa@google.golang.org/protobuf/internal/detrand
analyzer "pkgfact" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "printf" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "shadow" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "shift" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "sortslice" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "stdmethods" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "stringintconv" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "testinggoroutine" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "tests" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "unmarshal" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "unsafeptr" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
analyzer "unusedresult" failed: analysis skipped due to type-checking error: external/org_golang_google_protobuf/internal/detrand/rand.go:13:2: could not import encoding/binary (cannot import "encoding/binary" (unknown iexport format version 2), export data is newer version - update tool)
```
is there any information about that? would like to use go1.18.x
Thanks
Contributor guide
Research direction
Reproduce the failure with rules_go v0.33.0, Gazelle v0.26.0, Bazel v5.2.0, and Go 1.18.3, focusing on nogo's analysis of external/org_golang_google_protobuf/internal/detrand/rand.go and its import of encoding/binary. Compare the Go 1.17.11 and Go 1.18.3 results, then determine what change is needed for the build to complete without the export-format error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100