-
Notifications
You must be signed in to change notification settings - Fork 785
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
Makefile: list sources via find
conditionally
#5807
Makefile: list sources via find
conditionally
#5807
Conversation
@nalind I noticed you've added certain sources over time, so if there's a reason to selectively list sources that I'm not aware of, I can also only add |
I hadn't considered that modifying files under |
I mean I use it quite often w/ podman when testing c/* changes and it's come in quite handy.
We were validating the sources because we were listing them manually, I guess moving to a finder cmd, I don't see the need for a validation anymore, wdyt? Do we have benchmarks to test if there's a performance degradation? I can think of vendor bumps as an additional trigger for rebuilds, can't think of anything major that should have an impact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a go file changed we should rebuild, in vendor/ or not. Because if I do a dependency bump locally via gp.mod then make buildah currently doesn't rebuild so this is clearly broken. As such I think this here is the right idea.
I don't see any advantage of listing all the packages here so the find seems much better to me. Even if it would pick something up that does not need to trigger a rebuild all the time go rebuilds are fast anyway so I would not be concerned about speed.
b87b49a
to
40612f1
Compare
LGTM |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danishprakash, nalind The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably also remove *.go files from some of the targets that use `$(SOURCES). For example:
bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz
Here cmd/buildah/*.go
is becoming redundant.
40612f1
to
fbe0070
Compare
The current list of sources doesn't list vendor sources and some other .go files, requiring manual modifications to the Makefile to build binaries. This change uses `find` (from Podman's Makefile) to detect .go files across the repo. Removes the validation script since we're no longer specifying sources manually. And removes explicit *.go files as binary sources. Signed-off-by: Danish Prakash <[email protected]>
fbe0070
to
17ee51d
Compare
Thanks for the catch, updated. |
LGTM |
/lgtm |
Taken directly from podman's Makefile. The current list doesn't list vendor sources and therefore if you need to build and test your changes to vendor/ for testing a backport or anything else, it's required to modify the Makefile before attempting to do so.
/kind other
Signed-off-by: Danish Prakash [email protected]