Skip to content

improve ambiguous run error message#6111

Merged
aryairani merged 3 commits intotrunkfrom
26-01-08-ambiguous-run-suffix
Jan 15, 2026
Merged

improve ambiguous run error message#6111
aryairani merged 3 commits intotrunkfrom
26-01-08-ambiguous-run-suffix

Conversation

@mitchellwrosen
Copy link
Member

@mitchellwrosen mitchellwrosen commented Jan 13, 2026

Overview

Fixes #5974

This PR improves the error message we see on ambiguous run.

Previously, run would crash with a bad error message whenever given an ambiguous suffix, even if not all matching names were of the right type.

Now, run first filters the list of candidate terms down to the ones that have the right type, and then runs if there's only one, otherwise fails with a decent error message. Like other commands, indirect dependencies are in scope but don't contribute to ambiguous name errors.

Test coverage

I've included a transcript that demonstrates the changes

@mitchellwrosen mitchellwrosen marked this pull request as ready for review January 14, 2026 15:53
@aryairani aryairani merged commit a88caa2 into trunk Jan 15, 2026
31 checks passed
@aryairani aryairani deleted the 26-01-08-ambiguous-run-suffix branch January 15, 2026 00:04
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.

ambiguous name suffix passed to run

2 participants