Repository navigation
targets: gets a hint too, pointing at sound: - #47
Merged
Merged
Conversation
`targets` was the package the layout migration (#31) renamed to `sounds`, one PR before packages went singular (#41). The singular hint only knew about plurals, so the one spelling every pre-#31 doc produces fell through it and got nothing: $ field build //songs/creek/targets:pad-sc pattern matched no labels: //songs/creek/targets:pad-sc That is a flat dead end, and it was reachable from every command in the sample project's README until bloom#2 rewrote it. It now corrects to `sound:`, keeping the shape it was given as the plural hint does. The wording is its own: "packages are singular" is true of `sounds` and false of `targets`, which was a rename, not a pluralization. So the lead-in moved into the table beside each mapping and carries its own punctuation — gluing a colon on in the template gave `targets:` two. The plural mapping is unchanged and still says what it always said, asserted alongside the new case so the two cannot drift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
targetswas the package the layout migration (#31) renamed tosounds, one PR before packages went singular (#41). The singular hint only knew about plurals, so the one spelling every pre-#31 doc produces fell through it and got nothing back:A flat dead end — and it was reachable from every command in the sample project's README until okamnesiac/bloom#2 rewrote it. Now:
The wording is its own, deliberately
"packages are singular" is true of
soundsand false oftargets, which was a rename, not a pluralization. Borrowing the grammar lesson would teach the wrong thing. So the lead-in moved into the table beside each mapping:Each
whycarries its own punctuation — the two lead-ins don't share a shape, and gluing a colon on in the template gavetargets:two of them.Everything else is unchanged: the suggestion still keeps the shape it was given (
:all→:all, tree → tree), and still fires only when the target package actually exists.Verified
New test covers the label, tree, and
:allshapes fortargets, and asserts the plural wording alongside them so the two cannot drift.pnpm typecheckclean; 297 passed, 23 skipped.The schema-side hint in
common.tsneeded no change — asource:only ever takes a bare name or//shared/asset:, sotargetswas never reachable there.Note
Low Risk
User-facing error-message improvements only; no build graph or label resolution behavior beyond hint text and the new
targetsmapping.Overview
Label resolution now gives actionable hints when users type the pre-migration
targets:package (renamed in layout #31), which previously produced a bare “no labels” error with no correction.The plural/singular hint logic moves into a
PACKAGE_HINTStable where each legacy spelling has its ownwhytext.targetsmaps tosoundwith “targets: is now sound:” instead of the “packages are singular” message, which would be misleading for a rename rather than a plural.Hint behavior is unchanged: suggestions preserve pattern shape (label, tree
..., or:all) and only appear when the corrected package exists in the graph.Tests cover
targets:in all three shapes and lock in thatsounds:still uses the singular-package wording.Reviewed by Cursor Bugbot for commit b1b2f3a. Configure here.