Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 did you mean error message doesn't sort target names. #4788

Closed
baroquebobcat opened this issue Aug 7, 2017 · 1 comment
Closed

v2 did you mean error message doesn't sort target names. #4788

baroquebobcat opened this issue Aug 7, 2017 · 1 comment

Comments

@baroquebobcat
Copy link
Contributor

$ ./pants test  tests/python/pants_test/backend/jvm/tasks:has_a_typo

ResolveError: "has_a_typo" was not found in namespace "tests/python/pants_test/backend/jvm/tasks". Did you mean one of:
... 58 unsorted names ...

This can make finding the right one difficult

baroquebobcat added a commit that referenced this issue Feb 1, 2018
…hen trace is disabled (#5413)

### Problem

When there are a large number of suggestions, the lack of alphanumeric sorting is frustrating. #4788
### Solution

Sort the suggestions. Additionally, I noticed that because of where this happens, there may be multiple copies of the error message that show up. I changed the default behavior to dedup common errors.

### Result

```
./pants list 3rdparty/python:rutaba --no-print-exception-stacktrace
Exception caught: (<class 'pants.build_graph.address_lookup_error.AddressLookupError'>)

Exception message: "rutaba" was not found in namespace "3rdparty/python". Did you mean one of:
  :Markdown
  :Pygments
  :ansicolors
```

Instead of
```
Exception caught: (<class 'pants.build_graph.address_lookup_error.AddressLookupError'>)

Exception message: Build graph construction failed: ExecutionError Multiple exceptions encountered:
  ResolveError: "rutaba" was not found in namespace "3rdparty/python". Did you mean one of:
  :psutil
  :isort
  :pywatchman
  :pytest-cov
...
  :scandir
  :setuptools
  ResolveError: "rutaba" was not found in namespace "3rdparty/python". Did you mean one of:
  :psutil
  :isort
  :pywatchman
  :pytest-cov
  :setproctitle
...
  :scandir
  :setuptools

```
@baroquebobcat
Copy link
Contributor Author

Fixed by bfe927d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants