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

Case-conflict between canonical repo address and go imports #591

Open
liggitt opened this issue May 7, 2019 · 2 comments
Open

Case-conflict between canonical repo address and go imports #591

liggitt opened this issue May 7, 2019 · 2 comments

Comments

@liggitt
Copy link

liggitt commented May 7, 2019

The github.com/Microsoft org was just renamed to github.com/microsoft

This means that the canonical github repo address now conflicts with canonical go import packages (for example, "github.com/Microsoft/hcsshim/internal/hcserror", as referenced from https://github.com/microsoft/hcsshim/blob/master/hcsshim.go#L9)

It is now very easy for downstream consumers that depend on leaf packages only (which don't import any other upper-case "github.com/Microsoft/..." packages) to accidentally clone and add imports to lower-case "github.com/microsoft/..." packages. This will work in isolation, but as soon as their library has to coexist in a build with any other component which used the canonical "github.com/Microsoft/..." imports, builds will start failing.

(This was possible before, but way harder to do accidentally, since all the links and clone commands from github agreed with the canonical go import packages)

Context:

Cautionary tale:

Also filed in the other Microsoft dependency we use in Kubernetes:
microsoft/go-winio#135

Please consider reverting the Microsoft -> microsoft rename.

cc @jeffwilcox

@liggitt
Copy link
Author

liggitt commented May 7, 2019

(hoisting from https://twitter.com/liggitt/status/1125879048658403329 so it doesn't get lost)

If the case change is here to stay, some things that would help a lot:

  1. guidance and checks to ensure all the go repos under the org agree and continue to use Microsoft
  2. example go get commands in the READMEs of all the go repos to guide consumers
  3. add canonical import paths with the correct upper case (https://golang.org/doc/go1.4#canonicalimports) to prevent accidental use of the wrong case downstream

@jstarks
Copy link
Member

jstarks commented May 9, 2019

Thanks Jordan. These are good suggestions. We are discussing internally what we want to do across Microsoft's go repos so that we can have a consistent approach.

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

Successfully merging a pull request may close this issue.

2 participants