Re: [go-nuts] go install of forked repo

2022-12-03 Thread 'Sean Liao' via golang-nuts
`go install pkg@version` doesn't support installing from a fork. The argument is best understood as a module identity rather than source code location. - sean On Sat, Dec 3, 2022, 11:55 Duncan Harris wrote: > This seems a noddy question but can't easily find an answer with Google > apparently.

Re: [go-nuts] go install of forked repo

2022-12-03 Thread Steven Hartland
Check out go work I achieve it’s exactly what you are looking for, allowing for projects to use temporary local versions of packages On Sat, 3 Dec 2022 at 11:55, Duncan Harris wrote: > This seems a noddy question but can't easily find an answer with Google > apparently. I may have lost the plot

[go-nuts] go install of forked repo

2022-12-03 Thread Duncan Harris
This seems a noddy question but can't easily find an answer with Google apparently. I may have lost the plot :-) There is a repo which contains source for a go executable that I want to use. Normally I install this with: go install original.domain/path@latest I want to fork that repo and make so

Re: [go-nuts] go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 not working

2022-07-23 Thread TheDiveO
GOMOD="/dev/null" either looks weird or there is something interesting new to learn here. On Sunday, July 24, 2022 at 2:22:49 AM UTC+2 James Brooke wrote: > Thanks again for following up on this Kurtis. The command is in the > subject line: "go install google.golang.org/protobuf/cmd/protoc...@

Re: [go-nuts] go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 not working

2022-07-23 Thread James Brooke
Thanks again for following up on this Kurtis. The command is in the subject line: "go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 not working". Apologies if that wasn't clear. I'm finding this confusing to say the least. Without any further changes to my system, and not heading t

Re: [go-nuts] go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 not working

2022-07-22 Thread Kurtis Rader
On Fri, Jul 22, 2022 at 6:03 PM James Brooke wrote: > - I simply tried to run that command in the terminal. I'm able to develop > go programs fine in GoLand, pulling in 3rd party dependencies etc. I just > can't seem to install this binary because of this GOROOT issue. > What command did you run

Re: [go-nuts] go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 not working

2022-07-22 Thread James Brooke
Thank you for your reply Kurtis. In answer to your questions: - I simply tried to run that command in the terminal. I'm able to develop go programs fine in GoLand, pulling in 3rd party dependencies etc. I just can't seem to install this binary because of this GOROOT issue. - this is the output f

Re: [go-nuts] go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 not working

2022-07-22 Thread Kurtis Rader
On Fri, Jul 22, 2022 at 9:48 AM James Brooke wrote: > Hello, I'm struggling to work out why this isn't working. I'm getting the > following, any help greatly appreciated. It would help if you explained what you did that produced those error messages. You should probably also include the output

[go-nuts] go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 not working

2022-07-22 Thread James Brooke
Hello, I'm struggling to work out why this isn't working. I'm getting the following, any help greatly appreciated. ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/compiler/protogen/protogen.go:14:2: package bufio is not in GOROOT (/usr/local/go/src/bufio) ../../../go/pkg/mod/google.golan

Re: [go-nuts] Go install

2022-03-11 Thread Jason E. Aten
It looks like you are running into one of the various dubious Windows "security" features, this one seems related to "User Account Control". If you haven't solved this yet, try googling for the error that you are getting. For example, I searched "windows 10 user account control do you want to al

Re: [go-nuts] Go install

2022-03-02 Thread Kurtis Rader
Insufficient information. You didn't tell us your OS. You didn't tell us how you installed the Go toolchain. You didn't tell us how you are invoking the Go command. Start by eliminating the "Visual Studio" IDE as a variable. What happens if you open a terminal CLI and simply type "go version"? On

[go-nuts] Go install

2022-03-02 Thread William Molina
Hello, I've been trying to install Go for sometime now and for some reason it keeps denying access to it every time I try to call it in the command prompt. Everything is installed and I'm trying to use it on Visual Studio. If anyone could help me, that would be amazing. Thank you -- You rec

[go-nuts] go install an/import/path@revision and /vendor in Go 1.16

2021-08-05 Thread Konstantin Khomoutov
Hi! We have recently turned one of our internal Go projects into a Go module. The project was using vendoring and we intend to continue doing so - just rather with the natural support from `go mod` instead of govendor as before. An interesting issue came up when we've decided to try the recently

Re: [go-nuts] go install, replace directive any ongoing discussions?

2021-03-07 Thread James Lawrence
I'm actually making the argument that the error is in fact incorrect as the replace directive has always been about compilation and therefore they should always apply when installing a module's main package whether its remoting fetching the module via go install or when compiling a module directly.

Re: [go-nuts] go install, replace directive any ongoing discussions?

2021-03-07 Thread 'Dan Kortschak' via golang-nuts
On Sun, 2021-03-07 at 07:57 +, Paul Jolly wrote: > Erroring on replace directives is an intentional decision for now: > https://github.com/golang/go/issues/40276#issue-659471259 > > But might be relaxed in the future: > > > Parts of this proposal are more strict than is technically > > necessar

Re: [go-nuts] go install, replace directive any ongoing discussions?

2021-03-07 Thread James Lawrence
well an issue was filed, and promptly closed. On Sun, Mar 7, 2021 at 6:36 AM James Lawrence wrote: > I read through those issues Paul, I found them less than convincing for > the global go install use case. regardless I'll file an issue. I didn't > wan

Re: [go-nuts] go install, replace directive any ongoing discussions?

2021-03-07 Thread James Lawrence
I read through those issues Paul, I found them less than convincing for the global go install use case. regardless I'll file an issue. I didn't want to file an issue because of how long and pointless most of the conversation around the global install replace directive usage seemed. I'll file other

Re: [go-nuts] go install, replace directive any ongoing discussions?

2021-03-07 Thread 'Axel Wagner' via golang-nuts
I wasn't aware that this restriction is intentional. I wasn't part of that discussion and it seems too long for me to read after the fact, so I probably shouldn't comment on it. I'm admittedly a bit befuddled by the design decisions, though (as I understand them). On Sun, Mar 7, 2021 at 8:57 AM Pa

Re: [go-nuts] go install, replace directive any ongoing discussions?

2021-03-06 Thread Paul Jolly
>> I missed the conversation originally. however go install has been left in a >> unfortunate state where it bewilderingly errors out when the main module >> contains a replace directive. > > This sounds like a bug. I would file an issue with an easy reproduction case. Erroring on replace direct

Re: [go-nuts] go install, replace directive any ongoing discussions?

2021-03-06 Thread 'Axel Wagner' via golang-nuts
On Sun, Mar 7, 2021 at 3:45 AM James Lawrence wrote: > I missed the conversation originally. however go install has been left in > a unfortunate state where it bewilderingly errors out when the main module > contains a replace directive. > This sounds like a bug. I would file an issue with an ea

[go-nuts] go install, replace directive any ongoing discussions?

2021-03-06 Thread James Lawrence
I missed the conversation originally. however go install has been left in a unfortunate state where it bewilderingly errors out when the main module contains a replace directive. I'm primarily wondering where I should be going to contribute to that conversation and if there is someone on the go

[go-nuts] go install ./... behavior on 1.15.2

