libkv icon indicating copy to clipboard operation
libkv copied to clipboard

import path question

Open Akagi201 opened this issue 8 years ago • 6 comments

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.

Akagi201 avatar Aug 28 '17 07:08 Akagi201

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).

mthenw avatar Aug 28 '17 09:08 mthenw

@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).

abronan avatar Aug 28 '17 13:08 abronan

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 (https://github.com/golang/dep/issues/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 avatar Aug 28 '17 14:08 mthenw

Hey, any thoughts here? :)

mthenw avatar Sep 15 '17 13:09 mthenw

dep actually supports source override

vcastellm avatar Nov 30 '17 21:11 vcastellm

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

vcastellm avatar Nov 30 '17 22:11 vcastellm