1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

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
This commit is contained in:
Aviv Eyal 2015-05-05 04:11:30 -07:00 committed by epriestley
parent 57c8dc2cff
commit ec22df5e17

View file

@ -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,