-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fails to correctly handle multi-alias imports. #45
Comments
This has come up again in the Go 1.15 standard library. I will exclude p.s. I wonder if it was intentional to add a duplicate |
@dave Nope that wasn't intentional. I think it should keep the import that golang/go@6f3a951 added and remove the blank identifier import. Thanks for pointing that out. |
Updates dave/dst#45. Change-Id: I165e6b3d002407a33908bf90a66ad01f8003b260 Reviewed-on: https://go-review.googlesource.com/c/go/+/250497 TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]>
Updates dave/dst#45. Change-Id: I165e6b3d002407a33908bf90a66ad01f8003b260 Reviewed-on: https://go-review.googlesource.com/c/go/+/250497 TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]>
When
dst
automatically manages the imports block, the imports are internally keyed by path. This incorrectly assumes that only one import for each package path is possible. Although very rare, it is possible to add the same package multiple times with different aliases.See: golang/go@3409ce3
In
TestLoadStdLibAll
we test that the entire standard library is able to be parsed and rebuilt including management of the imports block. This test fails for the two filesserver.go
andrequest.go
innet/http
because of this.In order to handle this gracefully would involve a major rewrite of the import management code which is the most complex part of
dst
. For now I've skipped theTestLoadStdLibAll
for these two files.Re: @dmitshur
The text was updated successfully, but these errors were encountered: