RFC: Replace Makefile with go-task #2813

Closed
opened 2025-11-02 04:49:20 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @typeless on GitHub (Jan 25, 2019).

This is a brainstorming-stage proposal.
I was thinking about improving some aspects of developer UX like testing/benchmarking selectively a particular integration test. But to make it happen, I'd have to inevitably resort to some advanced GNU Make usage, which would complicate the Makefile and making it harder to maintain.

It seems that go-task would be an interesting candidate.
I am not sure if it would be significantly better than the status quo to warrant the migration though.

The pros I can think of right now:

  1. No more obscured Makefile magic.
  2. Probably better cross-platform dev UX.
  3. It's written in Go, so it can even be vendored.
  4. No GNU make required. One can start from anywhere Go toolchain is available,
  5. It supports something like task --list showing the descriptions of the "make targets." (make help can do it if there is one)

Cons:

  1. It needs effort to port.
  2. Current developers need to learn an unfamiliar tool.
  3. The maturity of go-task is uncertain.
  4. Not sure if the current usage required by Gitea is all met.
  5. It's not widely adopted currently like make.
Originally created by @typeless on GitHub (Jan 25, 2019). This is a brainstorming-stage proposal. I was thinking about improving some aspects of developer UX like testing/benchmarking selectively a particular integration test. But to make it happen, I'd have to inevitably resort to some advanced GNU Make usage, which would complicate the Makefile and making it harder to maintain. It seems that [go-task](https://github.com/go-task/task) would be an interesting candidate. I am not sure if it would be significantly better than the status quo to warrant the migration though. The pros I can think of right now: 1. No more obscured `Makefile` magic. 2. Probably better cross-platform dev UX. 3. It's written in Go, so it can even be vendored. 4. No GNU make required. One can start from anywhere Go toolchain is available, 5. It supports something like `task --list` showing the descriptions of the "make targets." (`make help` can do it if there is one) Cons: 1. It needs effort to port. 2. Current developers need to learn an unfamiliar tool. 3. The maturity of `go-task` is uncertain. 4. Not sure if the current usage required by Gitea is all met. 5. It's not widely adopted currently like `make`.
GiteaMirror added the type/proposal label 2025-11-02 04:49:20 -06:00
Author
Owner

@strk commented on GitHub (Jan 27, 2019):

Please keep the Makefile around shall you decide to use another
tool. make is a familar interface, even if it'll end up wrapping
something different.

@strk commented on GitHub (Jan 27, 2019): Please keep the Makefile around shall you decide to use another tool. `make` is a familar interface, even if it'll end up wrapping something different.
Author
Owner

@zeripath commented on GitHub (Jan 27, 2019):

We could certainly make more use of make automatic variables https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html to reduce the amount of duplication in the makefile and reduce it to a thinner wrapper around go test etc.

@zeripath commented on GitHub (Jan 27, 2019): We could certainly make more use of make automatic variables https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html to reduce the amount of duplication in the makefile and reduce it to a thinner wrapper around go test etc.
Author
Owner

@lunny commented on GitHub (Feb 1, 2019):

I think we could add go-task with the second build tool and keep Makefile.

@lunny commented on GitHub (Feb 1, 2019): I think we could add go-task with the second build tool and keep Makefile.
Author
Owner

@jolheiser commented on GitHub (Feb 4, 2019):

I would like to also mention Mage as a candidate.
The "magefile" is fully written in Go and Mage has a zero install option, so it can be vendored and ran via go run..

Since it is just a .go file, anyone working on the project should be able to interpret and modify the "magefile" as needed.

@jolheiser commented on GitHub (Feb 4, 2019): I would like to also mention [Mage](https://magefile.org/) as a candidate. The "magefile" is fully written in Go and Mage has a [zero install option](https://magefile.org/zeroinstall/), so it can be vendored and ran via `go run`.. Since it is just a `.go` file, anyone working on the project should be able to interpret and modify the "magefile" as needed.
Author
Owner

@andreynering commented on GitHub (Sep 7, 2019):

Task author here.

Let me know if you have any questions or need any help.

@andreynering commented on GitHub (Sep 7, 2019): Task author here. Let me know if you have any questions or need any help.
Author
Owner

@lunny commented on GitHub (Sep 7, 2019):

I think we could have both makefile and go-task for a while.

@andreynering I used go-task on most my projects because windows users could also use it. Some annoying things are we need some simple cross-platform commands i.e. copy files/move .

@lunny commented on GitHub (Sep 7, 2019): I think we could have both makefile and go-task for a while. @andreynering I used go-task on most my projects because windows users could also use it. Some annoying things are we need some simple cross-platform commands i.e. copy files/move .
Author
Owner

@andreynering commented on GitHub (Sep 7, 2019):

@lunny Yeah, I remember that you opened an issue about it here: https://github.com/go-task/task/issues/197.

My advice to Gitea (while is isn't being implemented) is to advice contributors to use a Unix-like shell on Windows. Git Bash is the easiest one: it comes with Git on Windows, so most developers should already have it installed. Inside Git Bash you have basic Unix tools like rm, cp, mv, touch, grep and many others available, so you don't depend on Task implementing it itself.

Maybe it's not the ideal scenario, but it's already a win, since Make often doesn't work nicely on Windows.

@andreynering commented on GitHub (Sep 7, 2019): @lunny Yeah, I remember that you opened an issue about it here: https://github.com/go-task/task/issues/197. My advice to Gitea (while is isn't being implemented) is to advice contributors to use a Unix-like shell on Windows. Git Bash is the easiest one: it comes with Git on Windows, so most developers should already have it installed. Inside Git Bash you have basic Unix tools like `rm`, `cp`, `mv`, `touch`, `grep` and many others available, so you don't depend on Task implementing it itself. Maybe it's not the ideal scenario, but it's already a win, since Make often doesn't work nicely on Windows.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2813