Inliner enhancement - choose better local names when renaming imports
66 views
Skip to first unread message
Gavin Lam
unread,
Aug 13, 2025, 1:49:08 PMAug 13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
I noticed #63352 requests improvements to the inliner by choosing better local names when renaming imports.
I've opened #74965 outlining a proposal and potential strategies for generating more meaningful local names. I plan to work on implementing this enhancement and submit a PR.
What are your thoughts?
Potential strategies:
Try PkgName (unchanged).
Try the local alias of the callee. (There is a todo comment in inline.go#525)
Try PkgName + "pkg". For example, path becomes pathpkg.