Page MenuHomePhabricator

Update Celerity map parser for new docblock code
ClosedPublic

Authored by epriestley on Aug 23 2016, 9:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 6, 3:13 AM
Unknown Object (File)
Fri, Sep 6, 2:37 AM
Unknown Object (File)
Wed, Sep 4, 4:05 AM
Unknown Object (File)
Sun, Aug 25, 4:37 AM
Unknown Object (File)
Aug 15 2024, 9:13 PM
Unknown Object (File)
Aug 7 2024, 5:02 PM
Unknown Object (File)
Aug 5 2024, 10:27 PM
Unknown Object (File)
Aug 2 2024, 12:16 AM
Subscribers
None

Details

Summary

After D16431, listing the same @annotation multiple times makes the docblock parser return a list.

We have some resources which list @requires or @provides several times, but don't handle the new parser properly. Make the code more flexible, since this is a reasonable way to specify the annotations.

See also D16432. This produces a failure in this form:

[2016-08-23 21:10:15] ERROR 2: trim() expects parameter 1 to be string, array given at [/core/data/drydock/workingcopy-74/repo/phabricator/src/applications/celerity/CelerityResourceMapGenerator.php:236]
2	arcanist(head=master, ref.master=89e8b4852384), phabricator(head=6c940fb71b0a8850c6a1b7f5fc642a8f8135a76a, ref.master=b521f2349e46), phutil(head=master, ref.master=237549280f08)
3	  #0 trim(array) called at [<phabricator>/src/applications/celerity/CelerityResourceMapGenerator.php:236]
4	  #1 CelerityResourceMapGenerator::getProvidesAndRequires(string, string) called at [<phabricator>/src/applications/celerity/CelerityResourceMapGenerator.php:193]
5	  #2 CelerityResourceMapGenerator::rebuildTextResources(CelerityPhabricatorResources, CelerityResourceTransformer) called at [<phabricator>/src/applications/celerity/CelerityResourceMapGenerator.php:54]
6	  #3 CelerityResourceMapGenerator::generate() called at [<phabricator>/src/__tests__/PhabricatorCelerityTestCase.php:16]
7	  #4 PhabricatorCelerityTestCase::testCelerityMaps()
8	  #5 call_user_func_array(array, array) called at [<arcanist>/src/unit/engine/phutil/PhutilTestCase.php:492]
9	  #6 PhutilTestCase::run() called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:69]
10	  #7 PhutilUnitTestEngine::run() called at [<arcanist>/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:147]
11	  #8 ArcanistConfigurationDrivenUnitTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:167]
12	  #9 ArcanistUnitWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
Test Plan

Ran bin/celerity map, no more warnings and no change to the actual map.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Update Celerity map parser for new docblock code.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, joshuaspence.
chad edited edge metadata.
This revision is now accepted and ready to land.Aug 23 2016, 9:36 PM
This revision was automatically updated to reflect the committed changes.