Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: bad error message when import path does not contain a package #57473

Closed
aarzilli opened this issue Dec 27, 2022 · 2 comments
Closed

cmd/go: bad error message when import path does not contain a package #57473

aarzilli opened this issue Dec 27, 2022 · 2 comments
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@aarzilli
Copy link
Contributor

$ go version
go version devel go1.20-1eb0465fa5 Tue Dec 6 05:12:12 2022 +0000 linux/amd64

With go.mod:

module whatever

go 1.19

require github.com/aclements/go-z3 v0.0.0-20220809013456-4675d5f90ca5 // indirect

and main.go:

package main

import (
	_ "github.com/aclements/go-z3"
)

func main() {
}

running go build or go run says:

main.go:4:2: no required module provides package github.com/aclements/go-z3; to add it:
	go get github.com/aclements/go-z3

which is wrong and the suggested action is a noop. In reality the problem is that github.com/aclements/go-z3 is not a package.

@dmitshur
Copy link
Contributor

CC @bcmills, @matloob.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Dec 28, 2022
@dmitshur dmitshur added this to the Backlog milestone Dec 28, 2022
@bcmills
Copy link
Contributor

bcmills commented Jan 11, 2023

Duplicate of #46806

@bcmills bcmills marked this as a duplicate of #46806 Jan 11, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2023
@golang golang locked and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants