mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 02:02:40 +01:00
Use have/need data in ArcanistPhutilLibraryLinter
Summary: Ref T5640. In D9864, the data this linter pulls out of the map was changed, breaking "use of undeclared function" warnings. Test Plan: ``` >>> Lint for src/future/FutureProxy.php: Error (PHL1) Unknown Symbol Use of unknown function 'qqqqqq'. Common causes are: - Your libphutil/ is out of date. This is the most common cause. Update this copy of libphutil: /INSECURE/devtools/libphutil - Some other library is out of date. Update the library this symbol appears in. - This symbol is misspelled. Spell the symbol name correctly. Symbol name spelling is case-sensitive. - This symbol was added recently. Run `arc liberate` on the library it was added to. - This symbol is external. Use `@phutil-external-symbol`. Use `grep` to find usage examples of this directive. *** ALTHOUGH USUALLY EASY TO FIX, THIS IS A SERIOUS ERROR. *** THIS ERROR IS YOUR FAULT. YOU MUST RESOLVE IT. 15 $this->setProxiedFuture($proxied); 16 } 17 >>> 18 qqqqqq(); 19 } 20 21 public function setProxiedFuture(Future $proxied) { ``` Reviewers: joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T5640 Differential Revision: https://secure.phabricator.com/D9954
This commit is contained in:
parent
a953544657
commit
c6e6227ef9
2 changed files with 6 additions and 8 deletions
|
@ -2,13 +2,13 @@
|
|||
|
||||
/**
|
||||
* This file is automatically generated. Use 'arc liberate' to rebuild it.
|
||||
*
|
||||
* @generated
|
||||
* @phutil-library-version 2
|
||||
*/
|
||||
phutil_register_library_map(array(
|
||||
'__library_version__' => 2,
|
||||
'class' =>
|
||||
array(
|
||||
'class' => array(
|
||||
'ArcanistAliasWorkflow' => 'workflow/ArcanistAliasWorkflow.php',
|
||||
'ArcanistAmendWorkflow' => 'workflow/ArcanistAmendWorkflow.php',
|
||||
'ArcanistAnoidWorkflow' => 'workflow/ArcanistAnoidWorkflow.php',
|
||||
|
@ -208,11 +208,8 @@ phutil_register_library_map(array(
|
|||
'XUnitTestEngine' => 'unit/engine/XUnitTestEngine.php',
|
||||
'XUnitTestResultParserTestCase' => 'unit/engine/__tests__/XUnitTestResultParserTestCase.php',
|
||||
),
|
||||
'function' =>
|
||||
array(
|
||||
),
|
||||
'xmap' =>
|
||||
array(
|
||||
'function' => array(),
|
||||
'xmap' => array(
|
||||
'ArcanistAliasWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistAmendWorkflow' => 'ArcanistBaseWorkflow',
|
||||
'ArcanistAnoidWorkflow' => 'ArcanistBaseWorkflow',
|
||||
|
|
|
@ -66,7 +66,8 @@ final class ArcanistPhutilLibraryLinter extends ArcanistLinter {
|
|||
$root = phutil_get_library_root($lib);
|
||||
|
||||
try {
|
||||
$symbols[$lib] = id(new PhutilLibraryMapBuilder($root))->buildMap();
|
||||
$symbols[$lib] = id(new PhutilLibraryMapBuilder($root))
|
||||
->buildFileSymbolMap();
|
||||
} catch (XHPASTSyntaxErrorException $ex) {
|
||||
// If the library contains a syntax error then there isn't much that we
|
||||
// can do.
|
||||
|
|
Loading…
Reference in a new issue