[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Howard C. Shaw III
Okay, yeah, got home and tried it out, and go work sync is not doing what I thought it was. I had to do go get github.com/janpfeifer/gonb/gonbui in a to get it to build and run. So yeah, if you want to use a bare go get, you have to do replace directives. Blech. -- You received this

[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Jan
I tried exactly that, it doesn't do that ... Am I doing something wrong ? Notice in the example below the dependency to `github.com/janpfeifer/gonb/gonbui`. The command `go work sync` doesn't do anything. And `go get` still fails with the same error: ``` $ cat main.go package main import (

[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Howard C. Shaw III
I'm not suggesting that it would fix go get, but that it replaces it. Add your extra third party reference, then do go work sync and it should download that dependency. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Jan
Thanks, yes, I had checked out `go work sync`. I still don't understand what it means with "update the modules withing a workspace" though, or what this command does. I wish the documentation was more concrete (which files it changes, who uses those files, or maybe an example). `go help work

[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Howard C. Shaw III
Also did you call go work sync? I think that might be what I actually use in place of go mod tidy. Sorry, ToTK has been absorbing my free time, so it has been a while since I worked on the audio project where I used workspaces. https://github.com/golang/go/issues/50750 "*bcmills

[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Howard C. Shaw III
What directory did you do the go work init in? The setup description reads like you did it in work/a - shouldn't it be in /work? Can you check where your go.work file is? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] [security] Go 1.20.6 and Go 1.19.11 are released

2023-07-11 Thread announce
Hello gophers, We have just released Go versions 1.20.6 and 1.19.11, minor point releases. These minor releases include 1 security fixes following the security policy : - net/http: insufficient sanitization of Host header The HTTP/1 client did not fully

[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Jan
Thanks for the reply, but I'm not sure what exactly what you mean. In my example it's not that I need to `go get` anything for my locally stored packages (so I don't need to get `github.com/joe/b`). Rather, I need `go get` for other packages. But it (`go get`) fails on the local stored

[go-nuts] Re: Issue with integration test coverage

2023-07-11 Thread Brian Candler
Why are you using kill -9? That doesn't allow the process any time to tidy up whilst exiting. But also see https://go.dev/testing/coverage/#FAQ "If my program panics, will coverage data be written? Programs built with go build -cover will only write out complete profile data at the end of

[go-nuts] Issue with integration test coverage

2023-07-11 Thread savita juyal
Hello All, I am trying to collect integration test coverage but its not generating covcounters file. Please looks steps I am following to generate covearge. - *Build go binary* : go build -race -*cover* -o $(ROOT)/go/bin/appwithrace -ldflags "-X app/handler.proxyVersion=$(VERSION) -X

[go-nuts] Re: `go get` and workspaces (`go.work`)

2023-07-11 Thread Howard C. Shaw III
I don't think you need to run go get there at all - just run go mod tidy, and then when you go build, if it needs something it will get it. If you need to download without building, go mod download will do that. Howard -- You received this message because you are subscribed to the Google

[go-nuts] `go get` and workspaces (`go.work`)

2023-07-11 Thread Jan
hi all, When using a `go get` in a project (module) that has a `go work` configured, I'm getting errors "cannot find module providing package ...", for the packages that are located on `go work use ...` locations. Meaning, `go get` seems to ignore (?) `go.work` file. Likely this is deliberate