Just to want let people who reached this post (#1 search result) know (like 
me), I think this problem has been addressed (since 2015 I think), more 
documentation 
here: 
https://github.com/golang/go/blob/c20e54533ea49ca68640d9a59c9ed935b27da8e5/src/cmd/go/internal/load/pkg.go#L1183

Helin

On Sunday, December 28, 2014 at 2:45:54 PM UTC-8, James Graves wrote:
>
> Hi All,
>
> I'm seeing an issue with rebuilding a library when changes are made to the 
> source code in a separate library.
>
> Suppose there are two directories in my GOPATH: 
>
> export GOPATH=${HOME}/vendor:${HOME}/golang
>
> There's a library in vendor/src/mylib/file1.go that is imported by 
> golang/src/myapp/main.go.
>
> Running 'go build -i' in golang/src/myapp will build mylib.a and store it 
> in vendor/pkg/linux_amd64, and then build the main application.  So far so 
> good.
>
> Now, let's suppose there's a change to file1.go, and I again run 'go build 
> -i' in golang/src/myapp.
>
> The system will not re-build the library mylib.a.  Any changes to files in 
> the vendor/ directory don't seem to trigger rebuilding the library binary.
>
> Is this expected behavior?  Do I instead need to always run 'go install' 
> in the vendor/src/mylib directory?
>
> Thanks,
>
> James Graves
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to