Skip to content

Log the repo-wide reverse dependency graph build at INFO - #23682

Open
jasonwbarnett wants to merge 1 commit into
pantsbuild:mainfrom
altana-ai:jwb/log-dependents-map-duration
Open

jasonwbarnett wants to merge 1 commit into
pantsbuild:mainfrom
altana-ai:jwb/log-dependents-map-duration

Conversation

@jasonwbarnett

@jasonwbarnett jasonwbarnett commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

map_addresses_to_dependents resolves dependencies for every target in the repo and dominates the wall time of the dependents goal and of any run passing --changed-dependents, but its workunit is declared DEBUG, so at default verbosity nothing in the log accounts for that time. Declaring it INFO is all that is needed — since #22992 the engine logs a completed workunit's description and elapsed time at the workunit's own level. Follow-on to #21587.

From source at 2.34.0.dev3, pants dependents src/python/pants/util/strutil.py in this repo:

19:15:29.05 [INFO] Completed: Map all targets to their dependents (1.5s)

main logs no such line; the 383 dependents printed are identical, and dependents_test.py passes.

LLM assistance (policy): the one-line change and the release note were LLM-written. I directed the change and ran the verification above.

`map_addresses_to_dependents` resolves dependencies for every target in
the repo, including import inference, and dominates the wall time of the
`dependents` goal and of any run that passes `--changed-dependents`. Its
workunit is declared at `DEBUG`, so at default verbosity nothing in the
log attributes that time to anything, and the only way to see it is to
re-run the whole thing under `-ldebug`.

Declare the rule at `INFO` instead. The engine already logs a completed
workunit's description and elapsed time at the workunit's own level, so
the promotion alone surfaces the work and its cost in ordinary build
logs, once per session:

    Completed: Map all targets to their dependents (42.3s)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NsX7odrmuYiDedSg4FwysE
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