-
Notifications
You must be signed in to change notification settings - Fork 482
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
update-codegen.sh does not work on M1 mac out of the box #732
Comments
@aariv1 does adding the following line work for you locally? (if so, feel free to raise a PR) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh
index 6303a29c..0f626256 100755
--- a/hack/update-codegen.sh
+++ b/hack/update-codegen.sh
@@ -19,6 +19,7 @@ set -o nounset
set -o pipefail
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[@]}")/..
+mkdir -p "{SCRIPT_ROOT}/hack/tools/bin"
TOOLS_DIR=$(realpath ./hack/tools)
TOOLS_BIN_DIR="${TOOLS_DIR}/bin" |
@aariv1 I encountered the same issue on my Mac, but when I used Ubuntu, everything worked fine. Maybe you could try using Linux to see if it helps. |
Adding |
/assign |
applied this fix and then received when the script ran
not sure if this is related to the underlying issue here. |
@clubanderson your issue seems to be caused by Go 1.22 - which is incompatible w/ the controller-gen version. Go 1.21 works: Line 3 in ab04632
Meanwhile I will bump the version of controller-gen so Go 1.22 can also work. |
yep - that worked -
|
Area
Other components
codegen
What happened?
This is more of an annoyance but when you execute ./hack/update-codegen.sh on m1 mac it by default fails because realpath fails if the path you are requesting does not exist. The error in this case is simply:
realpath: ./hack/tools: No such file or directory
What did you expect to happen?
Expectation is that you could run the update-codegen.sh without needing to create the tools directory beforehand
For example something like this:
TOOLS_DIR=$(realpath ./hack) TOOLS_DIR+="/tools"
How can we reproduce it (as minimally and precisely as possible)?
On at least m1 mach clone the repo and execute hack/update-codegen.sh
Anything else we need to know?
No response
Kubernetes version
Scheduler Plugins version
The text was updated successfully, but these errors were encountered: