-
Notifications
You must be signed in to change notification settings - Fork 553
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
Make track_files
work when configured with nil
#463
Conversation
03f6470
to
53e8150
Compare
Fixes simplecov-ruby#462. The implementation of `track_files` was refactored recently to suppress a warning in the underlying instance variable had not been initialized. This had the effect of changing the behavior when trying to nullify the default configuration of tracked files in some cases through the use of nil. With this change, a declaration of `track_files nil` will once again clear out any previous configuration and essentially disable the feature. Reference: * simplecov-ruby#447 * simplecov-ruby#462
53e8150
to
67a26d4
Compare
Hey! We might want to get this in sooner rather than later since it fixes a regression with |
Also, I think it might solve this issue: #467 |
Hello! It's been a while. 👋 It looks like this continues to be an issue. What do you think about getting this merged? |
Hey there! I'm in the process atm of reviewing all PRs and trying to get them all merged if none of the others has yet fixed the problem. I'm not familiar with track_files yet so it'll likely take me some more time to get to this, sorry :) |
No worries! Thanks for letting me know. |
Heyho! I've rebased this as 0be1563 - adjusted the tests a bit to not rely on global state and will merge it once the CI is green (cautiously waiting on that). Thanks for the great PR and the tests! 🎉 |
And merged 💃 |
0.14.1 2017-03-18 ([changes](simplecov-ruby/simplecov@v0.14.0...v0.14.1)) ======== ## Bugfixes * Files that were skipped as a whole/had no relevant coverage could lead to Float errors. See [#564](simplecov-ruby/simplecov#564) (thanks to @stevehanson for the report in [#563](simplecov-ruby/simplecov#563)) 0.14.0 2017-03-15 ([changes](simplecov-ruby/simplecov@v0.13.0...v0.14.0)) ========== ## Enhancements * Officially support JRuby 9.1+ going forward (should also work with previous releases). See [#547](simplecov-ruby/simplecov#547) (ping @PragTob when encountering issues) * Add Channel group to Rails profile, when `ActionCable` is loaded. See [#492](simplecov-ruby/simplecov#492) (thanks @BenMorganIO) * Stop `extend`ing instances of `Array` and `Hash` during merging results avoiding problems frozen results while manually merging results. See [#558](simplecov-ruby/simplecov#558) (thanks @aroben) ## Bugfixes * Fix parallel_tests when a thread ends up running no tests. See [#533](simplecov-ruby/simplecov#533) (thanks @cshaffer) * Skip the `:nocov:` comments along with the code that they skip. See [#551](simplecov-ruby/simplecov#551) (thanks @ebiven) * Fix crash when Home environment variable is unset. See [#482](simplecov-ruby/simplecov#482) (thanks @waldyr) * Make track_files work again when explicitly setting it to nil. See [#463](simplecov-ruby/simplecov#463) (thanks @craiglittle) * Do not overwrite .last_run.json file when refuse_coverage_drop option is enabled and the coverage has dropped (lead to you being able to just rerun tests and everything was _fine_). See [#553](simplecov-ruby/simplecov#553) (thanks @Miloshes) 0.13.0 2016-01-25 ([changes](simplecov-ruby/simplecov@v0.12.0...v0.13.0)) ========== ## Enhancements * Faster run times when a very large number of files is loaded into SimpleCov. See [#520](simplecov-ruby/simplecov#520) (thanks @alyssais) * Only read in source code files that are actually used (faster when files are ignored etc.). See [#540](simplecov-ruby/simplecov#540) (tahks @yui-knk) ## Bugfixes * Fix merging of resultsets if a file is missing on one side. See [#513](simplecov-ruby/simplecov#513) (thanks @hanazuki) * Fix Ruby 2.4 deprecation warnings by using Integer instead of Fixnum. See [#523](simplecov-ruby/simplecov#523) (thanks @nobu) * Force Ruby 2 to json 2. See [dc7417d50](simplecov-ruby/simplecov@dc7417d) (thanks @amatsuda) * Various other gem dependency fixes for different gems on different ruby versions. (thanks @amatsuda)
Fixes #462.
The implementation of
track_files
was refactored recently to suppress a warning in the underlying instance variable had not been initialized. This had the effect of changing the behavior when trying to nullify the default configuration of tracked files in some cases through the use of nil.With this change, a declaration of
track_files nil
will once again clear out any previous configuration and essentially disable the feature.Reference:
@track_files_glob
ivar warning #447/cc @kmewhort