Re: [go-nuts] go mod tidy pulls in too much

2018-09-29 Thread t hepudds
Hi Scott, Regarding your comment, a related issue (which is still open) is this one: #26955: “cmd/go: provide straightforward way to see non-test dependencies” https://github.com/golang/go/issues/26955 --thepudds Terseness courtesy of my mobile device >

[go-nuts] Re: go modules and ambiguous import, how to fix it?

2019-05-17 Thread t hepudds
I only took a brief look at this, but this seems to be a tricky one. You could try: go get github.com/ugorji/go/codec@none That made your example then work for me locally. >From the doc (https://golang.org/cmd/go/#hdr-Module_aware_go_get): "The version suffix @none indicates that

[go-nuts] Re: go modules and ambiguous import, how to fix it?

2019-05-17 Thread t hepudds
:50:38 PM UTC-4, t hepudds wrote: > > I only took a brief look at this, but this seems to be a tricky one. > > You could try: > >go get github.com/ugorji/go/codec@none > > That made your example then work for me locally. > > From the doc (https://golang.org/c

[go-nuts] Re: tracking down broken module dependency golint

2019-06-03 Thread t hepudds
For this error: github.com/golang/lint@v0.0.0-20190409202823-959b441ac422: parsing go.mod: unexpected module path "golang.org/x/lint" That is saying 'github.com/golang/lint' was loaded, but the 'go.mod' found at that location for that version had a different module name

[go-nuts] modules: available GOPROXY instances or implementations?

2019-06-01 Thread t hepudds
Here is a partial list of Go modules proxy implementations or instances (sorted by url): https://docs.gomods.io(Athens) https://gocenter.io(JFrog) https://goproxy.cn https://goproxy.io https://proxy.golang.org (Go team) https://thumbai.app

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread t hepudds
As far as I understand, it is not a minimum version of the language. Also, a key point that is easy to miss is that the language version is distinct from tooling version, and newer tooling versions will know how to compile older language versions. At least, that is my understanding, though I

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-12 Thread t hepudds
Hi Ian, Thank you for sending that CL 181840. One minor request for clarification on the discussion here. When you said earlier in this thread: > “For almost all users the default value will be correct.  At least, I hope that is the case.” I *think* what you are saying is for almost

Re: [go-nuts] goforward: What is it? How do I use it?

2019-06-28 Thread t hepudds
print the locations and contents of files instead of writing them -replace replace conflicting declarations in the destination package (otherwise, do not forward conflicting declarations) HTH, thepudds On Friday, June 28, 2019 at 11:02:32 PM UTC-4, t hepudds wrote: > > Hi AJ

Re: [go-nuts] goforward: What is it? How do I use it?

2019-06-28 Thread t hepudds
Hi AJ, In terms of detailed write-ups on how gofoward works, to my knowledge the best place to start is reading the commit message and then the help message you get once you build goforward. The author (Bryan Mills) has stated there is still some work to do to finish it up, including

[go-nuts] Go module and local dependencies

2019-08-31 Thread t hepudds
A few quick comments: 1. Try 'go build ./...' from the root directory of the module to build all the packages in the module. 'go build' without any arguments is the same as 'go build .' which means just build the current directory/package. 2. With only one go.mod, you should not need a

[go-nuts] Re: Option to disable version validation in 1.13?

2019-09-03 Thread t hepudds
Hello Steve, > https://golang.org/doc/go1.13#version-validation lists a number of > options if you're maintaining a module but nothing seems relevant for > CI/CD pipelines which are just trying to use tools for which they aren't > the maintainer. Regarding how to fix "invalid pseudo-version"

[go-nuts] Re: How to update a module's direct dependencies only

2019-09-04 Thread t hepudds
Hello Mihai, To upgrade your direct dependencies to their latest release (with your indirect dependencies using versions selected based on the requirements of your direct dependencies), this should work in most cases: go get $(go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m

[go-nuts] Re: Go module and local dependencies

2019-09-04 Thread t hepudds
Hello Guillaume, I haven't had a chance to look at your example closely, but it seems you have two modules defined on your local filesystem, with two go.mod files total. If that is what you are trying to do, one approach is to use a `replace` directive to let one module know about the on-disk

[go-nuts] Re: Is there a way to use the pakckages under vendor folder and from module cache?

2019-09-10 Thread t hepudds
Hello T L, I think I might not fully understand the exact scenario, but one thing some people have done when they have something in their vendor directory that they can't otherwise find anywhere else (e.g., perhaps because it is modified, or maybe the only copy of a now-missing dependency is

Re: [go-nuts] Re: go mod dependency hell is real

2019-09-10 Thread t hepudds
Hello Darko, Rather than that 'replace' you found, a better solution is probably adding a 'require' for a more recent release of github.com/ugorji/go. Adding this to my go.mod worked for me in a simple test just now to resolve a similar error to what you reported: require

Re: [go-nuts] Re: v1.13: Altered go.mod file in project after updating vim-go binaries

2019-09-06 Thread t hepudds
FWIW, I think this issue tracks a similar request: #30515 cmd/go: offer a consistent "global install" command https://github.com/golang/go/issues/30515 It was tagged as a release-blocker for Go 1.13, but I think time ran out. One outcome considered there was a new argument to 'go get'

[go-nuts] Re: go.mod changes on each build, -mod=readonly can never work

2019-09-19 Thread t hepudds
Hello Russ, Usually, if you are not modifying your code, I think go.mod should be stable across repeated identical invocations of something like 'go build' or 'go install'. I think there were a similar sounding set of bugs fixed for Go 1.13, but sounds like you are seeing this with Go 1.13.

[go-nuts] Re: simplified error handling

2019-07-09 Thread t hepudds
Hi Robert, You might be interested in the discussion here: https://swtch.com/try.html#goto which include 3-4 comments discussing a similar (but not identical) idea from @josharian and @griesemer. Best, thepudds On Tuesday, July 9, 2019 at 1:25:36 PM UTC-4, Robert Engels wrote: > > > There

[go-nuts] Re: With Go modules, is that possible to reference a package which hasn't gotten a module support

2019-07-09 Thread t hepudds
Hi Roman, > For a project considering switching to Go modules, is that possible to > reference a package without support of modules (doesn't have a go.mod/go.sum files)? Yes, as far I understand, that should usually work. Using your example of wanting to consume a non-module dependency

[go-nuts] Re: Empty go.mod file in root directory containing only version maps

2019-10-22 Thread t hepudds
Hello Gert, It looks like you are experimenting with the "major subdirectory" layout for modules. It looks like your v1 module is incorrectly specified, including with an incorrect trailing "/v1": https://github.com/gertcuykens/module/blob/v4.0.0/v1

[go-nuts] Re: GO Mod (modules) for dummies. Please help.

2019-10-22 Thread t hepudds
Hello Stuart, I haven't digested everything here, but one comment is that all of the directives in go.mod like 'require' and 'replace' all deal with module paths, and not package import paths. This 'replace' I think does nothing: replace github.com/mygit/webserverbase/config v0.1.0-alpha

[go-nuts] module dependency & testing

2019-10-25 Thread t hepudds
To show the exact versions used in your build excluding test-only dependencies, I think this works: go list -deps -f '{{with .Module}}{{.Path}} {{.Version}}{{end}}' ./... | sort -u (Command originally from Bryan Mills). Regards, thepudds -- You received this message because you are

[go-nuts] Re: Looking for some nicely broken image files (gif, png, and jpeg)

2020-02-13 Thread t hepudds
/blob/master/projects/golang/build.sh#L32 thepudds On Thursday, February 13, 2020 at 1:40:58 PM UTC-5, t hepudds wrote: > > Hello Dan, > > I would definitely echo the fuzzing suggestion from Jake. > > In addition, in your quest to find broken images, I would suggest grabbing

[go-nuts] Re: go modules and internal packages

2020-01-27 Thread t hepudds
Hello Srini, There is a decent answer covering some points on how to structure your module, options on where to place your go.mod file, and how to arrange your packages within a module here: https://stackoverflow.com/a/57314494 One thing to note is that it says in that answer that you

[go-nuts] Re: Looking for some nicely broken image files (gif, png, and jpeg)

2020-02-13 Thread t hepudds
Hello Dan, I would definitely echo the fuzzing suggestion from Jake. In addition, in your quest to find broken images, I would suggest grabbing the images from the dvyukov/go-fuzz corpus, which has a bunch of images that are already broken in "creative" ways for you based on the

Re: [go-nuts] Re: Why Discord is switching from Go to Rust

2020-02-10 Thread t hepudds
They had said they were generating almost no garbage. If that is true, I suspect they could have avoided the 2-minute forced GC by running with GOGC=off, or alternatively executed SetGCPercent(-1) (https://golang.org/pkg/runtime/debug/#SetGCPercent) to disable the GC programmatically after

Re: [go-nuts] Re: Why Discord is switching from Go to Rust

2020-02-10 Thread t hepudds
, once an hour to run runtime.GC() manually, or once a day or whatever frequency might have seemed rational based on their workload. I suspect that would have been sufficient as a simple workaround? thepudds On Monday, February 10, 2020 at 12:39:08 PM UTC-5, t hepudds wrote: > > They ha

Re: [go-nuts] [generics] Data structures and the garbage collector

2020-07-11 Thread t hepudds
Hello Markus, > "But apparently (see Ian's answer) this is not the case, and the GC always needs to trace all elements, keys and values." I think Ian said something a bit different from what you said there. As far as I understand, the GC does not scan the keys and values of a map if they are

Re: [go-nuts] [generics] Syntax feedback

2020-06-27 Thread t hepudds
Hi Tyler, I just wanted to say a quick thank you for pulling those references together and your thoughtful response in this thread. Hopefully the time you spent doing that will help additional gophers as the generics discussion continues on this list. Regards, thepudds -- You received this

Re: [go-nuts] Generics feedback

2020-06-28 Thread t hepudds
Hello Calum, One FYI that Tyler Compton pulled together a helpful list of dozen or so different alternative generics syntax suggestions along with their corresponding recent golang-nuts threads: https://groups.google.com/d/msg/golang-nuts/uQDrcHDwT_w/Y-Myzuw_AQAJ That could be a helpful