Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With this scheme libraries can vendor their dependencies, if necessary.


Can you reference the part of the proposal that states this? I'm reading the following points:

> $GOPATH/src/foo will be imported as foo by non-main package $GOPATH/src/mypkg/p.

> $GOPATH/src/mypkg/external/foo will be imported as foo by a non-main package p anywhere, when p is being built as a dependency of command $GOPATH/src/mypkg/c.

It seems to me this is saying that libraries will use external packages only when built as a dependency of a main package. Again, this means library authors are out of luck.


There are two proposals.

You seem to refer to the Google doc proposal that was linked to in the first message of the mailing list thread several months ago.

The link on hackernews points to an answer by Google that was written just a few hours ago that instead "propose" the following:

> If there is a source directory d/vendor, then, when compiling a source file within the subtree rooted at d, import "p" is interpreted as import "d/vendor/p" if that exists.


Ah, thanks.


You're pushing the Go ecosystem in this direction:

    https://spot.livejournal.com/312320.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: