News for hackers. Stuff that matters.
Re:Evolve your go workspace to a real monorepo by elmazout on Friday August 23, 2024 @03:02PM (#41332012)
Hi there,

I've been working sporadically over the last six months on a go monorepo tool (0 config it just use go workspace and go convention). It’s basically like TurboRepo but without the task runner. The tool builds a dependency graph between packages, allowing you to do things similar to what you can do in TurboRepo, like "only test the packages and the packages that depend on them, compared to the main branch," or "only install dependencies for Package A and its dependencies," etc. I use native go tool to get dependencies and create dependency graph between the package.Nothing crazy but I feel it could be useful.

Re:Evolve your go workspace to a real monorepo by hahn-kev on Saturday August 24, 2024 @01:04AM (#41335791)
If this is not related to Mongo Db why is the name so similar?
Re:Evolve your go workspace to a real monorepo by ithkuil on Saturday August 24, 2024 @12:35PM (#41339403)
Because "mono" (repo) + "go" (the language)
Re:Evolve your go workspace to a real monorepo by elmazout on Monday August 26, 2024 @12:57PM (#41359168)
Right, the name is so bad, but if someone else have a better idea, I'm open.
Re:Evolve your go workspace to a real monorepo by ithkuil on Friday September 06, 2024 @01:20AM (#41463133)
Monogolar ?
Re:Evolve your go workspace to a real monorepo by TheDong on Sunday August 25, 2024 @08:48PM (#41352904)
It's surprising the go tooling doesn't have a more native way to do something like this already. Upstream issue: https://github.com/golang/go/issues/50745

Like, go already has test caching (so "only test stuff that changed" shouldn't be necessary, that should just happen), and code formatting and such is already quite fast...

Overall, I feel like having another tool which parses my go source code is going to be slower than writing a Makefile to wrap:

    go list -f '{{.Dir}}' -m | xargs -L1 go test ./...
which is all this tool doing really.

Also, hilariously, the repo isn't go fmt'd [0], despite being a tool to go fmt your repo. That's really funny, but I don't think the go community is ready for that level of humor yet, maybe one day.

[0]: https://github.com/nicolasgere/monogo/blob/2fb0b4985893e3397...

Re:Evolve your go workspace to a real monorepo by fragmede on Monday August 26, 2024 @05:01AM (#41355249)
blaze and bazel are why there's not a whole lot of upstream work dedicated to this issue
Re:Evolve your go workspace to a real monorepo by elmazout on Monday August 26, 2024 @12:30PM (#41358886)
True, but they are so much complex (and much more powerful). This is more an equivalent to turborepo, minimal config and integrate directly with the language.
Re:Evolve your go workspace to a real monorepo by bheadmaster on Monday August 26, 2024 @05:13AM (#41355319)
> That's really funny, but I don't think the go community is ready for that level of humor yet, maybe one day.

I am a Gopher, and ironically, I didn't quite understand what this means. Would you care to elaborate?

Re:Evolve your go workspace to a real monorepo by croshan on Monday August 26, 2024 @10:40AM (#41357604)
Go bootstraps itself (Go is compiled by Go) but Gofmt does not format itself (an even simpler job).
Re:Evolve your go workspace to a real monorepo by elmazout on Monday August 26, 2024 @12:30PM (#41358876)
I agree, it can be done with a makefile, just except the dependency based runner, if you have module A depending on B, you want to test A and B, this is what a tool like bazel would solve, as well as monogo.