tom_build_kit 1.12.0
tom_build_kit: ^1.12.0 copied to clipboard
Build orchestration tool with pipelines that integrates Tom build tools.
1.12.0 #
Added — :unreferenced, the unreferenced-export audit #
Every public symbol a set of packages exports from lib/ that no other lib/
or bin/ file names, configured by the unreferenced: section of a project's
buildkit.yaml (root, package prefix, exclusions, consumer repositories, and
an allowlist whose every entry carries a reason). A @visibleForTesting seam
passes while a test names it; a stale allowlist entry, a malformed section or
an audit that checked nothing fails the project. The engine is also a library,
package:tom_build_kit/unreferenced_exports.dart. It came from Webwork's
tool/unreferenced_exports.dart, whose allowlist is now its configuration.
Requires tom_build_base 2.17.0 (the seam engine's declaration scanner) and
adds analyzer.
1.11.0 #
Fixed — :versioner reports what it did, not what it intended #
The installed buildkit binary printed
Version file generated: tom_d4rt_generator v1.37.0 build 20
Status: SUCCESS
over a version.versioner.dart that still read 0.0.1-STALE. It advanced
tom_build_state.json and wrote nothing else. The consequence is worse than a
stale tool: version_stamp_test.dart fails with the remedy "run
buildkit -v -p . :versioner", pointing the reader at the command that
silently does nothing — so following the instruction loops.
That message exists nowhere in current source; the binary was seven months old and ran a code path since removed, so the repair is a rebuild. The audit that went with it found the same CLASS of defect still live in two places, and both are fixed here:
- A dry run returned success with the message
version file generated, having written nothing. It now reportsdry run — no version file written. - A real run reported success on the strength of the write not throwing. It now reads the file back and fails if the stamp on disk does not carry the version just generated — so "generated" means the file says so, not that a write was attempted. This covers the quieter half a thrown exception does not: output landing somewhere other than where the caller will look, or being undone by the in-place formatter that runs after it.
1.10.0 #
Added — :compiler and :runner name a missing cached package #
A locked package the pub cache cannot supply is not a resolution error: the
lock is satisfiable, so dart pub get reports success. The failure lands later
and wearing someone else's face — from the AOT compiler as
Bad state: Generating AOT kernel dill failed!, which names nothing at all,
and from build_runner as Undefined name at every use site, which reads as an
upstream rename.
Both executors now call pubCachePreflight (tom_build_base 2.14.0) and stop
with a report naming the package, its expected location and the repair.
Placement is deliberate in both:
:compilerchecks after its early returns, so a listing, a config dump, a configuredskip-compile-with-buildkitor a project with no compile sections pays nothing. A dry run compiles nothing and is skipped too.:runnerchecks after its dry-run return, which shells out to nothing.
Requires tom_build_base >= 2.14.0.
1.9.0 #
Changed — twelve private copies of the option lookup replaced by one #
Eight executors carried their own "per-command options for this command, else
global" helper (bumpversion, compiler, publisher, runner, cleanup, versioner,
dependencies, buildsorter). A sweep found four more places doing it by hand,
and two of those had the MIRROR-IMAGE defect: bumppubspec and status read
commandArgs ONLY, so an option written BEFORE the command was dropped.
execute rolled its own per-command-then-global and did not know its command's
aliases, so buildkit :x --condition=... was lost. git_executors held a
ninth copy.
All now call CliArgs.optionsFor (tom_build_base 2.13.0), which also MERGES
the two positions rather than choosing between them — the copies returned the
per-command map whole, so an option given globally was hidden whenever any
per-command option was present.
Requires tom_build_base >=2.13.0.
1.8.0 #
Fixed — :bumpversion --minor=<x> no longer does a silent PATCH bump when the selector matches nothing (sce10) #
A selector matched the traversal's project name and a path SUFFIX, and nothing
else. So --minor=tom_d4rt_generator — the package's own pubspec name, and the
obvious thing to type — selected nothing, the project took the default patch
bump, and nothing said so.
That is the one shape a release checklist cannot catch by eye, because nothing
disagrees: the pubspec says a version, --versioner stamps the same version
from it, the CHANGELOG section is written beside them. The release is
internally consistent and numbered wrong.
Two changes:
- a selector may now name a project's pubspec
name:, as well as its traversal name or a suffix of its path (.being the project you are standing in); - a selector that named NO project is printed and exits non-zero, listing the projects that were processed so the correction does not cost a second run to find the right name.
A name must match whole. tom_d4rt and tom_d4rt_generator are different
packages, and a prefix rule would bump the wrong one.
Features #
-
Guided-mode is now testable —
GuidedModerenders its menus, confirmations and text prompts through an injectablePromptDriverinstead of callingdclidirectly.DcliPromptDriverperforms real terminal I/O by default;ScriptedPromptDriverreplays a fixed list of answers so guided-flow logic can be unit-tested without a live TTY (BK-GUIDE-*). Existing callers are unaffected (GuidedMode()still defaults to the real terminal driver). -
ProjectGroupPicker/pickProjectScopesare now testable — the project scope picker used by git guided flows renders through the same injectablePromptDriverinstead of callingdclidirectly, so its scope-choice, multi-select and cancellation logic is covered by unit tests (BK-PGP-*).ProjectGroupPicker({PromptDriver? driver})andpickProjectScopes({..., PromptDriver? driver})default to the real terminal driver; existing callers are unaffected. -
:executecommand — Run shell commands in each traversed folder with placeholder substitution.- Aliases:
exec,x - Path placeholders:
${root},${folder},${folder.name},${folder.relative} - Nature existence checks:
${dart.exists},${flutter.exists},${git.exists} - Nature attributes:
${dart.name},${dart.version},${git.branch},${git.dirty} - Ternary expressions:
${condition?(true-value):(false-value)} - Condition filtering:
--condition dart.exists
- Aliases:
-
--executable/-eoption for:compiler— Filter compilation to specific executable files.- Comma-separated file list:
--executable buildkit.dart,compiler.dart - Matches by basename or path suffix
- Works in both buildkit
:compilercommand and standalonecompilertool
- Comma-separated file list:
-
--projectID and name matching — The--projectoption now matches against project IDs and names frombuildkit.yamlandtom_project.yaml, not just folder names and globs.- Matches
short-id/project_idfromtom_project.yaml - Matches
idandnamefrombuildkit.yaml - Case-insensitive matching
- Matches
-
Command prefix matching — Command names can be abbreviated to their shortest unambiguous prefix.
:versmatches:versioner,:compmatches:compiler- Exact matches always take priority over prefix matches
- Ambiguous prefixes report all matching commands
-
Macro placeholders — Macros now support argument placeholders
$1–$9and$$(all arguments).
Bug Fixes #
--projectfilter applied before nature detection — Fixed regression where--projectwith ID/name values always returned empty results because folder natures were not yet detected at filter time.
Dependencies #
- Requires tom_build_base v1.11.0 or later.
1.7.0 #
Refactoring #
- WorkspaceScanner integration — Refactored all 17 git tools to use unified
WorkspaceScannerAPI.- Replaced duplicated
_findGitRepositories()methods withWorkspaceScanner().findGitRepoPaths(). - Removed ~30 lines of duplicated code from each tool.
bumppubspecnow usesWorkspaceScanner().findPublishable()for package discovery.
- Replaced duplicated
Dependencies #
- Requires tom_build_base v1.11.0 or later for WorkspaceScanner API.
1.6.0 #
Features #
:statuscommand — New internal command showing buildkit version, binary status, and git state.- Source version display (version, build number, git commit, build time, Dart SDK)
- Binary currency check for all 25 buildkit tools (runs
<tool> --version) - Categorizes tools as current, outdated, unavailable, or non-conformant
- Git status with pending changes and unpushed commits
- Supports
--jsonfor structured output - Supports
--verboseto show individual file/commit details - Supports
--skip-binariesand--skip-gitflags - Uses standard navigation options for git repo traversal
1.5.0 #
Bug Fixes #
pubgetall/pubupdateallshowing 0 projects — These commands now correctly run once at workspace level with their own project discovery instead of being invoked per-project.- Progress line not clearing — Fixed progress display in
pubgetandpubupdatecommands by padding output to 120 chars and flushing stdout immediately. - Build order path normalization — Fixed
computeBuildOrder()filtering out all projects due to non-normalized paths.
Features #
ownDiscoveryCommands— New pattern inbuildkit.dartfor commands that do their own project discovery (e.g.,pubgetall,pubupdateall).--no-recursivesupport — Respects the new negatable--recursiveflag from tom_build_base v1.6.0.
1.4.0 #
Features #
--modules/-mnavigation option — Filter projects/repositories to specific git modules. Comma-separated list of module names (e.g.,--modules tom_module_d4rt,tom_module_basics). Use "root" or "tom" for main repository.- All 17 git tools now support modules filtering (
gitstatus,gitcommit,gitpull,gitsync,gitbranch,gittag,gitcheckout,gitreset,gitclean,gitprune,gitstash,gitunstash,git,gitcompare,gitmerge,gitsquash,gitrebase). ToolBase.findProjects()now acceptsmodulesparameter for include filtering.buildkitCLI supports--modules/-moption.
1.0.0 #
- Initial version.