Skip to content

Releases: Gusto/fast_cov

v0.4.2

18 May 01:21
60864e4

Choose a tag to compare

  • Stream TestMap#dump to bound peak RSS on large mappings (#18)

v0.4.1

15 Apr 21:58
4438c4f

Choose a tag to compare

  • Skip already-graphed files in StaticMap#build — batched build calls no longer re-parse shared dependency files (#17)

v0.4.0

11 Apr 18:18
a7b7344

Choose a tag to compare

What's Changed

TestMap — test mapping serialization and aggregation

New FastCov::TestMap brings the full test mapping pipeline into fast_cov:

  • TestMap.new — In-memory accumulator with add, dependencies, dump
  • TestMap.aggregate — K-way merge of fragment files from multiple CI nodes
    • Pure Ruby (no shell commands like gunzip or sort)
    • Event hooks: :sort, :sorted, :merge, :merged
    • Batched each(batch_size) yields Hash of { file => [deps] }
    • Auto-detects max readers from OS file descriptor limit
  • TestMap::Reader — Sorted file reader with consecutive duplicate merging
  • Tab-delimited gzipped fragment format
# Write
test_map = FastCov::TestMap.new
test_map.add("spec/models/" => coverage_map.stop)
test_map.dump("tmp/test_mapping.node_0.gz")

# Aggregate
aggregator = FastCov::TestMap.aggregate(Dir["tmp/test_mapping.*.gz"])
aggregator.on(:merged) { |files, elapsed| puts "Merged #{files} files in #{elapsed.round(2)}s" }
aggregator.each(10_000) { |batch| database.bulk_write(batch) }

Other changes

  • Updated README with full API documentation
  • Fixed Ruby requirement in README (3.2.0, not 3.4.0)

v0.3.2

07 Apr 22:27
0221146

Choose a tag to compare

What's Changed

  • Add FixtureKitTracker: Tracks fixture_kit fixture definition files and their dependencies using callback hooks (requires fixture_kit >= 0.14.0):
    • on_cache_save/on_cache_saved: Tracks files touched during fixture generation and creates connected dependencies
    • on_cache_mount: Records fixture definition files (including parent chain) when tests mount fixtures
  • Expose coverage_map via attr_reader on AbstractTracker
  • Use gem method for dependency version checks in FactoryBotTracker and FixtureKitTracker

v0.3.1

07 Apr 02:39
4267bb2

Choose a tag to compare

What's Changed

  • Fix caller resolution for indirect file reads: Trackers now walk the caller stack to find the first in-root frame, fixing connected dependencies for indirect reads (e.g., YAML.load_fileFile.open where the immediate caller is stdlib/gem code outside the project root)
  • Add YAML patch to FileTracker: Directly patches YAML.load_file, YAML.safe_load_file, and YAML.unsafe_load_file to handle Bootsnap's compile cache which bypasses File.open entirely
  • Move Utils.path_within? and Utils.relativize_paths from C to Ruby: Only used in non-hot paths; the C internal functions remain for the line event callback
  • Simplify AbstractTracker.record API: Takes an explicit path instead of a block, auto-resolves caller source via Utils.resolve_caller
  • Add Utils.resolve_caller: Walks caller locations to find the first frame within the project root

v0.3.0

06 Apr 04:06
3d751e5

Choose a tag to compare

What's Changed

  • Add StaticMap for static dependency mapping by @ngan in #13

Full Changelog: v0.2.0...v0.3.0

v0.2.1

03 Apr 23:49
abad2a9

Choose a tag to compare

Full Changelog: v0.2.0...v0.2.1

v0.2.0

03 Apr 07:14
1dfdde1

Choose a tag to compare

What's Changed

  • Remove constant_references from CoverageTracker by @ngan in #9
  • Refactor coverage orchestration around CoverageMap by @ngan in #11
  • Learn connected dependencies across coverage runs by @ngan in #12

Full Changelog: v0.1.6...v0.2.0

v0.1.6

24 Feb 21:52
affe4b7

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.5...v0.1.6

v0.1.5

10 Feb 08:06
45b981e

Choose a tag to compare

What's Changed

New Features

  • ConstGetTracker - New tracker that intercepts Module#const_get calls to track dynamic constant lookups
  • Pathname support - config.root and config.ignored_path now accept Pathname objects directly (e.g., Rails.root)

Improvements

  • Path validations - Root must be an absolute path; ignored_path must be inside root
  • Autoload - Use Ruby's autoload for lazy loading of constants
  • Code organization - Extract singleton methods into FastCov::Singleton module
  • AbstractTracker.record - Support lazy block evaluation to avoid expensive work when tracker is inactive