Mage vs Makefile
jhillyerd opened this issue · comments
I've noticed a decent number of PRs that having failing unit tests. Running make
will run the entire test suite, as well as some linting/formatting checks. I know make is not common on Windows, switching to Mage would alleviate this, but add another (optional) dependency for Linux/OS X contributors.
Thoughts?
Primarily, I want PRs to have run the tests, the linter and gofmt: accomplished via make
or make all
Maybe I'd be better off having a bot post a welcome note on new PRs, since many folks don't know to look for CONTRIBUTING.md etc.
In my experience, golang developers on Windows environments commonly used
mingw or git-bash sdk to provide gcc/clang cgo, make usually comes along
for the ride.
That's very much not the case for me. I find using mingw or git-bash to be a very poor experience.
It seems like setting up a docker image to run the linter and gofmt would be a pretty heavy handed solution, and add a dependency on Docker.
Mage or even a simple go file that you can do go run make.go
(or similar; even passing args) and have it the appropriate thing would be a simple, lightweight solution.
I haven't used Docker on Windows, but I'm worried that cross-platform local mounts would be finicky. I definitely wouldn't want to have to git commit my code on Windows and pull it in a container. And rebuilding the entire container every time I want to run the tests would be very slow.
I think some research to see what Mage brings to the table is warranted, as Daniel makes a good point, a bare make.go
may get the job done.
I also need to update the current Makefile to fail instead of warn on gofmt errors.
I think we'll just stick with make for now. I may experiment with Mage on Inbucket, as it's build is getting more complicated and it would give me a better idea of what Mage brings to the table over a bare make.go file.