Skip to content

Bump simplecov from 0.22.0 to 1.0.2#93

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/simplecov-1.0.2
Open

Bump simplecov from 0.22.0 to 1.0.2#93
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bundler/simplecov-1.0.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 18, 2026

Copy link
Copy Markdown

Bumps simplecov from 0.22.0 to 1.0.2.

Release notes

Sourced from simplecov's releases.

v1.0.2

What's Changed

Full Changelog: simplecov-ruby/simplecov@v1.0.1...v1.0.2

v1.0.1

What's Changed

New Contributors

Full Changelog: simplecov-ruby/simplecov@v1.0.0...v1.0.1

v1.0.0

What's Changed

... (truncated)

Changelog

Sourced from simplecov's changelog.

1.0.2 (2026-07-18)

Bugfixes

  • The standalone simplecov CLI's colorizing subcommands (report, uncovered, coverage, diff) no longer crash with NoMethodError: undefined method 'color' when run in a project without a .simplecov file. The CLI deliberately loads only simplecov/cli rather than the full library, so SimpleCov.color was undefined unless a dotfile load had incidentally defined it — and --no-color was the only workaround, since the documented NO_COLOR env var was checked after the line that raised. Color.enabled? now treats missing configuration the same as its :auto default and falls through to NO_COLOR / FORCE_COLOR / TTY detection. Reported with an exemplary diagnosis by @​hasghari. See #1231.
  • Branch tuples synthesized for tracked-but-unloaded files now match Ruby's Coverage for a safe-navigation call that takes a block. For x&.foo { ... } (and the second link of a chain like x&.foo&.bar { ... }) the extractor keyed the branch on the call node's full source range, which extends through the attached block, while Coverage ends the range at the call itself — so a simulated entry merging with a real one produced a phantom, permanently-missed branch, the same failure mode as the elsif fix in 1.0.1. Reported with an exemplary diagnosis and a suggested fix by @​alexdeng-mp. See #1233.
  • Prompted by the two reports above, an exhaustive differential audit of StaticCoverageExtractor against Ruby's Coverage — a fuzzing harness that runs thousands of generated programs through both and diffs the branch tuples, now part of the spec suite (opt-in via SIMPLECOV_FUZZ=1) — surfaced and fixed four more mismatches of the same phantom-branch class. Conditions that are compile-time literals (if true, if 1, a ternary on a literal) are folded away by Ruby's compiler and no longer produce synthesized branches (while true still does — loops are not folded). On Ruby 3.3, three legacy conventions now match: the body range of a do-while (begin ... end while), the location of empty branch arms (which on 3.3 depends on whether the construct is in value or void position), and one-line pattern matching (x => pattern / x in pattern), which emits a :case branch on 3.3 and nothing on 3.4+. The audit also caught a crash on Ruby 3.3's stdlib Prism (0.19), which still exposes the else clause of UnlessNode / CaseNode / CaseMatchNode under its pre-1.3 name consequent: the extractor raised internally and silently dropped simulated branch and method data for any file containing unless/else or a case with an empty arm, unless a newer prism gem happened to be installed.
  • As a defensive layer against any future extractor drift, merging now treats an actually-executed file's branch and method data as authoritative: when a resultset that merely tracked a file (with simulated, statically-derived tuples) merges with one from a process that really loaded it, the synthesized tuples are dropped rather than unioned. This contains any undiscovered mismatch to denominator inflation on files no process loaded, instead of phantom misses on fully-covered ones. Line coverage still combines from both sides, so tracked-but-unloaded files keep contributing to the line denominator as before.
  • Method coverage no longer reports phantom uncovered methods for define_method / define_singleton_method blocks defined onto more than one receiver — e.g. a module's included hook defining the same block on every including class. Ruby records one method entry per receiver, all pointing at the same source location, so any receiver whose copy was never called showed as an uncovered method on a line with 100% line coverage. Entries are now aggregated by (name, source location) with hit counts summed, and cross-process merging matches methods on the same source identity rather than on the receiver class. Reported with an exemplary diagnosis by @​bkuhlmann. See #1234.
  • Branch coverage under enable_coverage :eval no longer inflates denominators or reports phantom missed branches for templates compiled more than once — e.g. hanami-view compiles each template once per view class, and every ERB.new(...).result is a fresh compile. Ruby's Coverage emits a fresh set of branch entries per compile of the same file (nondeterministically through Ruby 4.0, consistently on current ruby master — see https://bugs.ruby-lang.org/issues/22203), each counting only the renders that flowed through that compile, so a side exercised under one compile appeared as a permanently-missed branch in another compile's entry at the same location, and ignore_branches :implicit_else swung the report wildly by stripping only the synthetic-else halves of the duplicates. Duplicated conditions are now aggregated by source location with arm counts summed. Reported with an exemplary diagnosis by @​bkuhlmann. See #1235.

