Re: [go-nuts] Re: When using 'go mod vendor' why are there lots of files missing?
> I think it's worth raising an issue for this. Vendoring should copy the whole > repo. This has been raised before (https://github.com/golang/go/issues/26366 amongst others). Vendoring is not defined to copy the whole repo: $ go help mod vendor usage: go mod vendor [-v] Vendor resets the main module's vendor directory to include all packages needed to build and test all the main module's packages. It does not include test code for vendored packages. An alternative is to "vendor" the modules themselves: https://github.com/myitcv/go-modules-by-example/blob/master/012_modvendor/README.md -- 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.
[go-nuts] Re: When using 'go mod vendor' why are there lots of files missing?
I think it's worth raising an issue for this. Vendoring should copy the whole repo. On Monday, 24 September 2018 07:43:24 UTC+1, Justin Israel wrote: > > > > On Tuesday, September 18, 2018 at 8:58:01 AM UTC+12, Frits van Bommel > wrote: >> >> According to the help text that's the intended behavior: >> >> usage: go mod vendor [-v] >>> >>> Vendor resets the main module's vendor directory to include all packages >>> needed to build and test all the main module's packages. >>> It does not include test code for vendored packages. >>> >>> The -v flag causes vendor to print the names of vendored >>> modules and packages to standard error. >>> >> > > This just bit me, because it isn't copying required cc source files from a > parent directory of the package, leading to the cgo library not being able > to build: > > library > cpp/ > source1.cpp > go/ > lib.go > inc.cpp > > For better or worse, inc.cpp has had '#include "../cpp/source1.cpp"' in > it, and it has been working under glide as the whole project gets vendored. > But now under "go mod vendor" it throws away the non-go files leading to > missing cpp files. Is this intended behaviour, expecting that the Go source > should have everything it needs as siblings or children in the directory > structure? > > -- 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.
[go-nuts] Re: When using 'go mod vendor' why are there lots of files missing?
On Tuesday, September 18, 2018 at 8:58:01 AM UTC+12, Frits van Bommel wrote: > > According to the help text that's the intended behavior: > > usage: go mod vendor [-v] >> >> Vendor resets the main module's vendor directory to include all packages >> needed to build and test all the main module's packages. >> It does not include test code for vendored packages. >> >> The -v flag causes vendor to print the names of vendored >> modules and packages to standard error. >> > This just bit me, because it isn't copying required cc source files from a parent directory of the package, leading to the cgo library not being able to build: library cpp/ source1.cpp go/ lib.go inc.cpp For better or worse, inc.cpp has had '#include "../cpp/source1.cpp"' in it, and it has been working under glide as the whole project gets vendored. But now under "go mod vendor" it throws away the non-go files leading to missing cpp files. Is this intended behaviour, expecting that the Go source should have everything it needs as siblings or children in the directory structure? -- 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.
[go-nuts] Re: When using 'go mod vendor' why are there lots of files missing?
According to the help text that's the intended behavior: usage: go mod vendor [-v] > > Vendor resets the main module's vendor directory to include all packages > needed to build and test all the main module's packages. > It does not include test code for vendored packages. > > The -v flag causes vendor to print the names of vendored > modules and packages to standard error. > -- 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.