Re: [go-nuts] Re: Best practices for upgrading go with existing GOPATH?
Aha, now I understand. I managed to reproduce the problem and the failure was occurring while running go vet after the build target (which runs go build on all our packages). Switching to go install to build the packages cleared the problem right up. On Thu, 15 Sep 2016 at 20:19 Dave Cheneywrote: > I don't think it's about the installation of the tools. The problem you've > described sounds like you have tools that use the compiled form of the > package, but your development process has not embraced go install so what > you go build the later test is not the same thing. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "golang-nuts" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/golang-nuts/fn_wmxgphSI/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Twitter: @theotherelliott Blog: http://telliott.io Come work with us at Yext! http://grnh.se/ovuj20 -- 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: Best practices for upgrading go with existing GOPATH?
I don't think it's about the installation of the tools. The problem you've described sounds like you have tools that use the compiled form of the package, but your development process has not embraced go install so what you go build the later test is not the same thing. -- 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: Best practices for upgrading go with existing GOPATH?
Thanks for the clarification and the advice. Seems that what we need to do is make sure that these key tools are installed from source in the makefile, or provide a script that installs them as a post-go-upgrade step in our instructions. Will experiment with those to see which works best for us. On Thursday, 15 September 2016 17:22:27 UTC-4, Dave Cheney wrote: > > ok, that sounds like a different problem. Some tools use the cached (.a > file in the pkg/ directory) version others use the src directly. If you > don't install, the tools that use the .a version will be out of date (at > best) or fail (at worse). > > Really, you want to use go install, just trust me on this, it'll make you > go experience much better all round. > > On Friday, 16 September 2016 04:03:54 UTC+10, Tom Elliott wrote: >> >> Thanks for the quick response :) >> >> Great to hear that the go tool is intended to catch this. The problem was >> typically seen when running our default make target, which uses build for >> the build itself, but has some sanity checking and code generation steps >> first, with tools like glock, errcheck and mockgen. >> I think that most failures were in this first phase. Could it be possible >> that we hit this as a result of usage of the ast package or importgraph >> within these tools? If so, clearing the pkg directory may have been a red >> herring. >> >> I can try to reproduce this later this evening and see if I can pin down >> the exact culprit. >> > -- 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: Best practices for upgrading go with existing GOPATH?
ok, that sounds like a different problem. Some tools use the cached (.a file in the pkg/ directory) version others use the src directly. If you don't install, the tools that use the .a version will be out of date (at best) or fail (at worse). Really, you want to use go install, just trust me on this, it'll make you go experience much better all round. On Friday, 16 September 2016 04:03:54 UTC+10, Tom Elliott wrote: > > Thanks for the quick response :) > > Great to hear that the go tool is intended to catch this. The problem was > typically seen when running our default make target, which uses build for > the build itself, but has some sanity checking and code generation steps > first, with tools like glock, errcheck and mockgen. > I think that most failures were in this first phase. Could it be possible > that we hit this as a result of usage of the ast package or importgraph > within these tools? If so, clearing the pkg directory may have been a red > herring. > > I can try to reproduce this later this evening and see if I can pin down > the exact culprit. > -- 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: Best practices for upgrading go with existing GOPATH?
Thanks for the quick response :) Great to hear that the go tool is intended to catch this. The problem was typically seen when running our default make target, which uses build for the build itself, but has some sanity checking and code generation steps first, with tools like glock, errcheck and mockgen. I think that most failures were in this first phase. Could it be possible that we hit this as a result of usage of the ast package or importgraph within these tools? If so, clearing the pkg directory may have been a red herring. I can try to reproduce this later this evening and see if I can pin down the exact culprit. -- 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: Best practices for upgrading go with existing GOPATH?
I'm sorry to hear that you're having issues. The Go tool should detect that a cached package in $GOPATH/pkg is out of date and overwrite it. If this is not happening reliably this may be a bug. Can you give some details about what you tried, what you expected to happen and what happened instead. In particular, do your team use go build or go install ? On Thursday, 15 September 2016 04:31:24 UTC+10, Tom Elliott wrote: > > We've recently migrated from Go 1.6 to 1.7 within our engineering team, > and have been experiencing some binary compatibility issues (as is to be > expected) that have usually been corrected by emptying $GOPATH/pkg and > rebuilding - this was recommended but as is the case with manual steps, > people often skipped it. > > Are there any other pitfalls that people have encountered migrating > between point releases of Go? Better still, does anyone know of any tools > we could include in our builds to sanity check the contents of $GOPATH/pkg? > > > -- 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.