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

Remove the necessity for rewrite #27

Open
paralin opened this issue Dec 25, 2017 · 3 comments
Open

Remove the necessity for rewrite #27

paralin opened this issue Dec 25, 2017 · 3 comments

Comments

@paralin
Copy link

paralin commented Dec 25, 2017

The rewriting in GX seems like a hack to me. I'd prefer for readability to not have hashes in my imports when developing.

Why don't you just check the code out to it's original path inside a vendor tree?

$GOPATH/src/github.com/paralin/myproject/vendor/github.com/libp2p/go-libp2p-crypto

etc...

@whyrusleeping
Copy link
Owner

@paralin this works unless you have different versions of the same package. I've been meaning to add a command that does this for a while actually, could easily be an install option. If you're feeling up to it, PRs are definitely welcome ;)

@paralin
Copy link
Author

paralin commented Dec 28, 2017

@whyrusleeping That's an interesting thought about the multiple versions... Except I think most Go packages are designed to only be imported once, at a single version, unlike Node packages. Most projects wouldn't suffer from the loss of functionality.

My main concern is the corruption of the changelog in Git by having every single file touched whenever we update a vendored dependency. I know you have rewrite and unrewrite for this, but it makes sense to me to instead just not bother keeping the versions in the path after all.

I can make a PoC and/or a PR, will add it to my to-dos.

@whyrusleeping
Copy link
Owner

@paralin Yeah, I agree on the multiple versions thing. I don't think anyone would miss it (though in go-ipfs, we would currently run into an issue here because we have two versions of golang.org/x/sys for some reason)

I can make a PoC and/or a PR, will add it to my to-dos.

great! If you have any questions let me know. :)

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

2 participants