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:
Makefile
magic.task --list
showing the descriptions of the "make targets." (make help
can do it if there is one)Cons:
go-task
is uncertain.make
.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.
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.
I think we could add go-task with the second build tool and keep Makefile.
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.
Task author here.
Let me know if you have any questions or need any help.
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 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.
Most helpful comment
Task author here.
Let me know if you have any questions or need any help.