Skip to content

v2.12.2: faster tests and CI - #59

Closed
gmpassos wants to merge 2 commits into
masterfrom
chore/build-perf
Closed

gmpassos wants to merge 2 commits into
masterfrom
chore/build-perf

Conversation

@gmpassos

Copy link
Copy Markdown
Owner

Changes

No changes to the library or the generator.

  • e2e tests (reflection_factory_generated_code_test.dart): both tests used to build their own throwaway package (dart pub get + build_runner, which compiles the builder first). They now share one package, built once in setUpAll, with each fixture in its own lib/ directory. The invokers fixture keeps its strict analysis_options.yaml (strict-casts, avoid_dynamic_calls) through a nested one in lib/invokers/, so each test analyzes exactly what it did before.
  • reflection_factory_build_test.dart: the 34 tests each called loadIsolateSources() (reading every package's sources from disk). They're now read once and copied into each test's in-memory TestReaderWriter.
  • CI: the e2e tests run in a new test_vm_e2e job, in parallel with test_vm (dart test -x e2e, with coverage; the e2e tests run the builder in a sub process, so they add no coverage).
  • CHANGELOG: 2.12.1's entry no longer names a private project.

Measured (local, 10 cores)

before after
e2e file 33s 17s
build test file 18s 14s
dart test (VM) 36s 20s

On CI, the two e2e tests took ~110s of test_vm's 127s test step, sequentially.

Checks

dart format, dart analyze --fatal-infos --fatal-warnings: clean. VM 564 and Chrome 439 tests pass.

🤖 Generated with Claude Code

gmpassos and others added 2 commits October 15, 2026 03:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- e2e tests share one throwaway package: `dart pub get` and `build_runner`
  run once instead of once per test (33s -> 17s locally).
- reflection_factory_build_test reads the isolate's sources once instead
  of per test (18s -> 14s).
- CI: the e2e tests run in their own job, in parallel with the other VM
  tests (with coverage).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.54%. Comparing base (5e99421) to head (2889f6a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #59   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files          14       14           
  Lines        6538     6538           
=======================================
  Hits         6116     6116           
  Misses        422      422           
Flag Coverage Δ
unittests 93.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmpassos

Copy link
Copy Markdown
Owner Author

Closing: wrong target. The goal is a faster generator for consumers' builds, not this repo's own tests/CI.

@gmpassos gmpassos closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant