-
Notifications
You must be signed in to change notification settings - Fork 33
Add support for adding just the gems in a particular bundle group#127
Add support for adding just the gems in a particular bundle group #127robertgates55 wants to merge 7 commits intobazelruby:master from
Conversation
I understand about bundle groups, And I can see how that might be a useful feature.
What I don't understand is your comment about using pre-installed gems in your doctor container.
As you well know many ruby gems require native extensions to be built in C. Those extensions are heavily operating system dependent. If you build a local gem on OS X you cannot copy the result straight into a docker container and expect them to work, unless the gem is pure ruby, OR you are on the same linux variant as the docker container itself. In any other situation you would still need to run bundle install to compile native extensions.
Finally there an error on CI:
registering gem parser with binaries: ["bin/ruby-parse", "bin/ruby-rewrite"]
registering gem rspec-core with binaries: ["bin/rspec"]
registering gem rubocop with binaries: ["bin/rubocop"]
create_bundle_build_file.rb:245:in `prepend': can't modify frozen String: "awesome_print" (FrozenError)
@kigster
kigster
left a comment
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.
CI is failing, and needs to be fixed.
...s55/rules_ruby into support_bundle_groups
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.
You need to do GEM_GROUP.dup to bypass the frozen constant error. The way it's written right now, the code is attempting to modify the frozen constant.
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.
Please annotate with comments each line here and explain what it's doing.
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.
What?
Interested in feedback for this. I'm trying to take the downloaded/installed gems and use them within a container image; and we make pretty extensive use of bundle groups.