1.0.1 (2026-07-14)

Enhancements

  • The gem now ships type signatures under sig/, covering the public API: the configuration DSL (including the criterion-scoped coverage block and the legacy deprecated verbs), the Result / FileList / SourceFile / CoverageStatistics read API that formatter authors consume, the formatter and filter class hierarchies, exit codes, and the ParallelAdapters::Base contract. Internal classes carry repository-only skeleton signatures (sig/internal/, excluded from the gem package) so the entire codebase type-checks under Steep in strict mode, while the shipped signature payload stays small. Signatures are checked with rbs validate and steep check as part of the default rake task. RBS and Steep users no longer need the third-party signatures from ruby/gem_rbs_collection, which cover the 0.22 API and predate 1.0's configuration redesign.

Bugfixes

  • Branch tuples synthesized for tracked-but-unloaded files now match Ruby's Coverage exactly for elsif and for if arms with empty bodies. StaticCoverageExtractor attributed the outer else arm of an elsif to the clause's body rather than the whole clause, and an empty if then-body to the whole node rather than Coverage's zero-width point at the predicate's end. Since resultset merges combine branch arms by their exact location, a simulated entry merging with a real one for the same file (parent and worker under Minitest's parallelize, or RSpec and Minitest suites collated together) produced phantom, permanently-missed branch arms. A new differential spec now pins every branch construct tuple-for-tuple against Ruby's Coverage — which promptly caught that CRuby 3.4 changed several of these conventions, so the extractor now emits whichever shape the running Ruby's Coverage uses (on 3.2/3.3: elsif clause ranges end at the chain's last content rather than the shared end, empty if/else/when bodies fall back to enclosing ranges, and empty while/in bodies collapse to points). Reported with an exemplary diagnosis by @​hasghari. See #1226.
  • merge_subprocesses no longer silently drops all worker coverage under Minitest's fork-based parallelize(workers: N) (the setup the rails profile exists for). When Minitest's autorun was armed before SimpleCov.start — which is how rails test loads — SimpleCov deferred its report to Minitest.after_run, and forked workers inherited that deferral even though Minitest pins its after_run hook to the parent's pid, so no exit path in the worker ever stored its resultset. Workers now reset the inherited at_exit state on fork and re-arm their own hook, so their resultsets are stored and merged as documented. Reported with an exemplary diagnosis by @​hasghari. See #1227.
  • Fixed SimpleCov.formatters= raising NoMethodError when given a single formatter instead of an Array — a regression from 0.22.x, where MultiFormatter.new normalized the value internally. This restores the long-documented SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([...]) pattern, in which MultiFormatter.new returns a Class rather than an Array. The regression surfaced in ruby/ruby's CI through net-imap's test helper. Thanks @​koic. See #1224.
  • Formatter status lines ("Coverage report generated for X") and threshold-enforcement output (violation reports, "SimpleCov failed with exit N") no longer route through Kernel#warn. They still print to stderr, but they are program output rather than Ruby warnings, so Warning.warn hooks — warning trackers and raise-on-warning test setups — no longer intercept them as unaddressable noise, and threshold failure explanations now survive ruby -W0, which previously reduced a failing check to a bare exit code with no explanation. Genuine warnings (deprecations, dropped-file notices, parse failures) still use warn. Suppression remains explicit: silent: true for formatter status lines, print_errors false for enforcement output. Thanks @​viralpraxis. See #1225.

1.0.0 (2026-07-12)

First stable release of the 1.0 line. The entries below consolidate release candidates rc1 through rc5 and describe all changes since 0.22.1.

