<#18193 golangci-lint failure with Go v1.20> Issue...
# github-notifications
q
#18193 golangci-lint failure with Go v1.20 Issue created by tdyas The unit test for the
golangci-lint
linter fails on
main
when invoked with Go v1.20 due to an attempt to lint the Go SDK sources.
GOROOT
is
/Users/X/lib/go
. Command:
./pants -ldebug test src/python/pants/backend/go/lint/golangci_lint/rules_integration_test.py -- -vv -k test_passing
Relevant error log (with username redacted):
Copy code
21:19:00.64 [ERROR] Completed: Lint with golangci-lint -  failed (exit code 1).
../../../Users/X/lib/go/src/runtime/debuglog.go:296:20: StringData not declared by package unsafe (typecheck)
	strData := unsafe.StringData(x)
	                  ^
../../../Users/X/lib/go/src/runtime/heapdump.go:159:37: StringData not declared by package unsafe (typecheck)
	dumpmemrange(unsafe.Pointer(unsafe.StringData(s)), uintptr(len(s)))
	                                   ^
../../../Users/X/lib/go/src/runtime/heapdump.go:202:32: StringData not declared by package unsafe (typecheck)
		dwrite(unsafe.Pointer(unsafe.StringData(pkgpath)), uintptr(len(pkgpath)))
		                             ^
../../../Users/X/lib/go/src/runtime/proc.go:658:16: String not declared by package unsafe (typecheck)
			s := unsafe.String(p, findnull(p))
			            ^
../../../Users/X/lib/go/src/runtime/string.go:105:17: String not declared by package unsafe (typecheck)
		return unsafe.String((*byte)(p), 1)
		              ^
../../../Users/X/lib/go/src/runtime/string.go:115:16: String not declared by package unsafe (typecheck)
	return unsafe.String((*byte)(p), n)
	              ^
../../../Users/X/lib/go/src/internal/fmtsort/sort.go:182:1: missing return (typecheck)
}
^
../../../Users/X/lib/go/src/io/pipe.go:22:4: a.Lock undefined (type *onceError has no field or method Lock) (typecheck)
	a.Lock()
	  ^
../../../Users/X/lib/go/src/io/pipe.go:23:10: a.Unlock undefined (type *onceError has no field or method Unlock) (typecheck)
	defer a.Unlock()
	        ^
../../../Users/X/lib/go/src/io/pipe.go:30:4: a.Lock undefined (type *onceError has no field or method Lock) (typecheck)
	a.Lock()
	  ^
../../../Users/X/lib/go/src/io/pipe.go:31:10: a.Unlock undefined (type *onceError has no field or method Unlock) (typecheck)
	defer a.Unlock()
	        ^
../../../Users/X/lib/go/src/os/file_unix.go:416:15: invalid operation: cannot compare d.info != nil (operator != not defined on untyped nil) (typecheck)
	if d.info != nil {
	             ^
../../../Users/X/lib/go/src/syscall/syscall_unix.go:63:4: m.Lock undefined (type *mmapper has no field or method Lock) (typecheck)
	m.Lock()
	  ^
../../../Users/X/lib/go/src/syscall/syscall_unix.go:64:10: m.Unlock undefined (type *mmapper has no field or method Unlock) (typecheck)
	defer m.Unlock()
	        ^
../../../Users/X/lib/go/src/syscall/syscall_unix.go:76:4: m.Lock undefined (type *mmapper has no field or method Lock) (typecheck)
	m.Lock()
	  ^
../../../Users/X/lib/go/src/syscall/syscall_unix.go:77:10: m.Unlock undefined (type *mmapper has no field or method Unlock) (typecheck)
	defer m.Unlock()
	        ^
pantsbuild/pants
u