Request: better namespacing for vendor/ directory

The `vendor` directory that go mod targets for caching third party code, is unfortunately not programming language agnostic.

When Go and Rust are used in tandem, then go mod becomes confused. In situations where only Rust vendoring is applied, then go mod sees a vendor directory, assumes it is Go code, then aborts.

Please migrate to a language specific directory name, such as vendor-go.

As a workaround, use cargo primitives to customize the Rust vendor directory name.

Note that go mod currently lacks the ability to customize this name.

Cross post to Rust forum topic: Request: better namespacing for vendor/ directory - The Rust Programming Language Forum

1 Like

Again, you’ll get better response if you file that at Issues · golang/go · GitHub . I’ve never seen any indication that anyone from the Go team visits this site.

To be fair, it’s already solved on the cargo side of things. Cargo supports vendoring into arbitrary folders:

… which totally solves this problem. Also the idea that you would share a single top-level folder for a combination Rust/Go project is… interesting to say the least. I would contend that you should think about your folder/project structure a bit more and this is a non-issue.