Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a Makefile and bumping version of dependency #41

Merged
merged 4 commits into from
Mar 18, 2022
Merged

Conversation

javaducky
Copy link
Contributor

Very minor stuff while I was looking around. Figured I'd add a Makefile to make building locally a bit easier.

Don't know enough on the CI setup just yet, so I didn't change the Go version in go.mod.

@javaducky javaducky requested a review from imiric March 17, 2022 02:03
Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

It LGTM, but could you please split the changes into separate commits? Maybe 4: Makefile, dep upgrade, .gitignore and README? So that we could easily roll something back if needed.

Makefile Show resolved Hide resolved
go.mod Show resolved Hide resolved
@mstoykov
Copy link
Contributor

I really don't think the Makefile adds anything - most things in it replace go <command> with make <command> - so maybe add CONTRIBUTORS.md or INSTALLATION.md or update README.md 🤷

I also in general dislike Makefiles in go projects ... because in most cases they add nothing 🤣

@imiric
Copy link
Contributor

imiric commented Mar 17, 2022

Yeah, I don't use them either in Go projects, since I often need to change commands slightly. I would be lost without command history and ^R 😅

But if it helps someone, why not? 🤷‍♂️

@javaducky
Copy link
Contributor Author

javaducky commented Mar 17, 2022

Definitely doesn't add a lot, but does make it nice to make and have formatting, testing, etc. all done with a single command. For me, that's the developer experience win 😄.

As for the addition of a CONTRIBUTORS.md and such, I'm planning to add those across this and extensions.

@olegbespalov
Copy link
Contributor

olegbespalov commented Mar 17, 2022

I'll stay with the @javaducky, the Makefile makes sense. Important to highlight that it's also a tool for organizing the knowledge-sharing inside (and outside) the project.

E.g. today we need run tests using:

go test -cover -race ./...

tomorrow it can be

go test -cover -race -timeout 210s ./...

The other thing is standardization, e.g. we have in may project standard make target make check (which usually test + check), and for example, in my case I have a global git hook, that executes in every repository:

#!/bin/bash

output=$(make -n check 2>&1 | head -1)
if [[ "$output" != *"No rule to make target"* ]]; then
   echo "Running check"
   make check
fi

which shift left the issue detecting and saves me time

Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Paul!

@javaducky javaducky merged commit 25958d3 into master Mar 18, 2022
@javaducky javaducky deleted the paul/makefile branch March 18, 2022 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants