On Friday, 6 August 2021 at 11:46:24 UTC+1 Konstantin Khomoutov wrote:

> On Fri, Aug 06, 2021 at 12:35:16AM -0700, Brian Candler wrote: 
>
> > The key point I just learned from #40276: 
> > "Vendor directories are not included in module zip files." 
> > 
> > I found this surprising because -mod=vendor is now the default (here 
> > <https://golang.org/ref/mod#vendoring>) - therefore, I expected the 
> vendor 
> > directory, if present in the source, always to be used unless explicitly 
> > disabled. 
>
> An interesting point regarding our particular case - which I sadly failed 
> to 
> mention - is that we do not use any module proxies for own internal 
> projects, 
> and the hostname of our GitLab instance is listed in the GONOPROXY 
> environment 
> variable, so technically `go install` did not download a "classic" module, 
> which is a ZIP archive file, but has rather performed the usual sequence 
> of 
> issuing a HTTP GET request with the "?go-get=1" query parameter followed 
> by a 
> shallow clone of the target Git repository. 
> Hence technically the "vendor" directory with its full contents was 
> available.


However according to #40276:

"Even when go connects directly to a repository instead of a
proxy, it still generates zip files so that builds work consistently no 
matter
how modules are fetched. Those zip files don't contain nested modules or 
vendor
directories."

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/9f4d48bd-fecf-46bf-aa85-5115f0513f53n%40googlegroups.com.

Reply via email to