Skip to content

feat(log): drop the package name from labels in single-package workspaces - #883

Open
kshanxs wants to merge 2 commits into
voidzero-dev:mainfrom
kshanxs:feat/single-package-log-labels
Open

kshanxs wants to merge 2 commits into
voidzero-dev:mainfrom
kshanxs:feat/single-package-log-labels

Conversation

@kshanxs

@kshanxs kshanxs commented Oct 24, 2026

Copy link
Copy Markdown

Motivation

Refs voidzero-dev/vite-plus#2912.

--log=labeled and --log=grouped always label output as [pkg#task]. In a monorepo that tells you which package a line came from. In a single-package project every task belongs to the same package, so the name repeats on every line without adding anything. This is especially noticeable for people moving from concurrently, which labels by script name only.

Changes

  • IndexedTaskGraph::is_single_package() reports whether the workspace has exactly one package.
  • When it does, the labeled and grouped reporters print [task]. Workspaces with more than one package keep [pkg#task]. Picking the format once per workspace keeps labels the same throughout a run, including tasks that nested vp run calls add during the run.
  • Building the reporter for the selected --log mode moved out of Session::main_inner into make_mode_reporter, which keeps main_inner under clippy's too_many_lines limit.
  • Added a log_single_package e2e fixture covering both modes. Existing labeled_stdio / grouped_stdio monorepo snapshots are unchanged. Updated docs/stdio.md and CHANGELOG.md.

Not changed: the run summary and --last-details still name tasks as pkg#task. The issue only asks about the per-line labels; happy to extend this if you want them to match.

Example (single package, build depends on lint):

[lint] $ echo lint ⊘ cache disabled
[lint] lint

[build] $ echo build ⊘ cache disabled
[build] build

🤖 Generated with Claude Code

kshanxs and others added 2 commits October 25, 2026 01:30
…aces

In a workspace with one package, every task belongs to that package, so
`--log=labeled` and `--log=grouped` now label output `[task]` instead of
`[pkg#task]`. Monorepos keep the package name.

Refs voidzero-dev/vite-plus#2912

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

This branch has not been deployed

No deployments
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