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

import path question #11

Open
Akagi201 opened this issue Aug 28, 2017 · 6 comments
Open

import path question #11

Akagi201 opened this issue Aug 28, 2017 · 6 comments
Labels

Comments

@Akagi201
Copy link

Akagi201 commented Aug 28, 2017

I want to use libkv for now.

Could I use import "github.com/abronan/libkv" now?

I hope this repo could work completely and all path is correct.

@mthenw
Copy link

mthenw commented Aug 28, 2017

Right now it's a bit limited because imports in this package point to original docker/libkv package. The best way right now is to use it with package manager that has support for aliasing (like glide).

@abronan
Copy link
Owner

abronan commented Aug 28, 2017

@Akagi201 I agree that we should do something about it, still thinking about the best way to handle this. There are two possibilities:

  • Just rely on aliasing with package managers supporting it, like Glide as mentioned above (I think this is a simple example of how to do it).

    • Upside: there is not much to change in this case, no need to rename the import paths
    • Downsides:
      • Not every package manager support the option of aliasing and pointing to a fork without dirty tricks.
      • It's not very welcoming to new contributions as the process will be quite hard to submit PRs (add the fork as a remote to the main repository folder, fetch changes, create new branch from abronan/master or rebase on top of abronan/master)
  • Create a new repository with a new name (to mark a clear separation from the upstream repository), renaming the import paths along the way.

    • Upsides:
      • Easy to do, no brainer solution
      • No convoluted process to submit a contribution
    • Downsides:
      • Somewhat dirty, because we'll have to rename import paths every time we carry changes from the upstream repository. We should expect contributions to flow to the upstream repository for a while (because it is very visible under the docker GitHub org).

@mthenw
Copy link

mthenw commented Aug 28, 2017

Aliasing is a hacky solution and, even though some of the package managers support that, dep (which will likely become official package manager) will not support it (golang/dep#191).

rename import paths every time we carry changes from the upstream repository

That's true but it's only a simple, one-time operation which simplifies usage and contribution.

@mthenw
Copy link

mthenw commented Sep 15, 2017

Hey, any thoughts here? :)

@vcastellm
Copy link

dep actually supports source override

@vcastellm
Copy link

@abronan Should we switch to https://github.com/abronan/valkeyrie?

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

No branches or pull requests

4 participants