cockroachdb / cockroachdb/cockroach

errcmp: need to remove reference to `ast.Object`

Open
#132,181 1 comment 0 reactions 0 assignees View on GitHub
A-linters C-bug
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

```
pkg/testutils/lint/passes/errcmp/errcmp.go:105:71: ast.Object has been deprecated since Go 1.22 and an alternative has been available since Go 1.0 (SA1019)
```

[Documentation link](https://pkg.go.dev/go/ast#Object)

> Deprecated: The relationship between Idents and Objects cannot be correctly computed without type information. For example, the expression T{K: 0} may denote a struct, map, slice, or array literal, depending on the type of T. If T is a struct, then K refers to a field of T, whereas for the other types it refers to a value in the environment.

> New programs should set the [parser.SkipObjectResolution] parser flag to disable syntactic object resolution (which also saves CPU and memory), and instead use the type checker [go/types](https://pkg.go.dev/go/types) if object resolution is desired. See the Defs, Uses, and Implicits fields of the [types.Info] struct for details

Jira issue: CRDB-42865

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.