Hacker News new | ask | show | jobs
by mjk7841 2985 days ago
I'm also curious about this. It seems that many go developers out there are using Makefiles. Makefiles are a good solution for golang projects in some cases, but I've seen a lot of people really abusing Makefiles and trying to use them for more generic task running.

In a past life, we used invoke [1] for task running. It was incredible but has the same problem as rake: it introduces another language (Python) and more dependencies.

There's a fairly new task runner being developed in go called mage [2], but it didn't seem worth the jump yet to me as it's still pretty immature (I haven't played with it in a few months, though). Did you consider trying that out?

[1] https://github.com/pyinvoke/invoke [2] https://github.com/magefile/mage

5 comments

I like using make even for basic task running. It’s usually installed where I’m working and is familiar. I don’t want to install rake or mage.
Make gets a bad rap but I've seen it being used for susbtantially complex workflows. If you wrap your commands in something that can reattach to running processes and use dependencies correctly, it is hard to displace.
I've used make as an static site generator, it is actually very neat for that purpose and makes rebuilds quite fast and parallel.
I just started using godo [1] and I like it so far. Implement tasks in Go, bash, or the provided wrappers around os/exec.

Biggest advantage over a generic tool like Make is that you can import your project dependencies (such as your database configuration) into your task.

[1] https://github.com/go-godo/godo

Just [0] is a pretty great generic task runner incase anyone is looking for one. It's written in Rust so it doesn't introduce any new languages (single binary install) and it uses a make inspired syntax but aims to avoid some of Make's issues.

[0] https://github.com/casey/just

I've used task with much success https://github.com/go-task/task
What’s wrong with using Make for running generic tasks?