Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make it possible to share Buck rules between different projects #116
When a build process for a non trivial project (e. g. Gerrit Code Review) is implemented in Buck, a lot of custom scripts/recipes are created. It turns out that substantial part of these scripts/recipes is very useful and urgently needed for other projects.
Currently there is no built in way in Buck to share/reuse scripts/recipes between projects.
Gerrit Code Review project has created bucklets  project and it is currently hosted on gerrit-review. First project from Gerrit eco system was migrated to Buck (re-)using only bucklets as Git submodule .
Please help to upstream that in one or another way. It's urgently needed to move further projects from Gerrit eco system (e. g. Gerrit plugins, JGit, EGit, ...) to Buck without code duplication.
referenced this issue
May 20, 2014
So the old code  to consume
or even just:
Another question: the backend for
If you can provide a patch for it, (as a file or branch) i would be happy to give it a try.
Where is the link/mapping between
We would get multiple
in some configuration file, and without cloning this repo, or adding it to my own project as a submodule. I should be able to say
Another approach would be to add dedicated Buck command to handle that with say
I started to implement cross cell support in gerrit, to simplify workflow for integration of WIP stuff across project boundaries. One typical example of it include changes in JGit (main Gerrit dependency and Git implementation in Java programming language), Gerrit itself and dedicated plugin, when the feature implementation is split in core and plugin part, like for example LFS support to allow plugin to provide their own specific protocol implementations: . , .
I hope that cross cell support, isolating jgit in gerrit project in its own cell, can solve this. It would work as is per default and could be hijacked per CLI option and be routed to JGit development tree. I still have some issues to make it actually work and filed #544 and #545.
Another problem I'm facing is the missing support for
So when a plugin is implemented standalone Buck build (outside of gerrit tree), see for example: https://github.com/davido/gerrit-oauth-provider it's basically consuming pre-defined bucklet: 
Right now I'm getting error: "include should start with '//' or some such" when i was trying to pass cell prefix:
pushed a commit
Jan 28, 2016
Two years later, after this issue was created, I've discovered, that Bazel team released the cross project dependency support, with the ability to fetch the deps from remote repositories, "mount" and re-use them in build toolchain: .
This will download all of the tools the rules need to build Scala programs.
We have extracted Bucklets from Gerrit Code Review build tool chain: . Unfortunately, Buck still doesn't have support for fetching and using external Buck scripts. And it's just annoying to link Bucklets as git submodules to each and every Gerrit Code Review plugin: .