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

support for vanity imports #8

Open
mkmik opened this issue May 6, 2016 · 6 comments
Open

support for vanity imports #8

mkmik opened this issue May 6, 2016 · 6 comments

Comments

@mkmik
Copy link

mkmik commented May 6, 2016

e.g. https://github.com/sourcegraph/appdash should go in vendor/sourcegraph.com/sourcegraph/appdash

perhaps another flag that can force the dir location (name doesn't)

@brettlangdon
Copy link
Owner

@mmikulicic thanks for the suggestion, seems do-able. My Apologies, I might not be able to get to this right away, worst case early next week.

I have two thoughts, we can either add another switch, similar to --prefix, which just overrides the directory where it is cloned to, e.g. git vendor add --dir sourcegraph.com/sourcegraph/appdash (this will still honor the --prefix of vendor/). Or maybe --namespace or something is a better name for it?

Or.. maybe we can just add as an additional positional argument? git vendor add <name> <repo> [<version> [<dir>]] so we could have git vendor add appdash https://github.com/sourcegraph/appdash master vendor/sourcegraph.com/sourcegraph/appdash.

Thoughts?

@mkmik
Copy link
Author

mkmik commented May 6, 2016

don't know what the best name for the flag would be; I made a local change to the script that just does:

    # dir="$prefix/$(echo "$repository" | sed -E 's/^[a-zA-Z]+((:\/\/)|@)//' | sed 's/:/\//' | sed -E 's/\.git$//')"
    dir="$prefix/$name"

and it does what need but I guess it's better to not overload the name for that as well, given that people might use name for something else

@brettlangdon
Copy link
Owner

yeah, originally I meant for the name just as a human friendly way to display a dependencies information, and to make updates easier, since you can use the short name instead of the full repo path.

ok, but it seems like flag might be best here. I'll think on what the name should be, I feel like I am blanking on the appropriate term for the path/namespace is.

@mkmik
Copy link
Author

mkmik commented May 6, 2016

package?

On Fri, May 6, 2016, 17:40 Brett Langdon notifications@github.com wrote:

yeah, originally I meant for the name just as a human friendly way to
display a dependencies information, and to make updates easier, since you
can use the short name instead of the full repo path.

ok, but it seems like flag might be best here. I'll think on what the name
should be, I feel like I am blanking on the appropriate term for the
path/namespace is.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8 (comment)

@brettlangdon
Copy link
Owner

yeah, that could work.

@tv42
Copy link

tv42 commented Dec 26, 2017

The right name is import path. https://golang.org/ref/spec#Import_declarations

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

3 participants