Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat(test): keep optimization when targeting specific test files

オープン
#1,762 コメント 1 件 リアクション 4 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart
領域
cli, testing

調査の方向性

Start at the very_good test optimization decision (shouldOptimize and isTargettingTestFiles) and trace how targeted paths are handled; compare the very_good dart test entry point and the pre-gen hook used for sharding. Define behavior for qualifying files and directories, exclusions, and the listed opt-out cases, then verify results are reported per file through resolveReport and coverage remains unchanged. Done means targeted test files are optimized under the stated conditions while existing behavior is preserved for the stated exceptions.

索引モデルが issue の本文から書いたものです。

説明

Problem

very_good test turns optimization off whenever a positional path is given (shouldOptimize -> isTargettingTestFiles). Large suites often run a computed subset (tests affected by a change, picked by a project script) in the inner loop or CI. For subsets of tens to hundreds of files every file pays its own compile and VM start, exactly the cost the optimizer removes. Today the choice is the whole suite optimized, or nothing.

Proposal

very_good test test/a_test.dart test/feature/ ... generates .test_optimizer.dart from only the targeted files instead of disabling optimization.

  • A target qualifies if it is an existing *_test.dart file or a directory inside the package's test/; a directory selects every test file under it.
  • Files tagged skip_very_good_optimization or matched by --exclude-optimization still run as their own suites, only if they are in the target set.
  • Anything else (line selectors like foo_test.dart:12, paths outside test/, --platform, --update-goldens) keeps today's behaviour.
  • --no-optimization still turns it off.
  • With --total-shards, the target set is sharded in the pre-gen hook before the round-robin.
  • Same for very_good dart test.

Behaviour

Results are reported per file through the existing resolveReport mapping. Coverage unchanged.

Backwards compatibility

Runs without paths are unchanged. Runs with paths become optimized; suites that only pass unbundled can opt out with --no-optimization, the skip tag or --exclude-optimization. If preferred, gate it behind --optimize-targets / optimization.targets: true in very_good.yaml for one minor release.

Scope

No git or dependency analysis (see #1695): the caller chooses the files, the CLI only bundles them. Happy to send a PR.

主要言語
Dart
スター
2.4k
フォーク
244
平均マージ
1日 4時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

VeryGoodOpenSource/very_good_cli のほかの issue

VeryGoodOpenSource/very_good_cli の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。