Skip to content

Retain diagnostics for script Python discovery failures - #2458

Closed
zaniebot wants to merge 4 commits into
mainfrom
zb/opportunity-11-01-script-find-diagnostics
Closed

zaniebot wants to merge 4 commits into
mainfrom
zb/opportunity-11-01-script-find-diagnostics

Conversation

@zaniebot

@zaniebot zaniebot commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

uv python find --script prints only the top-level discovery error and hides it under -q. Return these failures to the final diagnostic renderer so their causes and hints remain visible, while keeping exit status 1 and -qq silence.

@zaniebot
zaniebot deployed to automations October 8, 2026 11:16 — with GitHub Actions Active
@astral-automations-bot astral-automations-bot Bot added area:error-messages Messaging when something goes wrong bug Something isn't working labels Oct 8, 2026
@zaniebot
zaniebot deployed to automations October 8, 2026 11:18 — with GitHub Actions Active
Comment thread crates/uv-python-commands/src/find.rs Outdated
Comment on lines +159 to +160
ScriptInterpreter::Interpreter(interpreter) => interpreter,
ScriptInterpreter::Environment(environment) => environment.into_interpreter(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P3] Reuse ScriptInterpreter::into_interpreter

With error handling moved to ?, this match duplicates ScriptInterpreter::into_interpreter, already used by script discovery callers in add.rs, audit.rs, and other commands. Replace the match with .await.map_err(UvError::user)?.into_interpreter() so variant-to-interpreter conversion remains owned by the discovery type rather than repeated in this command.

@zaniebot
zaniebot deployed to automations October 8, 2026 11:32 — with GitHub Actions Active
@codspeed

codspeed Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 54 untouched benchmarks
⏩ 35 skipped benchmarks1


Comparing zb/opportunity-11-01-script-find-diagnostics (13ca1d9) with main (f1d518d)

Open in CodSpeed

Footnotes

  1. 35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@astral-automations-bot
astral-automations-bot Bot force-pushed the zb/opportunity-11-01-script-find-diagnostics branch from 2924c9d to e206e71 Compare October 8, 2026 14:24
@zaniebot
zaniebot deployed to automations October 8, 2026 19:58 — with GitHub Actions Active
@astral-automations-bot
astral-automations-bot Bot force-pushed the zb/opportunity-11-01-script-find-diagnostics branch from f1d6efd to 13ca1d9 Compare October 9, 2026 17:41
@zanieb zanieb added the bot:automerge Promote this pull request to uv and enable auto-merge label Oct 14, 2026
@astral-automations-bot

Copy link
Copy Markdown

Promoted to #22549.

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:error-messages Messaging when something goes wrong bot:automerge Promote this pull request to uv and enable auto-merge bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants