Skip to content

typecheck: lacks support of import path with version suffix (gopkg.in/yaml.v3) #4691

@dolmen

Description

@dolmen

Welcome

Description of the problem

The typecheck phase fails at resolving import path gopkg.in/yaml.v3 as providing the symbol yaml. The Go 1.22 compiler has no problem with that import path.

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.57.2 built with go1.22.1 from 77a8601 on 2024-03-28T18:39:06Z

A minimal reproducible example

$ cat x.go
package main

import "gopkg.in/yaml.v3"

var _ = yaml.NewEncoder
$ golangci-lint run x.go
x.go:5:9: undefined: yaml (typecheck)
var _ = yaml.NewEncoder
        ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions