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

Simplify bindings generation #8994

Merged
merged 2 commits into from
Jan 17, 2021

Conversation

vrothberg
Copy link
Member

  • Use ./vendor to avoid dependency look ups via the network
  • Simplify the bindings generation

Please see the individual commit messages.

Fixes: #8989

@baude @rhatdan PTAL

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 17, 2021
Set `-mod=vendor` when generating the bindings.  We expect all
dependencies to be vendored already.  This should slightly speed
up the bindings generation and prevent redundant network accesses.

Signed-off-by: Valentin Rothberg <[email protected]>
Run `go generate ./pkg/bindings/...` once for all bindings instead of
generating them separately.  This should speed up bindings generation
as a given package is visited only once, and it fixes containers#8989 by dropping
the use of pushd and popd.

Fixes: containers#8989
Signed-off-by: Valentin Rothberg <[email protected]>
@mheon
Copy link
Member

mheon commented Jan 17, 2021 via email

@baude
Copy link
Member

baude commented Jan 17, 2021

LGTM

@vrothberg
Copy link
Member Author

vrothberg commented Jan 17, 2021

I remain doubtful that the .generate-bindings file is a sane way of managing this

I am completely open to change that but it's the only way I know in Make to prevent redundant recompilation. Pretty much the same trick that's being used in C for .o files, and the resulting binary.

@rhatdan
Copy link
Member

rhatdan commented Jan 17, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 17, 2021
@openshift-merge-robot openshift-merge-robot merged commit 00ab9ca into containers:master Jan 17, 2021
@vrothberg vrothberg deleted the fix-8989 branch January 17, 2021 20:40
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make fails with pushd/popd errors
6 participants