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

Construct package dependencies using Go #3239

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

skitt
Copy link
Member

@skitt skitt commented Dec 4, 2024

For best results, Make should be told about all the files a given target depends on. For Go programs, this is the program's main Go file, and all non-test Go files in directories corresponding to packages the main Go file depends upon (including transitive dependencies).

This adds a Make macro using go list to retrieve a package's dependencies, and constructs the corresponding list of files to use as target prerequisites.

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr3239/skitt/pkgdeps
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

Makefile Show resolved Hide resolved
Copy link
Member

@dfarrell07 dfarrell07 left a comment

Choose a reason for hiding this comment

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

Very cool! Minor question/docs feedback inline.

For best results, Make should be told about all the files a given
target depends on. For Go programs, this is the program's main Go
file, and all non-test Go files in directories corresponding to
packages the main Go file depends upon (including transitive
dependencies).

This adds a Make macro using go list to retrieve a package's
dependencies, and constructs the corresponding list of files to use as
target prerequisites.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@submariner-bot submariner-bot added the ready-to-test When a PR is ready for full E2E testing label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants