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

Make protobuf generated api file under same package with .proto #1024

Open
hzxuzhonghu opened this issue Nov 8, 2024 · 4 comments · May be fixed by #1225
Open

Make protobuf generated api file under same package with .proto #1024

hzxuzhonghu opened this issue Nov 8, 2024 · 4 comments · May be fixed by #1225
Assignees
Labels
good first issue Good for newcomers kind/enhancement New feature or request

Comments

@hzxuzhonghu
Copy link
Member

What would you like to be added:

Currently we make the https://github.com/kmesh-net/kmesh/tree/main/api/workloadapi generated files into https://github.com/kmesh-net/kmesh/tree/main/api/v2/workloadapi. It does work well from fdunctionality, in my local dev IDE, goland/vscode, the code navigation does not work well, when i want to naviagate to

type Workload struct {
, but it jump to
message Workload {

@hzxuzhonghu hzxuzhonghu added kind/enhancement New feature or request good first issue Good for newcomers labels Nov 8, 2024
@7h3-3mp7y-m4n
Copy link

/assign

@7h3-3mp7y-m4n
Copy link

Hey @hzxuzhonghu

I was working on this and I believe the goal is to generate the workload.pb.go file inside kmesh/api/workloadapi (please correct me if I'm wrong). In the meantime, I manually used the following command:

protoc --proto_path=kmesh/api --go_out=kmesh/api/workloadapi --go_opt=paths=source_relative kmesh/api/workloadapi/workload.proto
This successfully generated the workload.pb.go file in the correct directory.
I manually ran the command because when I tried to use make gen-proto, it failed with the error Unsupported architecture: arm64. It would be really helpful if you could guide me on how to resolve this and run make successfully.
I also checked the install-protoc and other shell files, and I’m wondering if leveraging those might help me generate the files as intended. Any suggestions or guidance would be appreciated!

Thanks!

@hzxuzhonghu
Copy link
Member Author

Do you use arm64? I donot have an arm machine, maybe you can file an pr and lets look at the error from CI

@7h3-3mp7y-m4n
Copy link

Yeah, Let's see how the CI will address the error..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants