Closed jhillyerd closed 5 years ago
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.
Is there a specific issue that you are trying to solve? Perhaps we can resolve this through documentation rather than introducing unnecessary dependencies.
On Sat, Dec 8, 2018, 3:05 PM James Hillyerd <notifications@github.com wrote:
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?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jhillyerd/enmime/issues/108, or mute the thread https://github.com/notifications/unsubscribe-auth/ANlVUgIDDauXUHl9YWaw9eGw-QfpYntKks5u3Bt7gaJpZM4ZJy52 .
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.
TravisCI already runs these on push. If we want it to be easier to run the tests locally, I can put a Dockerfile and docker-compose.yml together. Then contributors won't need to worry about any dependencies except docker.
Would this help? I would also write some documentation around running the tests in docker.
It may also help to make some wiki pages and link to it from the main readme.md
Let me know if you approve and I will get started.
On Sun, Dec 9, 2018, 11:41 AM James Hillyerd <notifications@github.com wrote:
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.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jhillyerd/enmime/issues/108#issuecomment-445552113, or mute the thread https://github.com/notifications/unsubscribe-auth/ANlVUmOHf16l-maOtNxiIGNMdp_a3-HGks5u3T0jgaJpZM4ZJy52 .
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.
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?