-
Notifications
You must be signed in to change notification settings - Fork 1.8k
internal/util: don't panic if project directory is outside go path #1417
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
internal/util: don't panic if project directory is outside go path #1417
Conversation
Hi @gflarity. Thanks for your PR. I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@gflarity Thanks for the PR! This something that's on our list to do. The plan is to remove the requirement for projects that are using go modules to be in
operator-sdk/cmd/operator-sdk/add/api.go Line 102 in 5f21f56
We do this in a bunch of places:
Thinking off the top of my head here, we'll need to update Thoughts? |
Unfortunately using the module path in a |
A quick glance of the usages of For example, I could create The other usage seems to be to build package path strings that we pass to
becomes
|
@joelanford you are correct as long as the project is using modules. However if the project is using |
Yes |
#1457 captures the idea of what this PR is trying to fix. |
Closing in favor of #1475 |
MustSetGopath was panic'ing (log.Fatalf) if the project directory wasn't in $GOPATH. However, with go modules this is perfectly reasonable now. Since go modules are default, I figured this should just be removed. Perhaps a new check should be added when under '--dep-manager dep'? I'm open to adding that with some direction, but this unblocked me for now.