-
Notifications
You must be signed in to change notification settings - Fork 35
feat: Support mapping the vendor cache from workspace #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I like this. I suggest looking through the tests under |
It's pretty common for ruby projects to vendor their dependencies this is to help speedup install time and is probably more useful for hybrid projects rather than pure bazel ones that can use bazel caches. Needless to say it's still an important feature that will make CI faster in cases where there is no cache.
2d1811c
to
7ae6b39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this! Great idea and thank you for adding a working example.
One question: it is my understanding that *.gem file is just an archive with gem sources. However when the Bundler installs the gem, those that have native C-extensions will be built. Can this result in a case if eg Mac OSX binaries being "vendored" for a Linux runtime? Or are we simply talking about the sources in the *.gem files?
You can choose, the flag's your looking for are Either way things don't fail if a gem is missing from the bundle that will only happen if you run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very good, thank you for your contribution!
Need to make sure that the test suite is passing. |
Well, since it's passing! Congrats, and thank you once again 👍🏼 |
It's pretty common for ruby projects to vendor their dependencies this
is to help speedup install time and is probably more useful for hybrid
projects rather than pure bazel ones that can use bazel caches.
Needless to say it's still an important feature that will make CI
faster in cases where there is no cache.
This uses some ticks saw in the nodejs rules, they use a similar mechanism to mount the node_modules into the workspace. https://bazelbuild.github.io/rules_nodejs/dependencies.html#using-bazel-managed-dependencies
for example to use this you would be required to declare it like this
This would mount the bundle workspace directory into the run time environment, and allow bundler to use it
I'm just going to make this as a draft, but i would like feedback about if this is a reasonable approach, and if we should add tests for this case?
fixes: #62