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

client-gen generates empty files when using Go 1.23 #176

Open
JRBANCEL opened this issue Aug 13, 2024 · 2 comments
Open

client-gen generates empty files when using Go 1.23 #176

JRBANCEL opened this issue Aug 13, 2024 · 2 comments

Comments

@JRBANCEL
Copy link

We use client-gen like this:

client-gen \
        --input-base "github.com/<WHATEVER>/pkg/apis" \
        --input "dedicated/v1alpha1" \
        --output-pkg github.com/<WHATEVER>/pkg/clientset \
        --go-header-file hack/header.txt \
        --clientset-name versioned \
        --output-dir ./pkg/clientset

Works fine in 1.22.0 (and v0.30.1).

Now, when I bump go.mod to use 1.23.0, client-gen generates files with just the package statement:

// Code generated by client-gen. DO NOT EDIT.

package v1alpha1

Output with -v 10 doesn't show anything interesting.
I tried to update client-gen to v0.31.0, same result.

@Airblader
Copy link

Several people in my team have the same issue with tooling like deepcopy-gen. Oddly, though, for me it seems to work.

@luca-filipponi
Copy link

@JRBANCEL try to clean the go mod cache go clean -modcache, this worked for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants