Repository navigation
Use new out of gopath codegen - #125
Conversation
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: n3wscott The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
=======================================
Coverage 89.29% 89.29%
=======================================
Files 10 10
Lines 271 271
=======================================
Hits 242 242
Misses 22 22
Partials 7 7 Continue to review full report at Codecov.
|
aee2668 to
d0f122a
Compare
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
|
@googlebot I fixed it. |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
d0f122a to
0712ea6
Compare
|
/lgtm |
|
/retest |
|
|
||
| # Setup the env for doing Knative style codegen. | ||
|
|
||
| kn_hack_library=${kn_hack_library:-"$(dirname $0)/../vendor/knative.dev/hack/library.sh"} |
There was a problem hiding this comment.
$(dirname 0) will be ~/go/src/knative/discovery/vendor/knative.dev/hack so this'll resolve to ~/go/src/knative/discovery/vendor/knative.dev/vendor/knative.dev/hack/library.sh which I don't think is what you intend
There was a problem hiding this comment.
I think $0 is the file used as the entry point, and this file is intended to be sourced from the current codegen files. Is that not how it works?
There was a problem hiding this comment.
This works locally and on github actions
There was a problem hiding this comment.
it depends on how the entrypoint is invoked. if it's invoked with a relative path, then it'll be relative. if it's invoked with an absolute path, then it'll be absolute.
BONUS: if it's invoked via a symlink, it can be literally anything you want!
TRIVIA: this is how busybox compresses dozens of commands into a single binary
There was a problem hiding this comment.
The main point is codegen-library.sh is not invoked, it is sourced.
There was a problem hiding this comment.
Perhaps Cory's point is that you don't know from where 😉
There was a problem hiding this comment.
Actually, no. I think his comment is incorrect, but this does highlight another issue, which is that you are assuming the structure of the repo that's including things. 🤷
There was a problem hiding this comment.
I am making the assumption that 1- they are using go mod, 2 - they are invoking from a $PROJECT_ROOT/<FOLDER>, and 3- they are vendoring.
There was a problem hiding this comment.
it is not called the hack repo for nothing
|
/lgtm |
Changes