Skip to content
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

Verbose extension builder #261

Merged
merged 4 commits into from
Jan 17, 2012
Merged

Conversation

terceiro
Copy link
Contributor

The Debian Ruby packaging helper, gem2deb uses Rubygems to build C extensions to make sure we are 100% compatible with Rubygems packages. When building Debian packages it's useful to follow the build as it goes, but currently Rubygems hides the compilation from the user -- what makes a lot of sente.

This branch makes the extension builder output terminal as the build proceeds upon request. gem install --verbose will enable this behavior, and gem2deb would enable it by setting Gem.configuration.verbose directly. The default is to behave as it does now, i.e. to not output anything unless something goes wrong.

Whenever an extension builder has its verbose attribute set to something
non-falsy, the commands executed to build the gem will output to the
terminal. This lets us follow what's happening during compilations that
take some time to complete.

The default is to behave exactly like before.
This way invoking `gem install --verbose` will display the entire
compilation process in the terminal.
@luislavena
Copy link
Member

I really like it! Always hated the need to hunt gem make.out

Will take a look at the office.

Thanks!

Sorry for top posting. Sent from mobile.
On Jan 13, 2012 8:45 AM, "Antonio Terceiro" <
reply@reply.github.com>
wrote:

The Debian Ruby packaging helper, gem2deb
uses Rubygems to build C extensions to make sure we are 100% compatible
with Rubygems packages. When building Debian packages it's useful to follow
the build as it goes, but currently Rubygems hides the compilation from the
user -- what makes a lot of sente.

This branch makes the extension builder output terminal as the build
proceeds upon request. gem install --verbose will enable this behavior,
and gem2deb would enable it by setting Gem.configuration.verbose
directly. The default is to behave as it does now, i.e. to not output
anything unless something goes wrong.

You can merge this Pull Request by running:

git pull https://github.com/terceiro/rubygems verbose-ext-builder

Or you can view, comment on it, or merge it online at:

#261

-- Commit Summary --

  • Remove duplication when running commands
  • Add verbose option to extension builders
  • Use existing verbose setting

-- File Changes --

M lib/rubygems/ext/builder.rb (22)

-- Patch Links --

https://github.com/rubygems/rubygems/pull/261.patch
https://github.com/rubygems/rubygems/pull/261.diff


Reply to this email directly or view it on GitHub:
#261


unless $?.success? then
raise Gem::InstallError, "#{class_name} failed:\n\n#{results.join "\n"}"
results << "Look above for error messages!" if verbose
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error message needs to be improved. Perhaps "Building has failed. See above output for information on failure."

@terceiro
Copy link
Contributor Author

hi @evanphx, I've pushed an updated error message. I'm not a native English speaker, and will appreciate any enhancement suggestions.

@evanphx
Copy link
Member

evanphx commented Jan 17, 2012

Looks good! Thanks!

evanphx added a commit that referenced this pull request Jan 17, 2012
@evanphx evanphx merged commit 044ca85 into rubygems:master Jan 17, 2012
nobu pushed a commit to nobu/rubygems that referenced this pull request Jan 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants