Depending on a subset of modules in a git repo #3922
Replies: 1 comment
-
|
Thank you for the detailed issue, and yes, the slowness is due to the fact that each input is treated independently, and thus would be cloned separately. I've outlined a couple of options below: Option 1: push to the BSR This is the most straightforward, and a single push action from the repository containing all the modules would be sufficient to publish all of them. And then from there, clients can have the option of using generated SDKs or reference the modules in their That being said, I understand that there are situations where pushing to the BSR might not be an option, so I might have a solution for you. Option 2: use the So each input in However, this is a little bit complex, because the intention of the You'll end up with an error like: So you'll need to configure your |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am in a situation where I have a git repository containing a fairly large number of modules, structured like this
with
buf.yamlcontaining the followingand different clients depend on different subsets of these modules. I would prefer to avoid compiling all modules in all the different client builds since it is wasteful and slow. My solution originally was to include each module as its own input in
buf.gen.yamllike this:While this works fine, it still ends up being slow. As I understand it, the repository is cloned once for each input so git operations end up taking most of the time when calling
buf generate.Another option I have been testing is to do the git clone outside of buf and then use directory inputs to reference the cloned repository, but I would prefer not to go this route since it adds an extra step before
buf generatethat developers have to be aware of.So my question is, have I missed some other way of accomplishing this without cloning the repo multiple times and without compiling all modules in the repo?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions