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

x/tools/internal/typesinternal: invalid linkname #60330

Closed
egonelbre opened this issue May 21, 2023 · 1 comment
Closed

x/tools/internal/typesinternal: invalid linkname #60330

egonelbre opened this issue May 21, 2023 · 1 comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@egonelbre
Copy link
Contributor

https://github.com/golang/tools/blob/07293620cd9cc9bc10c20dfc853c406da3dcab72/internal/typesinternal/types.go#L60

While discussing linkname in #darkarts in Gophers Slack, this code came up. It looks like the newEncoderFor func doesn't exist anymore.

// NewObjectpathEncoder returns a function closure equivalent to
// objectpath.For but amortized for multiple (sequential) calls.
// It is a temporary workaround, pending the approval of proposal 58668.
//
//go:linkname NewObjectpathFunc golang.org/x/tools/go/types/objectpath.newEncoderFor
func NewObjectpathFunc() func(types.Object) (objectpath.Path, error)

newEncoderFor was removed in golang/tools@a5338c9 (CC @adonovan)

I'm not aware that it's causing any problems. I'm guessing NewObjectpathFunc needs to be removed as well.

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label May 21, 2023
@gopherbot gopherbot added this to the Unreleased milestone May 21, 2023
@gopherbot
Copy link

Change https://go.dev/cl/496875 mentions this issue: internal/typesinternal: remove NewObjectpathFunc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants