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/link: dead importcycle code #57400

Closed
jquirke opened this issue Dec 20, 2022 · 3 comments
Closed

cmd/link: dead importcycle code #57400

jquirke opened this issue Dec 20, 2022 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge Proposal
Milestone

Comments

@jquirke
Copy link
Contributor

jquirke commented Dec 20, 2022

Remove dead code importcycles() function.

This was originally introduced in 2011 in CL https://codereview.appspot.com/4812053 for Issue 2052.

All consumers of this code were removed in a cleanup in 2016 https://go-review.googlesource.com/c/go/+/21782 and it performs no function whatsoever.

Furthermore:

  • The compiler itself provides some protection against import cycles
  • The linker already has import cycle detection in postorder (
    func postorder(libs []*sym.Library) []*sym.Library {
    )
@gopherbot gopherbot added this to the Proposal milestone Dec 20, 2022
@jquirke jquirke changed the title proposal: cmd/link remove unused importcycle path proposal: cmd/link remove dead importcycle code Dec 20, 2022
@gopherbot
Copy link

Change https://go.dev/cl/458436 mentions this issue: cmd/link: remove dead importcycles code

@mdlayher mdlayher changed the title proposal: cmd/link remove dead importcycle code cmd/link: dead importcycle code Dec 20, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 20, 2022
jquirke added a commit to jquirke/go that referenced this issue Dec 20, 2022
The importcycles method has not been useful since April 2016 when a
large code deletion was performed.

The compiler itself provides some protection against import cycles, and
the linker now does import cycle detection in linksetup -> postorder.

For golang#57400
@cherrymui
Copy link
Member

Thanks for spotting this. For things like this, you can just send a CL without filing an issue. Thanks.

@cherrymui cherrymui closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2022
jquirke added a commit to jquirke/go that referenced this issue Dec 26, 2022
The importcycles method has not been useful since April 2016 when a
large code deletion was performed.

The compiler itself provides some protection against import cycles, and
the linker now does import cycle detection in linksetup -> postorder.

For golang#57400
jquirke added a commit to jquirke/go that referenced this issue Dec 26, 2022
The importcycles method has not been useful since April 2016 when a
large code deletion was performed.

The compiler itself provides some protection against import cycles, and
the linker now does import cycle detection in linksetup -> postorder.

For golang#57400
@gopherbot
Copy link

Change https://go.dev/cl/459475 mentions this issue: cmd/link: remove importcycles function

gopherbot pushed a commit that referenced this issue Jan 24, 2023
The importcycles method has not been useful since April 2016 when a large code deletion was performed.

The compiler itself provides some protection against import cycles, and the linker does import cycle detection in linksetup -> postorder.

For #57400

Change-Id: I3095bdb3f16a82ba25681bf4a20ceaa3c9613921
GitHub-Last-Rev: 87a4615
GitHub-Pull-Request: #57462
Reviewed-on: https://go-review.googlesource.com/c/go/+/459475
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
@golang golang locked and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge Proposal
Projects
None yet
Development

No branches or pull requests

3 participants