bazel-contrib/rules_ruby

Only download gems needed for the targets I request

Opened this issue · 0 comments

Note, this is "nice to have", maybe not a requirement for a 1.0 of rules_ruby.

Use case: I'm in a monorepo where one app has 1000 giant dependencies. I write a little ruby tool for all developers to run, and it only needs one small gem, call it "mygem".

I don't want users of my tool to have to wait to download all the giant dependencies. So the bundler install would have to be decomposed such that each gem goes in its own external/ repository, and then in my BUILD files instead of depending on "all gems" like @bundler//:all, I would depend on @bundler_mygem. That way the other gems aren't referenced in the build graph and so they aren't fetched.