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/api: make non-importable [1.20 backport] #62070

Closed
gopherbot opened this issue Aug 16, 2023 · 2 comments
Closed

cmd/api: make non-importable [1.20 backport] #62070

gopherbot opened this issue Aug 16, 2023 · 2 comments
Labels
CherryPickApproved Used during the release process for point releases release-blocker
Milestone

Comments

@gopherbot
Copy link

@rsc requested issue #62069 to be considered for backport to the next 1.20 minor release.

@gopherbot please backport

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Aug 16, 2023
@gopherbot gopherbot added this to the Go1.20.8 milestone Aug 16, 2023
@rsc rsc changed the title cmd/go: import of main package not diagnosed [1.20 backport] cmd/api: make non-importable [1.20 backport] Aug 16, 2023
@rsc rsc added release-blocker CherryPickApproved Used during the release process for point releases labels Aug 16, 2023
@gopherbot
Copy link
Author

Change https://go.dev/cl/520060 mentions this issue: [release-branch.go1.20] cmd/api: rename api.go to main_test.go

@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Aug 16, 2023
gopherbot pushed a commit that referenced this issue Aug 17, 2023
This makes cmd/api no longer an importable package.
In CL 453258 I forgot that there was no direct prohibition
on importing packages from cmd - we just rely on the
fact that cmd/* is all package main and everything else
is cmd/internal.

Fixes #62069.
Fixes #62070.

Change-Id: Ifed738d333b40663f85eca8f83025fcea5df89a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/520038
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/520060
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
@gopherbot
Copy link
Author

Closed by merging 14e3c73 to release-branch.go1.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants