top | item 35956904

(no title)

evancordell | 2 years ago

I have long held similar opinions on make, and I've recently started using mage[0] in more and more go projects and have been happy with the result.

It's more task-oriented, the way people tend to write Makefiles with .PHONY rules, but it's all in go. It can be bootstrapped just with go too, and comes with some utilities to do make-like incremental builds if you need to.

[0]: https://magefile.org/

discuss

order

tpoacher|2 years ago

Couldn't you have achieved this even more simply by using make with a go shell?

Btw, from the linked page:

> Makefiles are hard to read and hard to write. Mostly because makefiles are essentially fancy bash scripts with significant white space and additional make-related syntax.

Wait what? What does bash have to do with anything? Mage may well be amazing, but it doesn't sound like this person knows make that well at all. Which makes me think they're simply trying to reinvent the wheel -- in 'go'.

evancordell|2 years ago

> Couldn't you have achieved this even more simply by using make with a go shell?

Make is still really about file to file transformations, and `go` already wraps up all of the behavior one would normally use make for. Plus you need make + a shell + go, vs. mage where all that's needed is go.

I can't speak for the author, but I assume they're reacting to how Makefiles tend to be used in go projects and not how make works generally.

emptysongglass|2 years ago

How does it compare to Just?

evancordell|2 years ago

I looked at both and came away thinking mage was more convenient for go-only projects. Just looked good and I would probably pick it for something that wasn't go-only (if make didn't make sense instead).