You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/04/21 20:05:06 UTC

[GitHub] [ozone-go] elek commented on pull request #6: HDDS-5085. Create initial project structure with importing POC code

elek commented on pull request #6:
URL: https://github.com/apache/ozone-go/pull/6#issuecomment-824323472


   > Can we copy the protobufs from the Ozone project rather than adding precompiled proto files ? with 1.1.0 release done now, We should take a dependency on the proto files
   
   Thanks for the suggestion @mukul1987. Yes, originally the proto files where there, but they accidentally be deleted. I restored them now.
   
   These are 1.0.0 proto files but created https://issues.apache.org/jira/browse/HDDS-5132 to updated them to the latest release.
   
   
   
   
   Note: I considered making it more dynamic (generating the code on the fly or downloading them on the fly) but I faced with different issues:
   
    1. It's not very easy to download artifacts for each build as they are published as maven artifacts which is not compatible with go ecosystem
    2. I think it's better to use the latest stable release from Ozone which doesn't really require ad-hoc download
    3. As the proto files include java based package names I added minor modifications to the proto files after the import: for example I added `option go_package = "github.com/apache/ozone-go/api/proto/common";` 
   
   (3.) is especially important. Thanks for the comment to include the original proto files. It's very important, because they include the required modifications in the headers.
   
   
   
   Note2: In the go word it's quite common to commit the generated go files (or even dependencies, `vendor` directory sometimes also included in the repos). For example the Kubernetes repo also follows this approach: there are a lot of generated files around this: https://github.com/kubernetes/client-go/blob/master/listers/apps/v1/controllerrevision.go
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org