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

Potential import collision: import path should be "github.com/rdumont/assistdog", not "github.com/hellomd/assistdog" #107

Open
KateGo520 opened this issue Aug 10, 2020 · 1 comment

Comments

@KateGo520
Copy link

Background

I find that github.com/rdumont/assistdog and github.com/hellomd/assistdog coexist in this repo:
https://github.com/multiformats/multiaddr/blob/master/test/go.mod (Line 10 & 5)

github.com/hellomd/assistdog v0.0.0-20171107191847-c91d7a54538c 
github.com/rdumont/assistdog v0.0.0-20171107191847-c91d7a54538c // indirect 

That’s because the assistdog has already renamed it’s import path from "github.com/hellomd/assistdog" to "github.com/rdumont/assistdog". When you used the old path "github.com/hellomd/assistdog" to import assistdog, go will reintroduces assistdog through the import statements "import github.com/rdumont/assistdog/…" in the go source file of assistdog.

https://github.com/rdumont/assistdog/blob/c91d7a54538c6d66d976d4e71ad31b8661eddea3/assist.go#L11

package assistdog
import (
	"github.com/DATA-DOG/godog/gherkin"
	"github.com/rdumont/assistdog/defaults"
	…
) 

The "github.com/rdumont/assistdog" and "github.com/hellomd/assistdog" are the same repos. This will work in isolation, bring about potential risks and problems.

Solution

Replace all the old import paths, change "github.com/hellomd/assistdog" to "github.com/rdumont/assistdog ".
Where did you import it: https://github.com/multiformats/multiaddr/search?q=hellomd%2Fassistdog&unscoped_q=hellomd%2Fassistdog

@KateGo520
Copy link
Author

@olizilla @aratz-lasa Could you help me review this issue? Thx :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant