-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
formula_creator: commented examples for ruby dependencies #18190
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -201,6 +201,18 @@ def install | |||||||
virtualenv_install_with_resources | ||||||||
<% elsif @mode == :ruby %> | ||||||||
ENV["GEM_HOME"] = libexec | ||||||||
|
||||||||
# Install dependencies declared in a Gemfile.lock | ||||||||
# system "bundle", "config", "set", "without", "development", "test" | ||||||||
# system "bundle", "install" | ||||||||
|
||||||||
# Install dependencies declared as resources | ||||||||
# resources.each do |r| | ||||||||
# r.fetch | ||||||||
# system "gem", "install", r.cached_download, "--ignore-dependencies", | ||||||||
# "--no-document", "--install-dir", libexec | ||||||||
# end | ||||||||
|
||||||||
system "gem", "build", "\#{name}.gemspec" | ||||||||
system "gem", "install", "\#{name}-\#{@version}.gem" | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels weird. Why is it needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In order to make sure one of the previous commands ( Otherwise, for formulae with dependencies but without It is in our documentation: Line 248 in 638a3dc
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is true but I wonder how much of a problem this is for us in reality, particularly if we just move to using I think the ideal outcome here (but not blocking this PR on that) would be to run We could take a similar approach for other packaging systems, too, and it avoids all the |
||||||||
bin.install libexec/"bin/\#{name}" | ||||||||
|
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.
How often is this the case for new Ruby formulae? Seems like a
Gemfile.lock
is pretty standard now?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.
None in last 5 new Ruby formulae, but yes in last 10:
gem install
bundler
instead of resources homebrew-core#161343gem install
May also need to decide if
gem install
should be valid way of installing dependencies, or we should require--ignore-dependencies
.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 had a Gemfile.lock, I wonder why we didn't use it. Feels like it should be an audit failure if it has one and we don't use it.
gem install
seems like it could be valid, then, if we need version pinning although personally I'd tend towards just saying we always usebundle install
(given all of these haveGemfile
s)