Breaking Changes

  • Dropped support for Ruby 3.1 and JRuby 9.4. The minimum is now Ruby 3.2 (and JRuby 10, which reports RUBY_VERSION 3.4). Ruby 3.1 reached end of life in March 2025, and a recent i18n release calls Fiber[], a Ruby 3.2 API, at load time, so suites that load Rails no longer run on 3.1. Raising required_ruby_version to >= 3.2 also excludes JRuby 9.4, which reports RUBY_VERSION 3.1.x. See #1171.
  • JSON formatter: group stats changed from { "covered_percent": 80.0 } to full stats shape { "covered": 8, "missed": 2, "total": 10, "percent": 80.0, "strength": 0.0 }. The key covered_percent is renamed to percent.
  • JSON formatter: simplecov_json_formatter gem is now built in. require "simplecov_json_formatter" continues to work via a shim.
  • StringFilter now matches at path-segment boundaries. "lib" matches /lib/ but no longer matches /library/. Use a Regexp filter for substring matching.
  • SourceFile#project_filename now returns a truly relative path with no leading separator (e.g. lib/foo.rb instead of /lib/foo.rb). This also removes the leading / from file path keys in coverage.json and from the filename in minimum_coverage_by_file error messages. Anchored RegexFilters that relied on a leading / (e.g. %r{^/lib/}) should be rewritten (e.g. %r{\Alib/}).
  • Removed docile gem dependency. The SimpleCov.configure block is now evaluated via instance_exec with instance variable proxying.
  • Removed automatic activation of JSONFormatter when the CC_TEST_REPORTER_ID environment variable is set. The default HTMLFormatter now emits coverage.json alongside the HTML report (using JSONFormatter.build_hash to serialize the same payload JSONFormatter writes), so the env-var special case is no longer needed. Because of this, listing JSONFormatter alongside HTMLFormatter is redundant and can be removed.
  • SimpleCov.start now loads the test_frameworks profile by default, which filters paths under test/, spec/, features/, and autotest/. Running the suite always executes 100% of the test files themselves, which inflated the overall percentage and obscured application coverage. To opt back in (e.g. to surface dead test helpers), drop the filter with remove_filter %r{\A(test|features|spec|autotest)/}. See #816.
  • HTML and JSON formatters now write the "Coverage report generated for X to Y" status line (and the per-criterion totals beneath it) to stderr instead of stdout. The message is a diagnostic, not the program's output, and routing it to stdout polluted pipelines like rspec -f json. Suppress it entirely with silent: true on the formatter; redirect with 2>&1 if you want the old behavior. See #1060.
  • Under parallel_tests, SimpleCov now waits in the first started process (via ParallelTests.first_process?) rather than the last. This matches the convention parallel_tests's own README recommends for "do something once after all workers finish" hooks, so user code that has its own ParallelTests.wait_for_other_processes_to_finish in an RSpec.after(:suite) (or equivalent) no longer deadlocks against SimpleCov's wait when both pick the same process. As a side benefit, the previous PARALLEL_TEST_GROUPS=1 workaround for last_process?'s "" == "1" mismatch (#1066) is no longer needed — first_process? handles that case naturally. Migration: the rare project that wired its own wait via ParallelTests.last_process? now hits the symmetric deadlock and must switch to first_process?. See #922.
  • Removed SimpleCov.coverage_criterion. It was a reader/writer for a value nothing in SimpleCov ever consumed, so it duplicated primary_coverage without affecting any behavior. Use primary_coverage to choose the report's leading criterion (or the coverage :branch, primary: true form).

Deprecations

  • The configuration API has been redesigned around a smaller, more consistent set of verbs. The legacy methods continue to work but each emits a deprecation warning that names its replacement; a future release will remove them. Warnings are deduplicated by call site, so a deprecated method called in a loop or a configuration block re-evaluated once per parallel worker or spec file warns at most once per source location (see #1204). See the "Migrating from the legacy configuration API" section in the README for the full migration table and a before/after example.
    • add_filterskip (identical matcher grammar; no behavior change)
    • add_groupgroup (identical matcher grammar; no behavior change)
    • track_filescover (cover includes unloaded files like track_files did and restricts the report to the matching set; pass every directory you want reported, e.g. cover "lib/**/*.rb", "app/**/*.rb", to keep the old additive-only behavior)
    • use_mergingmerging (same value)
    • enable_for_subprocessesmerge_subprocesses (same value)
    • enable_coverage_for_evalenable_coverage :eval (folds into the same call that enables :line / :branch / :method)
    • print_error_status (reader) → print_errors (the print_error_status= writer is unaffected for now)

... (truncated)

Commits
  • 803dcbc Bump version to 1.0.2
  • 177b0cc Restore a clean Steep check for the post-1.0.1 code
  • b57bf8d Aggregate runtime-duplicated coverage entries by source location
  • 9599343 Drop a simulated file's branches when a real run covered it
  • 25d1ab5 Add a differential fuzzer for the static coverage extractor
  • 2aff8fe Match Coverage's legacy branch conventions and survive stdlib Prism
  • bbb4737 Skip synthesizing branches for constant-folded conditions
  • 6669cbf Match Coverage's safe-navigation range when the call takes a block
  • 21a8a08 Fix NoMethodError in the standalone CLI's colorizing subcommands
  • e27cfd0 Bump step-security/harden-runner from 2.19.4 to 2.20.0
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [simplecov](https://github.com/simplecov-ruby/simplecov) from 0.22.0 to 1.0.2.
- [Release notes](https://github.com/simplecov-ruby/simplecov/releases)
- [Changelog](https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md)
- [Commits](simplecov-ruby/simplecov@v0.22.0...v1.0.2)

---
updated-dependencies:
- dependency-name: simplecov
  dependency-version: 1.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code labels Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants