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

Guard/Spork error in Simplecov 0.8.1 and up #262

Closed
jordanrs opened this issue Nov 22, 2013 · 5 comments
Closed

Guard/Spork error in Simplecov 0.8.1 and up #262

jordanrs opened this issue Nov 22, 2013 · 5 comments
Labels

Comments

@jordanrs
Copy link

The following issue seems to have been introduced for me in the changes to the at_exit block in PR #213. Previously the old code would assign @exit_status to nil if neither SimpleCov::ExitCodes::MINIMUM_COVERAGE or SimpleCov::ExitCodes::MAXIMUM_COVERAGE_DROP were set. This meant that the exit call at the bottom would not be called.

Now since @exit_status is always set it will always call exit which is causing the below exception when run using guard/spork. No errors are thrown when run normally from the console

Im not sure wether this is a simplecov issue or one of the other gems but should simplecov call exit! instead at the end to terminate the process immediately or not call exit again if the status hasn't changed from the one passed in so the at_exit continues on with the original code.

A quick test locally of calling exit! prevents the error in guard/spork and still leaves all the tests passing, im just not sure if this would have any implications on other gems so iv put it out there for some smarter minds to weigh in on..

Gems
spork (1.0.0rc3)
guard-rspec (= 2.5.0)
guard-spork (= 1.5.0)
guard (2.2.3)
rspec (2.14.1)

Exception encountered: #<SystemExit: exit>
backtrace:
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/simplecov-0.8.1/lib/simplecov/defaults.rb:80:in `exit'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/simplecov-0.8.1/lib/simplecov/defaults.rb:80:in `block in <top (required)>'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork.rb:77:in `call'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork.rb:77:in `exec_after_each_run'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:14:in `block in run'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork/forker.rb:21:in `block in initialize'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork/forker.rb:18:in `fork'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork/forker.rb:18:in `initialize'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/jordan/.rvm/gems/ruby-2.0.0-p247@app/gems/spork-1.0.0rc3/lib/spork/server.rb:48:in `run'
/Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/drb/drb.rb:1588:in `perform_without_block'
/Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/drb/drb.rb:1548:in `perform'
/Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/drb/drb.rb:1626:in `block (2 levels) in main_loop'
/Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/drb/drb.rb:1622:in `loop'
/Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/drb/drb.rb:1622:in `block in main_loop'
Done.
@Nerian
Copy link

Nerian commented Nov 22, 2013

I have this issue too.

@colszowka
Copy link
Collaborator

Oh boy, development is hard :(

@aysark
Copy link

aysark commented Jan 6, 2014

I have this issue too;

Coverage report generated for RSpec to /home/aysar/Downloads/gowashly/tmp/coverage. 218 / 618 LOC (35.28%) covered.
Exception encountered: #<SystemExit: exit>
backtrace:
/home/aysar/.rvm/gems/ruby-1.9.3-p484/gems/simplecov-0.8.2/lib/simplecov/defaults.rb:80:in `exit'

jordanrs added a commit to jordanrs/simplecov that referenced this issue Jan 6, 2014
@pboling
Copy link

pboling commented Apr 8, 2014

👍 just ran into this.

Coverage report generated for RSpec to /Users/pboling/Documents/trumaker/archer/coverage. 2911 / 4628 LOC (62.9%) covered.
Exception encountered: #<SystemExit: exit>
backtrace:
/Users/pboling/.rvm/gems/ruby-2.0.0-p451@trumaker/gems/simplecov-0.8.2/lib/simplecov/defaults.rb:80:in `exit'
/Users/pboling/.rvm/gems/ruby-2.0.0-p451@trumaker/gems/simplecov-0.8.2/lib/simplecov/defaults.rb:80:in `block in <top (required)>'
/Users/pboling/.rvm/gems/ruby-2.0.0-p451@trumaker/gems/spork-0.9.2/lib/spork.rb:77:in `call'
/Users/pboling/.rvm/gems/ruby-2.0.0-p451@trumaker/gems/spork-0.9.2/lib/spork.rb:77:in `exec_after_each_run'

@bf4
Copy link
Collaborator

bf4 commented Jan 28, 2015

Is this still an issue in the 0.9 series? Please re-open with more info.

@bf4 bf4 closed this as completed Jan 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants