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/go/ssa: don't rename go/constant import to exact #26522

Closed
mvdan opened this issue Jul 21, 2018 · 2 comments
Closed

x/tools/go/ssa: don't rename go/constant import to exact #26522

mvdan opened this issue Jul 21, 2018 · 2 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Jul 21, 2018

This leads to confusing godoc entries, like:

func NewConst(val exact.Value, typ types.Type) *Const

It seems to me like this is a remnant from when go/constant was code.google.com/p/go.tools/go/exact. Is there a reason why we're still using the old name? Especially now that the package is part of the standard library, I see no reason to avoid it.

The name doesn't seem to be used for any purpose in the ssa package either.

cc @griesemer @alandonovan

@mvdan mvdan added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jul 21, 2018
@gopherbot gopherbot added this to the Unreleased milestone Jul 21, 2018
@mvdan
Copy link
Member Author

mvdan commented Jul 21, 2018

This seems to come from 542ffc7, and multiple packages are still affected:

$ git grep 'exact "'
cmd/godex/print.go:     exact "go/constant"
cmd/guru/describe.go:   exact "go/constant"
cmd/stringer/stringer.go:       exact "go/constant"
go/internal/gcimporter/gcimporter.go:   exact "go/constant"
go/pointer/reflect.go:  exact "go/constant"
go/ssa/builder.go:      exact "go/constant"
go/ssa/const.go:        exact "go/constant"
go/ssa/interp/ops.go:   exact "go/constant"
go/ssa/source_test.go:  exact "go/constant"
go/ssa/ssa.go:  exact "go/constant"
refactor/eg/eg_test.go: exact "go/constant"
refactor/eg/match.go:   exact "go/constant"

I imagine this made the transition simpler, but I'd also imagine that it is fine to clean this up now.

@gopherbot
Copy link

Change https://golang.org/cl/128998 mentions this issue: x/tools: remove old renaming imports of go/constant as exact

SOF3 pushed a commit to SOF3/go-stringer-inverse that referenced this issue Aug 23, 2018
Fixes golang/go#26522

Change-Id: Ie8184a358f11bc7ad855e0eeb964c29848d2263e
Reviewed-on: https://go-review.googlesource.com/128998
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
SOF3 pushed a commit to SOF3/go-stringer-inverse that referenced this issue Aug 23, 2018
Fixes golang/go#26522

Change-Id: Ie8184a358f11bc7ad855e0eeb964c29848d2263e
Reviewed-on: https://go-review.googlesource.com/128998
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

2 participants