golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.92k stars 17.65k forks source link

import/path: issue title #69851

Closed OcheOps closed 3 weeks ago

OcheOps commented 3 weeks ago

Go version

go version go1.23.2 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/bpur/.cache/go-build'
GOENV='/home/bpur/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/bpur/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/bpur/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/var/lib/snapd/snap/go/10730'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/var/lib/snapd/snap/go/10730/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.2'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/bpur/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='0'
GOMOD='/home/bpur/playlist-exporter-spotify-to-YTM/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4117032698=/tmp/go-build -gno-record-gcc-switches'

What did you do?

'm building something for spotify to ytm playlist exporter everything works fine on the compiler till this error comes up

What did you see happen?

[{
    "resource": "/var/lib/snapd/snap/go/10730/src/maps/iter_test.go",
    "owner": "_generated_diagnostic_collection_name_#2",
    "code": {
        "value": "InvalidRangeExpr",
        "target": {
            "$mid": 1,
            "path": "/golang.org/x/tools/internal/typesinternal",
            "scheme": "https",
            "authority": "pkg.go.dev",
            "fragment": "InvalidRangeExpr"
        }
    },
    "severity": 8,
    "message": "cannot range over All(m) (value of type iter.Seq2[int, int])",
    "source": "compiler",
    "startLineNumber": 19,
    "startColumn": 21,
    "endLineNumber": 19,
    "endColumn": 27
},{
    "resource": "/var/lib/snapd/snap/go/10730/src/maps/iter_test.go",
    "owner": "_generated_diagnostic_collection_name_#2",
    "code": {
        "value": "InvalidRangeExpr",
        "target": {
            "$mid": 1,
            "path": "/golang.org/x/tools/internal/typesinternal",
            "scheme": "https",
            "authority": "pkg.go.dev",
            "fragment": "InvalidRangeExpr"
        }
    },
    "severity": 8,
    "message": "cannot range over Keys(m) (value of type iter.Seq[int])",
    "source": "compiler",
    "startLineNumber": 42,
    "startColumn": 18,
    "endLineNumber": 42,
    "endColumn": 25
},{
    "resource": "/var/lib/snapd/snap/go/10730/src/maps/iter_test.go",
    "owner": "_generated_diagnostic_collection_name_#2",
    "code": {
        "value": "InvalidRangeExpr",
        "target": {
            "$mid": 1,
            "path": "/golang.org/x/tools/internal/typesinternal",
            "scheme": "https",
            "authority": "pkg.go.dev",
            "fragment": "InvalidRangeExpr"
        }
    },
    "severity": 8,
    "message": "cannot range over Values(m) (value of type iter.Seq[int])",
    "source": "compiler",
    "startLineNumber": 62,
    "startColumn": 18,
    "endLineNumber": 62,
    "endColumn": 27
},{
    "resource": "/var/lib/snapd/snap/go/10730/src/maps/iter.go",
    "owner": "_generated_diagnostic_collection_name_#2",
    "code": {
        "value": "InvalidRangeExpr",
        "target": {
            "$mid": 1,
            "path": "/golang.org/x/tools/internal/typesinternal",
            "scheme": "https",
            "authority": "pkg.go.dev",
            "fragment": "InvalidRangeExpr"
        }
    },
    "severity": 8,
    "message": "cannot range over seq (variable of type iter.Seq2[K, V])",
    "source": "compiler",
    "startLineNumber": 51,
    "startColumn": 20,
    "endLineNumber": 51,
    "endColumn": 23
}]

What did you expect to see?

Not this issue

gabyhelp commented 3 weeks ago

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

randall77 commented 3 weeks ago

Could you describe in more detail what you did? What commands you ran, the entire output, etc.

That error doesn't look like it is coming from the compiler.

OcheOps commented 3 weeks ago

I'll just link to the project from here is that okay?

OcheOps commented 3 weeks ago

because I can't really explain it per se the application still works but it keeps popping up

cherrymui commented 3 weeks ago

Please share the exact source code you're building, and the exact commands you run, if you believe this is a Go compiler bug (which doesn't look so to me).

If you needs help debug your own code, please see https://go.dev/wiki/Questions . Thanks.

OcheOps commented 3 weeks ago

https://github.com/OcheOps/playlist-exporter-spotify-to-YTM.git

OcheOps commented 3 weeks ago

https://github.com/OcheOps/playlist-exporter-spotify-to-YTM.git

it pops iter.go whenever i want to run it and it runs fine with go run main.go

randall77 commented 3 weeks ago

it pops iter.go

What is "it" in this sentence?

OcheOps commented 3 weeks ago

it pops iter.go

What is "it" in this sentence?

Vscode, I think I have seen the solution, so I have multiple versions of Go for some weird reason and it was using Go 1.22 instead of 1.23 so I just changed the path and it doesn't pop out the iter.go file, I'm so sorry for wasting your time I thought it was a legit issue really sorry for wasting your time

cherrymui commented 3 weeks ago

Thanks.