logoalt Hacker News

schrodingertoday at 1:31 AM3 repliesview on HN

To those who have used it: is it handy for situations where you have multiple repos that want to share a little code, but it's not worth the trouble of extracting a library, referencing it, publishing versioned releases, updating dependent repos, etc?

And instead just "sync" a code folder from one main repo (perhaps containing common domain models) to other repos?

Basically the Go philosophy that a little bit of copying is better than a lot of dependency?


Replies

ASinclairtoday at 2:03 AM

It’s largely used for syncing external open source projects with the monorepo. Policy is to require source code imports over built artifacts. Though you can get exceptions.

Some projects are also developed in the monorepo and exported via Copybara.

My team also uses it to version Starlark rule sets internally.

show 1 reply
xyzzy_plughtoday at 2:04 AM

It's for when you have a monorepo internally, and want to publish parts of it as open source to the world. They still need to live in the monorepo, so this is the solution.

Having a public repo as a dependency for your private corporate repo is a pain in the ass development-wise. Having a tree of such dependencies is a migraine.

show 1 reply
klodolphtoday at 4:21 AM

Copybara can do that but I think it will be annoying and tedious to use it that way. More annoying than the problem of extracting a library or shoving some files in a separate repo.