-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Missing addresses on the command line cause unfriendly error messages in the new engine #3912
Comments
Related to #4007 |
Related to #3695 |
Related to #4446: should probably overhaul |
pants list failure message types. Mostly v2 says missing dir, implicit target namev1
v2
missing dir, recursive wildcardv1
v2
missing dir, single level wildcardv1
v2
missing dir, explicit namev1
v2
dir with no BUILD files at all, implicit namev1
v2
dir with no BUILD files at all, explicit namev1
v2
dir with no BUILD files at all, recursive wildcardv1
v2
nh: I think this being an error is the right call. dir with no BUILD files at all, wildcardv1
v2
dir with no direct BUILD files, but with ones in subdir, wildcardv1
v2
dir with no direct BUILD files, but with ones in subdir, recursive wildcardv1Prints all recursive entries under the dir. v2Same. dir with BUILD file, implicit name -- missing targetv1
v2
dir with BUILD file, explicit name -- missing targetv1
v2
|
Missing target referenced in a build file.v1
v2
|
Currently we always print out a trace when a BUILD file has missing targets. This brings the v2 behavior more in line with v1 by adding special cases for resolve errors to ensure we produce an actionable error message. It doesn't cover transitive references of missing targets yet. See pantsbuild#3912 for some of the possible cases
### Problem There's two problems. 1. For some classes of missing targets, we always print a trace. V1 doesn't, it displays a short error message that's pretty clear. 2. For other error cases, we just say that the spec was missing without further information. ### Solution This patch brings v2's behavior more in line with v1's for the above cases. It adds special handling for `ResolveError`s in those cases. It does not attempt to improve trace generation generally, or to communicate where a non-existent address is referenced from if it has references to it. Those are follow one bits of work. See #3912 for a number of related cases.
### Problem There's two problems. 1. For some classes of missing targets, we always print a trace. V1 doesn't, it displays a short error message that's pretty clear. 2. For other error cases, we just say that the spec was missing without further information. ### Solution This patch brings v2's behavior more in line with v1's for the above cases. It adds special handling for `ResolveError`s in those cases. It does not attempt to improve trace generation generally, or to communicate where a non-existent address is referenced from if it has references to it. Those are follow one bits of work. See pantsbuild#3912 for a number of related cases.
#4509 covered the existing BUILD file cases, but not the missing BUILD file / directory ones. I'm going to put together a patch for that next. |
### Problem When the engine has an issue finding BUILD files to fulfill a request for targets, it should have a good message even if the requested spec has no associated BUILD files. ### Solution This patch adds another error raising path to addresses_from_address_families so that missing directories and empty directories have improved error messages. It also * adds an error case for address mapper for unrelated Throws so that their associated exception's text will be reported if one is encountered instead of a missing field error. * removes a needless call to scheduler.root_entries, which calls into the native engine. ### Result The cases in #3912 for missing directories or directories without BUILD files have ok errors.
### Problem. Injected addresses that were bad were not being caught by the error handling introduced in the other patches for pantsbuild#3912 ### Solution. Add the checks that raise the right exceptions to inject method ### Result. Now injections will also get the more helpful error. I also removed the additional unnecessary root_entries call in inject
### Problem. Injected addresses that were bad were not being caught by the error handling introduced in the other patches for #3912 ### Solution. Add the checks that raise the right exceptions to the `_inject` method. ### Result. Now injections will also get the more helpful error. I also removed the additional unnecessary root_entries call in `_inject`.
### Problem There's two problems. 1. For some classes of missing targets, we always print a trace. V1 doesn't, it displays a short error message that's pretty clear. 2. For other error cases, we just say that the spec was missing without further information. ### Solution This patch brings v2's behavior more in line with v1's for the above cases. It adds special handling for `ResolveError`s in those cases. It does not attempt to improve trace generation generally, or to communicate where a non-existent address is referenced from if it has references to it. Those are follow one bits of work. See pantsbuild#3912 for a number of related cases.
### Problem When the engine has an issue finding BUILD files to fulfill a request for targets, it should have a good message even if the requested spec has no associated BUILD files. ### Solution This patch adds another error raising path to addresses_from_address_families so that missing directories and empty directories have improved error messages. It also * adds an error case for address mapper for unrelated Throws so that their associated exception's text will be reported if one is encountered instead of a missing field error. * removes a needless call to scheduler.root_entries, which calls into the native engine. ### Result The cases in pantsbuild#3912 for missing directories or directories without BUILD files have ok errors.
) ### Problem. Injected addresses that were bad were not being caught by the error handling introduced in the other patches for pantsbuild#3912 ### Solution. Add the checks that raise the right exceptions to the `_inject` method. ### Result. Now injections will also get the more helpful error. I also removed the additional unnecessary root_entries call in `_inject`.
In v1, the error looks like
Which I think is more clear.
The text was updated successfully, but these errors were encountered: