Skip to content

Comments

Replace println with Printer for all dir commands & workspace dir followups#16690

Merged
zanieb merged 2 commits intomainfrom
mikayla/workspace-dir-quick-followups
Nov 11, 2025
Merged

Replace println with Printer for all dir commands & workspace dir followups#16690
zanieb merged 2 commits intomainfrom
mikayla/workspace-dir-quick-followups

Conversation

@mikaylathompson
Copy link
Contributor

@mikaylathompson mikaylathompson commented Nov 11, 2025

Summary

  1. Discussed in review of Add uv workspace dir command #16678 that println should be replaced by using printer. The println pattern was pretty consistent across all the dir commands, so I've updated all of them in this PR (there are some usages of println outside of uv/src/commands that I didn't touch -- the use cases there seemed more complex and nuanced).
  2. I missed two comments in the previous PR before merging, so updates from those are in here as well.

Test Plan

No behavior changes, existing tests for all commands pass.

@zanieb zanieb added the internal A refactor or improvement that is not user-facing label Nov 11, 2025
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@zanieb
Copy link
Member

zanieb commented Nov 11, 2025

I wonder if we should ban println with Clippy?

@zanieb zanieb merged commit 00e2a0e into main Nov 11, 2025
100 checks passed
@zanieb zanieb deleted the mikayla/workspace-dir-quick-followups branch November 11, 2025 20:36
zanieb pushed a commit that referenced this pull request Nov 12, 2025
Follow-up from #16690, in `uv` every
command should be using `write!(...)/writeln!(...)` with the `Printer`
abstraction instead of bypassing control with the standard printing
functions. This lint ensures that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants