Releases: Gusto/fast_cov
Releases · Gusto/fast_cov
v0.4.2
v0.4.1
v0.4.0
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 withadd,dependencies,dumpTestMap.aggregate— K-way merge of fragment files from multiple CI nodes- Pure Ruby (no shell commands like
gunziporsort) - Event hooks:
:sort,:sorted,:merge,:merged - Batched
each(batch_size)yields Hash of{ file => [deps] } - Auto-detects max readers from OS file descriptor limit
- Pure Ruby (no shell commands like
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
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 dependencieson_cache_mount: Records fixture definition files (including parent chain) when tests mount fixtures
- Expose
coverage_mapviaattr_readeron AbstractTracker - Use
gemmethod for dependency version checks in FactoryBotTracker and FixtureKitTracker
v0.3.1
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_file→File.openwhere 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, andYAML.unsafe_load_fileto handle Bootsnap's compile cache which bypassesFile.openentirely - Move
Utils.path_within?andUtils.relativize_pathsfrom C to Ruby: Only used in non-hot paths; the C internal functions remain for the line event callback - Simplify
AbstractTracker.recordAPI: Takes an explicit path instead of a block, auto-resolves caller source viaUtils.resolve_caller - Add
Utils.resolve_caller: Walks caller locations to find the first frame within the project root
v0.3.0
v0.2.1
Full Changelog: v0.2.0...v0.2.1
v0.2.0
v0.1.6
What's Changed
- [RETIRE-2799] reduce ruby version dep by @davidjairala in #8
New Contributors
- @davidjairala made their first contribution in #8
Full Changelog: v0.1.5...v0.1.6
v0.1.5
What's Changed
New Features
- ConstGetTracker - New tracker that intercepts
Module#const_getcalls to track dynamic constant lookups - Pathname support -
config.rootandconfig.ignored_pathnow 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::Singletonmodule - AbstractTracker.record - Support lazy block evaluation to avoid expensive work when tracker is inactive