From ec22df5e171aff1e526838a2b452030c074cb8f9 Mon Sep 17 00:00:00 2001 From: Aviv Eyal Date: Tue, 5 May 2015 04:11:30 -0700 Subject: [PATCH] Update symbols docs Summary: Refs T7977. Test Plan: spellcheck. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T7977 Differential Revision: https://secure.phabricator.com/D12688 --- .../user/userguide/diffusion_symbols.diviner | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/docs/user/userguide/diffusion_symbols.diviner b/src/docs/user/userguide/diffusion_symbols.diviner index 0a212055d5..98dd244ec6 100644 --- a/src/docs/user/userguide/diffusion_symbols.diviner +++ b/src/docs/user/userguide/diffusion_symbols.diviner @@ -9,7 +9,8 @@ Phabricator can maintain a symbol index, which keeps track of where classes and functions are defined in the codebase. Once you set up indexing, you can use the index to do things like: - - link symbol uses in Differential code reviews to their definitions + - link symbol uses in Differential code reviews and Diffusion code browsing + to their definitions - allow you to search for symbols - let the IRC bot answer questions like "Where is SomeClass?" @@ -21,7 +22,7 @@ other languages. To populate the index, you need to write a script which identifies symbols in your codebase and set up a cronjob which pipes its output to: - ./scripts/symbols/import_project_symbols.php + ./scripts/symbols/import_repository_symbols.php Phabricator includes a script which can identify symbols in PHP projects: @@ -61,34 +62,28 @@ write such a script, and run this command to see its output: $ find . -type f -name '*.php' | ./scripts/symbols/generate_php_symbols.php To actually build the symbol index, pipe this data to the -`import_project_symbols.php` script, providing the project name: +`import_repository_symbols.php` script, providing the repository callsign: - $ ./scripts/symbols/import_project_symbols.php yourproject < symbols_data + $ ./scripts/symbols/import_repository_symbols.php rREPO < symbols_data Then just set up a cronjob to run that however often you like. You can test that the import worked by querying for symbols using the Conduit -method ##differential.findsymbols##. Some features (like that method, and the +method ##diffusion.findsymbols##. Some features (like that method, and the IRC bot integration) will start working immediately. Others will require more configuration. -= Configuring Differential Integration = += Advanced Configuration = -To configure Differential integration, you need to tell Phabricator which -projects have symbol indexes you want to use, and which other projects they -should pull symbols from. To do this, go to -{nav Repositories > Arcanist Projects > Edit} as an administrator. You need to -fill out these fields: +You can configure some more options by going to {nav Diffusion > (Select + repository) > Edit Repository > Edit Symbols}, and filling out these fields: - - **Repository**: Associate the project with a tracked repository. - **Indexed Languages**: Fill in all the languages you've built indexes for. - - **Uses Symbols From**: If this project depends on other projects, add the - other projects which symbols should be looked for here. For example, + You can leave this blank for "All languages". + - **Uses Symbols From**: If this project depends on other repositories, add + the other repositories which symbols should be looked for here. For example, Phabricator lists "Arcanist" and "libphutil" because it uses classes and - functions from these projects. - -Once you've configured a project, new revisions in that project will -automatically link symbols in Differential. + functions from these repositories. NOTE: Because this feature depends on the syntax highlighter, it will work better for some languages than others. It currently works fairly well for PHP,