Live data from Hacker News

Go 1.24's go tool is one of the best additions to the ecosystem in years

jvt.me

91–100 of 207 posts

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#93
I think it's a bad addition since it pushes people towards a worse solution to a common problem.

Using "go tool" forces you to have a bunch of dependencies in your go.mod that can conflict with your software's real dependency requirements, when there's zero reason those matter. You shouldn't have to care if one of your developer tools depends on a different version of a library than you.

It makes it so the tools themselves also are being run with a version of software they weren't tested with.

If, for example, you used "shell.nix" or a dockerfile with the tool built from source, the tool's dependencies would match it's go.mod.

Now they have to merge with your go.mod...

And then, of course, you _still_ need something like shell.nix or a flox environment (https://flox.dev/) since you need to control the version of go, control the version of non-go tools like "protoc", and so you already have a better solution to downloading and executing a known version of a program in most non-trivial repos.

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#94
My current approach has been setting GOBIN to a local project bin via direnv and go installing bins there. install commands themselves are cached by me with a naive checksum check for the install script itself when I run my commands. Therefore all `go install`s run in parallel if I edit the install script, and go decides what to reinstall or not. At this point I don't feel it's worth migrating to `go tool` having this setup, we'll see when it's stable

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#95
post #93

I think it's a bad addition since it pushes people towards a worse solution to a common problem. Using "go tool" forces you to have a bunch of dependencies in your go.mod that can conflict with your software's real dependency requirements, when there's zero reason those matter. You shouldn't have to care if one of your developer tools depends on a different version of a library than you. It makes it so the tools them…

> Using "go tool" forces you to have a bunch of dependencies in your go.mod that can conflict with your software's real dependency requirements, when there's zero reason those matter. You shouldn't have to care if one of your developer tools depends on a different version of a library than you.

Heh, were the people who made 'go tool' the same people who made Maven? Would make sense :P

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#96
what is also concerning, Go team years ago did small vote, small survey of positive occurrences, and decided to enforce it globally for anyone.

old design give people option to use `tools.go` approach, or other, or nothing at all. now they are enforcing this `tools.go` standard. Go looks to be moving into very restrictive territories.

what about surveying opposing views? what about people who did not use `tools.go`

what is going on in Google, Go team?

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#97
post #4

So it's just dev-dependencies?

a bit worse. it is all mixed up. to keep separate dependency tree for tools need use old approach with go.mod. it is actually even worse now.

UPD:

1. it is single tree

2. BUT tools will not propagate through the dependency tree downstream due to go module pruning

check this comment: https://github.com/golang/go/issues/48429#issuecomment-26184...

official docs: https://tip.golang.org/doc/modules/managing-dependencies#too...

> Due to module pruning, when you depend on a module that itself has a tool dependency, requirements that exist just to satisfy that tool dependency do not usually become requirements of your module.

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#98
post #46

I always think it's a shame that these features end up getting built into ecosystem-specific build tools. Why do we need separate build systems for every language? It seems entirely possible to have build system that can do all this stuff for every language at once. From my experience at Google I _know_ this is possible in a Megamonorepo. I have briefly fiddled with Bazel and it seems there's quite a barrier to entry…

> Why do we need separate build systems for every language? Because being cross-language makes them inherit all of the complexity of the worst languages they support. The infinite flexibility required to accommodate everyone keeps costing you at every step. You need to learn a tool that is more powerful than your language requires, and pay the cost of more abstraction layers than you need. Then you have to work with…

But this just doesn't match my experience with Blaze at all. For my internal usage with C++ & Go it's perfect. For the weird niche use case of building and packaging BPF programs (with no support from the central tooling teams, we had to write our own macros) it still just works. For Python where it's a poor fit for the language norms it's a minor inconvenience but still mostly stays out of the way. I hear Java is similar.

For vendored open source projects that build with random other tools (CMake, Nix, custom Makefile) it's a pain but the fact that it's generally possible to get them building with Blaze at all says something...

Yes, the monorepo makes all of this dramatically easier. I can consider "one-build-tool-to-rule-them-all isn't really practical outside of a monorepo" as a valid argument, although it remains to be proven. But "you fundamentally need a build tool per language" doesn't hold any water for me.

> That makes it easier to work on other projects, and easier to write tooling that works with all of them.

But... this is my whole point. Only if those projects are in the same language as yours! I can see how maybe that's valid in some domains where there's probably a lot of people who can just do almost everything on JS/TS, maybe Java has a similar domain. But for most of us switching between Go/Cargo/CMake etc is a huge pain.

Oh btw, there's also Meson. That's very cross-language while also seeming extremely simple to use. But it doesn't seem to deliver a very full-featured experience.

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#99
I appreciate that "tools" that are used to build the final version of a module/cli/service are explicitly managed through go.mod.

I really dislike that now I'm going to have two problems, managing other tools installed through a makefile, e.g. lint, and managing tools "installed" through go.mod, e.g. mocks generators, stringify, etc.

I feel like this is not a net negative on the ecosystem again. Each release Golang team adds thing to manage and makes it harder to interact with other codebases. In this case, each company will have to decide if they want to use "go tool" and when to use it. Each time I clone an open source repo I'm going to have to check how they manage their tools.

Re: Go 1.24's go tool is one of the best additions to the ecosystem in years

#100
post #38

I always think it's a shame that these features end up getting built into ecosystem-specific build tools. Why do we need separate build systems for every language? It seems entirely possible to have build system that can do all this stuff for every language at once. From my experience at Google I _know_ this is possible in a Megamonorepo. I have briefly fiddled with Bazel and it seems there's quite a barrier to entry…

I've had exactly the same thought, after hitting walls repeatedly with limitations in single-language ecosystems. And likewise, I've had the same concerns around the complexity that comes with Bazel/Buck/Nix. It's been such a frustration for me that I started writing my own as a side project a year or two ago, based on a using a standardized filesystem structure for packages instead of a manifest or configuration lan…

Not loving the cutesy names (https://somesocks.github.io/dryad/docs/02-concepts/01-the-ga...). I want my build tool to be boring.
Post reply on HN