You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
bundle can handle this edge-case better by deduplicating identical imports.
When a given import path is loaded twice:
import (
"same/import/path"
a "same/import/path"
)
It would need to load the package with import path "same/import/path" and find out the package name. If the name the same, then one of those imports can be safely dropped.
Note that the package name is not always equal to the last path element of its import path. For example:
Building on top of an existing CL should be more achievable via Gerrit. You can just rebase your commit on top of the commit corresponding to the existing CL, and git codereview mail should work to create a new CL corresponding to your own commit. (Although I haven't tried to do this using someone else's existing CL, so I can't guarantee it'll work.)
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Apr 2, 2021
NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Ran bundle (commit) on a package that contains both protobuf generated code and non-generated code. The generated code contains imports of the form:
Whereas the non-generated code have imports of the form:
What did you expect to see?
I would expect the imports to be rewritten as follows:
Or, alternatively:
What did you see instead?
Duplicate imports that cause compile error.
I have reported a companion issue here.
The text was updated successfully, but these errors were encountered: