On 13 Oct 2018, at 00:57, Ian Lance Taylor <i...@golang.org<mailto:i...@golang.org>> wrote:
So, as a general rule, it's a good idea for any package to enforce that it is imported under a particular import path. I strongly disagree with this point. In my experience, import path comments are used to enforce the usage of vanity domains, often with (as far as I can tell) no more justification than “I want people to see and use my vanity domain”. This has caused me practical problems more than once, most commonly when the vanity domain in question is not available (momentarily or permanently). The trivial change to just change my import paths to point to the “real” github repo then isn’t available as a fix - I need to fork, change, push and maintain that fork moving forwards. In each of these cases I’ve muttered angrily about how someones desire for vanity paths break my build for no good reason. What has never happened to me is that an import path comment has prevented an accidental double import of a package. Seeing more widespread use of a feature explicitly designed to break builds would make me sad. Certainly there are good cases where the build should be broken, but that’s not my experience in how this feature is being used. //jb -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.