-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/gopls: implement "remove a parameter" refactoring #63534
Comments
Change https://go.dev/cl/532495 mentions this issue: |
Change https://go.dev/cl/534918 mentions this issue: |
Change https://go.dev/cl/535335 mentions this issue: |
Change https://go.dev/cl/535795 mentions this issue: |
The heuristic used to identify remaining uninlined calls by counting fails when the inlining operation changes the order of "original" calls, as may be the case with overlapping calls, following CL 535456. I spent around an hour trying to fix this properly (by tracking calls that were "just" inlined), but it's too hard because we must also track calls that had previously been inlined. It needs more theory and thought. For now, remove support for overlapping calls, as in all other cases the top-to-bottom counting heuristic should still work. For golang/go#63534 Change-Id: I59fe4aa5d20e56b0eb9dcbc01d29dd2ece082c17 Reviewed-on: https://go-review.googlesource.com/c/tools/+/535795 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Auto-Submit: Robert Findley <[email protected]>
Joint with Alan Donovan (CL 535455) :) For golang/go#63534 Change-Id: Ia4fdc617edf6699da285f56670a51efac1817834 Reviewed-on: https://go-review.googlesource.com/c/tools/+/534918 Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
This showed up when I used the inliner for removing parameters: we should be more precise about detecting the last use of a local var. A TODO is left to make this perfect, which will be done in a subsequent CL. For golang/go#63534 Change-Id: Id5c753f3e7ae51e07db1d29a59e82e51c6d5952c Reviewed-on: https://go-review.googlesource.com/c/tools/+/535335 Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Belatedly filing an issue to track a project I've been pursuing for the past two weeks: using the new inlining technology to implement change signature refactoring (#38028).
As a first instance of this, I'm implementing a refactoring to remove unused parameters, which is more tractable than other rewrites for reasons that I will explain in the commit message.
The text was updated successfully, but these errors were encountered: