forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message for unrecognized BUILD file symbols (pantsbuild…
…#11564) Improved error message for unrecognized symbol (Closes pantsbuild#11258) and associated test cases. In particular, error messages are updated to include a "Did you mean...?" message along with a reference to the docs to show potential backends. The "Did you mean...?" component is dependent on the number of potential symbols that could be what the user intended. This component is excluded if there are no potential matches, includes the singular match if there is one, includes "x or y" for two, and has "x,y or z" for multiple - essentially, they're comma-delimited without an Oxford comma for the final. This follows the original "Name ____ is not defined" message if present. The error component linking to the docs ("If you expect to see more symbols activated in the below list, refer to {doc link about enabling backends} for all available backends to activate") follows this, and is finally followed by the original list of all registered symbols. [ci skip-rust]
- Loading branch information
1 parent
ef8d4d6
commit c9d6826
Showing
2 changed files
with
54 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters