Add cycle detection to celerity mapper
Summary: create CelerityResourceGraph, which extends AbstractDirectedGraph. since we've done a bunch of work already to load the resource graph into memory CelerityResourceGraph simply stores a copy and makes loadEdges work off that stored copy. Test Plan: made phabricator-prefab require herald-rule-editor ~/code/phabricator> ./scripts/celerity_mapper.php webroot Finding static resources... Processing 154 files.......................................................................................................................................................... [2011-11-22 11:28:29] EXCEPTION: (Exception) Cycle detected in resource graph: phabricator-prefab => herald-rule-editor => phabricator-prefab at [/Users/btrahan/Dropbox/code/phabricator/scripts/celerity_mapper.php:173] fixed phabricator-prefab requiring herald-rule-editor. re-ran celerity_mapper and no errors! Reviewers: epriestley Reviewed By: epriestley CC: aran, btrahan, epriestley Differential Revision: 1132
This commit is contained in:
@@ -83,6 +83,7 @@ phutil_register_library_map(array(
|
||||
'AphrontWriteGuard' => 'aphront/writeguard',
|
||||
'CelerityAPI' => 'infrastructure/celerity/api',
|
||||
'CelerityResourceController' => 'infrastructure/celerity/controller',
|
||||
'CelerityResourceGraph' => 'infrastructure/celerity/graph',
|
||||
'CelerityResourceMap' => 'infrastructure/celerity/map',
|
||||
'CelerityStaticResourceResponse' => 'infrastructure/celerity/response',
|
||||
'ConduitAPIMethod' => 'applications/conduit/method/base',
|
||||
@@ -813,6 +814,7 @@ phutil_register_library_map(array(
|
||||
'AphrontTypeaheadTemplateView' => 'AphrontView',
|
||||
'AphrontWebpageResponse' => 'AphrontResponse',
|
||||
'CelerityResourceController' => 'AphrontController',
|
||||
'CelerityResourceGraph' => 'AbstractDirectedGraph',
|
||||
'ConduitAPI_arcanist_Method' => 'ConduitAPIMethod',
|
||||
'ConduitAPI_arcanist_projectinfo_Method' => 'ConduitAPI_arcanist_Method',
|
||||
'ConduitAPI_conduit_connect_Method' => 'ConduitAPIMethod',
|
||||
|
||||
Reference in New Issue
Block a user