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

Consider decoupling package->directory lookups from $PWD #64

Closed
jmillikin-stripe opened this issue Jul 7, 2017 · 6 comments
Closed
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@jmillikin-stripe
Copy link

Branching discussion from kubernetes/repo-infra#19

Gengo currently assumes that a package "k8s.io/foo/bar" can always be found in ${PWD}/k8s.io/foo/bar/, and becomes very unhappy if the generator program is called from a different directory. This makes its use from Bazel rules complicated, and requires Kubernetes BUILD files to use custom logic such as go_genrule() instead of Bazel's built-in genrule().

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 31, 2017
@thockin
Copy link
Member

thockin commented Jan 2, 2018 via email

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Jan 2, 2018
@jmillikin-stripe
Copy link
Author

See def _compute_genrule_command(ctx): in the linked patch for a more complete comment, and to see how gengo is being invoked.

Bazel assumes that the build steps it runs are insensitive to the current working directory. For Gengo this isn't true, it expects certain Go packages to be located at particular parts of the filesystem as resolved relative to $PWD. As a result, the Kubernetes build scripts need to define their own genrule-like wrapper to set up a Gengo-compliant environment.

(I don't have full context any more since this was filed months ago as a side-effect of some other yak hunt)

@nikhita
Copy link
Member

nikhita commented Jul 18, 2018

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 18, 2018
@estroz
Copy link

estroz commented May 20, 2019

This directly relates to parsing non-GOPATH repos: #144 (comment)

@thockin
Copy link
Member

thockin commented Jan 28, 2024

Will be fixed in v2 (#259)

@thockin thockin closed this as completed Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

6 participants