2020-10-25 Thread Benedicto Franco Jr
Hi all, I'm trying to upgrade from go 1.14.6 to 1.15.2 (soon to 1.15.3). I have a folder under $GOPATH not related to any golang project that has permissions (700) only to the owner/root user (I'm using linux/centos-8) and when I issue a go install ./... on my project root folder ($GOPATH/src/g

Re: [go-nuts] go install puts my library .a file in the local directory instead of first component of GOPATH

2020-09-06 Thread Jan Mercl
On Sun, Sep 6, 2020 at 9:15 PM Dean Schulze wrote: > When I execute go install datepackage I get This is may or may not be the cause, but please note that import paths without a dot, like the one quoted above, are reserved (https://github.com/golang/go/issues/32819#issuecomment-566671328) for th

[go-nuts] go install puts my library .a file in the local directory instead of first component of GOPATH

2020-09-06 Thread Dean Schulze
I have a library package like this: └── src └── datepackage └── dateutil.go My GOPATH is set like this: */home/dean/src/golang/go3p:* where /home/dean/src/golang/go3p is where go get installs packages and is the directory above my src/ directory. When I execute *go install datepa

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread 'Tim Hockin' via golang-nuts
If you want to see why people give me a hard time: https://github.com/kubernetes/kubernetes/blob/master/build/root/Makefile.generated_files And that's AFTER a massive simplification. On Mon, Jan 28, 2019 at 11:55 AM Ian Lance Taylor wrote: > > On Mon, Jan 28, 2019 at 11:44 AM Tim Hockin wrote:

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread Sam Whited
On Mon, Jan 28, 2019, at 19:44, 'Tim Hockin' via golang-nuts wrote: > People already chide me for my affinity for baroque > Makefiles... I use bmake too; and here I was all this time thinking that the "b" stood for "BSD". —Sam -- You received this message because you are subscribed to the Goog

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread Ian Lance Taylor
On Mon, Jan 28, 2019 at 11:44 AM Tim Hockin wrote: > > Of course you are right, as usual. I just felt like that was a lot of > hoop-jumping. People already chide me for my affinity for baroque > Makefiles... If you can assume that you are using GNU make, the Makefile language is Turing complete

Re: [go-nuts] go install touches the result file even if no changes

2019-01-28 Thread 'Tim Hockin' via golang-nuts
Of course you are right, as usual. I just felt like that was a lot of hoop-jumping. People already chide me for my affinity for baroque Makefiles... On Sat, Jan 26, 2019 at 11:01 AM Ian Lance Taylor wrote: > > On Fri, Jan 25, 2019 at 7:55 PM Tim Hockin wrote: > > > > Fair point, of course. > >

Re: [go-nuts] go install touches the result file even if no changes

2019-01-26 Thread 'Tim Hockin' via golang-nuts
On Fri, Jan 25, 2019 at 11:43 PM Paul Jolly wrote: > > Tim - in case it's of any interest, I am in the process of (re)writing > a dependency-aware wrapper around go generate that caches results in > an artefact cache (i.e. only re-runs code generation as required). Yes interested. Happy to talk

Re: [go-nuts] go install touches the result file even if no changes

2019-01-26 Thread Ian Lance Taylor
On Fri, Jan 25, 2019 at 7:55 PM Tim Hockin wrote: > > Fair point, of course. > > I care because Kubernetes and it's family of projects have Makefiles to > encapsulate trickier aspects of building, including code generation. > Compiling kubernetes takes a LONG time. It would be nice to avoid >

Re: [go-nuts] go install touches the result file even if no changes

2019-01-25 Thread Paul Jolly
Tim - in case it's of any interest, I am in the process of (re)writing a dependency-aware wrapper around go generate that caches results in an artefact cache (i.e. only re-runs code generation as required). On Sat, 26 Jan 2019 at 03:56, 'Tim Hockin' via golang-nuts wrote: > > Fair point, of cours

Re: [go-nuts] go install touches the result file even if no changes

2019-01-25 Thread 'Tim Hockin' via golang-nuts
Fair point, of course. I care because Kubernetes and it's family of projects have Makefiles to encapsulate trickier aspects of building, including code generation. Compiling kubernetes takes a LONG time. It would be nice to avoid re-triggering secondary actions when the primary artifacts have not

Re: [go-nuts] go install touches the result file even if no changes

2019-01-25 Thread Ian Lance Taylor
On Fri, Jan 25, 2019 at 3:51 PM Tim Hockin wrote: > > I don't grok that reasoning - can you expand on it? Assume for a > second that it did NOT update mtime if the result did not change. I > can be confident that same mtime == no change, right? It doesn't > imply that different mtime == somethi

Re: [go-nuts] go install touches the result file even if no changes

2019-01-25 Thread 'Tim Hockin' via golang-nuts
I don't grok that reasoning - can you expand on it? Assume for a second that it did NOT update mtime if the result did not change. I can be confident that same mtime == no change, right? It doesn't imply that different mtime == something change, but I think that's OK (for my use, maybe I am limi

Re: [go-nuts] go install touches the result file even if no changes

2019-01-25 Thread Ian Lance Taylor
On Fri, Jan 25, 2019 at 1:07 PM 'Tim Hockin' via golang-nuts wrote: > > Example: > > ``` > $ which git-sync > > $ go install -installsuffix "static" ./cmd/git-sync/ > > $ ls -l --full-time `which git-sync`; md5sum `which git-sync` > -rwxr-xr-x 1 thockin primarygroup 13956902 2019-01-25 > 13:04:40.

[go-nuts] go install touches the result file even if no changes

2019-01-25 Thread 'Tim Hockin' via golang-nuts
Example: ``` $ which git-sync $ go install -installsuffix "static" ./cmd/git-sync/ $ ls -l --full-time `which git-sync`; md5sum `which git-sync` -rwxr-xr-x 1 thockin primarygroup 13956902 2019-01-25 13:04:40.758632955 -0800 /usr/local/google/home/thockin/src/go/bin/git-sync 1200f479c8ba86f70f0e4

Re: [go-nuts] Go Install

2018-08-06 Thread Paul Jolly
This was also raised in https://github.com/golang/go/issues/24506 and is being fixed in the linked CL On Tue, 7 Aug 2018 at 06:33, John More wrote: > > You are right, using the -i option did the deed. > Thanks > John > > On Tue, Aug 7, 2018 at 1:26 AM, Ian Lance Taylor wrote: >> >> On Mon, Aug 6,

Re: [go-nuts] Go Install

2018-08-06 Thread John More
You are right, using the -i option did the deed. Thanks John On Tue, Aug 7, 2018 at 1:26 AM, Ian Lance Taylor wrote: > On Mon, Aug 6, 2018 at 7:09 PM, John More wrote: > > following the tutorial at https://golang.org/doc/code.html the go > install I > > am confused by the following statement: >

Re: [go-nuts] Go Install

2018-08-06 Thread Ian Lance Taylor
On Mon, Aug 6, 2018 at 7:09 PM, John More wrote: > following the tutorial at https://golang.org/doc/code.html the go install I > am confused by the following statement: > > > Whenever the go tool installs a package or binary, it also installs whatever > dependencies it has. So when you install the

[go-nuts] Go Install

2018-08-06 Thread John More
following the tutorial at https://golang.org/doc/code.html the go install I am confused by the following statement: Whenever the go tool installs a package or binary, it also installs whatever dependencies it has. So when you install the hello program $ *go install github.com/user/hello* the

Re: [go-nuts] "go install": no warning/error when binaries conflict

2017-07-19 Thread Paul Jolly
Random drive-by comment... Another solution would be to have go install put its results in subdirectories beneath $GOPATH/bin corresponding to source packages. For example, considering the program goimports: $ go get golang.org/x/tools/cmd/goimports $ go list -f '{{.Target}}' golang.org/x/tools/

Re: [go-nuts] "go install": no warning/error when binaries conflict

2017-07-18 Thread Ian Lance Taylor
On Tue, Jul 18, 2017 at 7:27 AM, wrote: > > Consider a package with multiple binaries with the same name, "cmd" in this > case: > > pkg1/cmd/main.go: > package main; import "fmt"; func main() { fmt.Println("pkg1") } > > pkg2/cmd/main.go: > package main; import "fmt"; func main() { fmt.Println("pk

[go-nuts] "go install": no warning/error when binaries conflict

2017-07-18 Thread tom . payne
Consider a package with multiple binaries with the same name, "cmd" in this case: pkg1/cmd/main.go: package main; import "fmt"; func main() { fmt.Println("pkg1") } pkg2/cmd/main.go: package main; import "fmt"; func main() { fmt.Println("pkg2") } When running $ go install ./... I would expect

Re: [go-nuts] Go install recreates .a files that are already present in the pkg directory

2017-07-14 Thread Martin Spasov
I am getting *build ID mismatch* and here I see that it means that something has changed in the package, but I have not modified it in any way. Below is the whole application : package main import ( "os" "github.com/gotk3/gotk3/gtk" ) f

Re: [go-nuts] Go install recreates .a files that are already present in the pkg directory

2017-07-14 Thread Martin Spasov
I am getting *build ID mismatch* and here I see that it means that something has changed in the package, but I have not modified it in any way. Below is the whole application : package main import ( "os" "github.com/gotk3/gotk3/gtk" ) f

Re: [go-nuts] Go install recreates .a files that are already present in the pkg directory

2017-07-14 Thread Ian Lance Taylor
On Fri, Jul 14, 2017 at 6:27 AM, wrote: > Hey, > > I formatted my OS and now i am having a problem that was not present before. > I am trying to use gotk3 and when i try to install it i run > > go install -v -tags gtk_3_18 > > It used to only rebuild (correct me if im using a wrong verb here) the

[go-nuts] Go install recreates .a files that are already present in the pkg directory

2017-07-14 Thread suburb4nfilth
Hey, I formatted my OS and now i am having a problem that was not present before. I am trying to use gotk3 and when i try to install it i run go install -v -tags gtk_3_18 It used to only rebuild (correct me if im using a wrong verb here) the main.go file as it was the only one modified, but n

[go-nuts] Go install speedup within docker

2017-06-11 Thread Vladimir Varankin
Hey James, Could you show the docker run command, which you invoke to enter a container? I use docker to build my application as well, so I just do `docker container run --rm -ti --volume $PWD:/gocode/src/app --workdir /gocode/src/app go build`. Doing so with container reusage or not, I haven

[go-nuts] Go install speedup within docker

2017-06-10 Thread James Pettyjohn
I have a statically built go binary with cgo deps (wellington/go-libsass) which I'm trying to speed up the rebuild time for. This is run within a docker image because so the statically compiled binary will run as it's own base image on docker. The docker image the build is run within is: FROM g

[go-nuts] 'Go install' fail to import package with 'Docker run'

2017-04-24 Thread Qing Xu
The symptom is that a single command docker run go install would fail at importing Go packages, but running them separately, i.e. docker run -it bash (with the source files copied over to same location) go install would work just fine. Details below: - The build comman

[go-nuts] go install does nothing - gives no error messages

2017-03-06 Thread Dave Cheney
go install -v -- 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] go install does nothing - gives no error messages

2017-03-06 Thread vincent
go installation is fine, works properly for lost of packages But for this one application go install seems to do nothing and gives no warnings/messages or any output at all The packages can be built with build command and produce proper executables. Is the install command running some tests

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-12 Thread shaun
Yes, that was the problem. We were building with CGO_ENABLED=0, which was meaning that built-in packages like "os/user" were always stale and causing rebuilds of almost every other package. Putting this in my dockerfile (along with mounting the pkg directory as a volume shared between each bui

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-09 Thread shaun
Thanks, that's given me a great thread to pull on. All the rebuilds track back to os/user being stale due to build ID mismatch. Probably an issue with the specific configuration we've set up for our build being different to the pre-build os/user (I think we disable CGO, for one). Should be ab

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-08 Thread Ian Lance Taylor
On Thu, Dec 8, 2016 at 10:13 AM, wrote: > I've started with a clean pkg dir. > > It's odd; the mtimes look correct (same inside/outside container). the > "buildid" to the compile commands s the same on each run too. > > Does anyone know if there's a way to print out the "StaleReason" that the >

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-08 Thread shaun
I've started with a clean pkg dir. It's odd; the mtimes look correct (same inside/outside container). the "buildid" to the compile commands s the same on each run too. Does anyone know if there's a way to print out the "StaleReason" that the code collects, that might help me find out what gate

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-07 Thread Dave Cheney
s/go build -i/go install. On Thu, Dec 8, 2016 at 8:07 AM, andrey mirtchovski wrote: > it's also possible that you need to do "go build -i" just in case your > dependencies are outdated. i had the same issue today with a windows > piece of code that rebuilt sqlite3 every time. > > > On Wed, Dec 7,

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-07 Thread andrey mirtchovski
it's also possible that you need to do "go build -i" just in case your dependencies are outdated. i had the same issue today with a windows piece of code that rebuilt sqlite3 every time. On Wed, Dec 7, 2016 at 2:57 PM, Dave Cheney wrote: > Docker add, or whatever is pushing files into your conta

[go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-07 Thread Dave Cheney
Docker add, or whatever is pushing files into your container is probably not respecting timestamps so the .a files are older with respect to .go files (pkg sorts above src) Why do you want to build inside a container, is that just adding an extra level of indirection to what is a simple process

[go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-07 Thread Shaun Crampton
Hi, I'm trying to optimize the build of my app. Our build times have crept up to ~60s as we've added more dependencies and it's starting to become a problem. The primary problem seems to be that we're building in a container, so we're losing the $GOPATH/pkg cache of build artefacts between bu

Re: [go-nuts] go install with -installsuffix fails on linux but not mac?

2016-10-10 Thread Ian Rose
(sorry if I already sent this - groups UI being weird) Hmm... I seem to get the same results on both machines: Mac: $ go list -f '{{.Name}} {{.Stale}}' std | grep true | head $ go list -installsuffix nocgo -f '{{.Name}} {{.Stale}}' std | grep true | head tar true zip true bzip2 true lzw true

Re: [go-nuts] go install with -installsuffix fails on linux but not mac?

2016-10-10 Thread Ian Lance Taylor
On Mon, Oct 10, 2016 at 12:48 PM, Ian Rose wrote: > On my macbook pro, I'm able to `go install` with a custom installsuffix just > fine: > > > $ ls -l /usr/local/go/pkg/ > total 0 > drwxr-xr-x 5 root wheel 170 Feb 25 2016 bootstrap > drwxr-xr-x 58 root wheel 1972 Feb 25 2016 darwin_amd64

[go-nuts] go install with -installsuffix fails on linux but not mac?

2016-10-10 Thread Ian Rose
On my macbook pro, I'm able to `go install` with a custom installsuffix just fine: $ ls -l /usr/local/go/pkg/ total 0 drwxr-xr-x 5 root wheel 170 Feb 25 2016 bootstrap drwxr-xr-x 58 root wheel 1972 Feb 25 2016 darwin_amd64 drwxr-xr-x 57 root wheel 1938 Sep 8 2015 darwin_amd64_race