diff --git a/scripts/fpm/warmup.php b/scripts/fpm/warmup.php deleted file mode 100644 --- a/scripts/fpm/warmup.php +++ /dev/null @@ -1,38 +0,0 @@ -selectAndLoadSymbols(); - - define('__WARMUP__', true); -} - -__warmup__(); diff --git a/scripts/install/update_phabricator.sh b/scripts/install/update_phabricator.sh --- a/scripts/install/update_phabricator.sh +++ b/scripts/install/update_phabricator.sh @@ -9,15 +9,12 @@ # to work without modifications. # NOTE: This script assumes you are running it from a directory which contains -# arcanist/, libphutil/, and phabricator/. +# arcanist/ and phabricator/. ROOT=`pwd` # You can hard-code the path here instead. ### UPDATE WORKING COPIES ###################################################### -cd $ROOT/libphutil -git pull - cd $ROOT/arcanist git pull diff --git a/src/applications/conduit/controller/PhabricatorConduitController.php b/src/applications/conduit/controller/PhabricatorConduitController.php --- a/src/applications/conduit/controller/PhabricatorConduitController.php +++ b/src/applications/conduit/controller/PhabricatorConduitController.php @@ -156,7 +156,7 @@ $parts = array(); - $libphutil_path = 'path/to/libphutil/src/__phutil_library_init__.php'; + $libphutil_path = 'path/to/arcanist/support/init/init-script.php'; $parts[] = '`. You should not need to explicitly use -@{function@libphutil:phutil_escape_html} anywhere. +@{function@arcanist:phutil_escape_html} anywhere. If you need to apply a string function (such as `trim()`) to safe HTML, use -@{method@libphutil:PhutilSafeHTML::applyFunction}. +@{method@arcanist:PhutilSafeHTML::applyFunction}. -If you need to extract the content of a @{class@libphutil:PhutilSafeHTML} +If you need to extract the content of a @{class@arcanist:PhutilSafeHTML} object, you should call `getHTMLContent()`, not cast it to a string. Eventually, we would like to remove the string cast entirely. -Functions @{function@libphutil:phutil_tag} and @{function@libphutil:hsprintf} +Functions @{function@arcanist:phutil_tag} and @{function@arcanist:hsprintf} are not safe if you pass the user input for the tag or attribute name. All the following examples are dangerous: diff --git a/src/docs/contributor/unit_tests.diviner b/src/docs/contributor/unit_tests.diviner --- a/src/docs/contributor/unit_tests.diviner +++ b/src/docs/contributor/unit_tests.diviner @@ -1,13 +1,13 @@ @title Writing Unit Tests @group developer -Simple guide to libphutil, Arcanist and Phabricator unit tests. +Simple guide to Arcanist and Phabricator unit tests. = Overview = -libphutil, Arcanist and Phabricator provide and use a simple unit test -framework. This document is aimed at project contributors and describes how to -use it to add and run tests in these projects or other libphutil libraries. +Arcanist and Phabricator provide and use a simple unit test framework. This +document is aimed at project contributors and describes how to use it to add +and run tests in these projects or other libphutil libraries. In the general case, you can integrate `arc` with a custom unit test engine (like PHPUnit or any other unit testing library) to run tests in other projects. @@ -16,7 +16,7 @@ = Adding Tests = -To add new tests to a libphutil, Arcanist or Phabricator module: +To add new tests to a Arcanist or Phabricator module: - Create a `__tests__/` directory in the module if it doesn't exist yet. - Add classes to the `__tests__/` directory which extend from diff --git a/src/docs/flavor/php_pitfalls.diviner b/src/docs/flavor/php_pitfalls.diviner --- a/src/docs/flavor/php_pitfalls.diviner +++ b/src/docs/flavor/php_pitfalls.diviner @@ -18,7 +18,7 @@ intermediate arrays and copies every element it has previously seen each time you iterate. -In a libphutil environment, you can use @{function@libphutil:array_mergev} +In a libphutil environment, you can use @{function@arcanist:array_mergev} instead. = `var_export()` Hates Baby Animals = @@ -147,7 +147,7 @@ instead, and use it to reorder the original array. In a libphutil environment, you can often do this easily with -@{function@libphutil:isort} or @{function@libphutil:msort}. +@{function@arcanist:isort} or @{function@arcanist:msort}. = `array_intersect()` and `array_diff()` are Also Slow = @@ -270,7 +270,7 @@ ...you'll probably invent a very interesting, very novel solution that is very wrong. In a libphutil environment, solve this problem with -@{function@libphutil:newv}. Elsewhere, copy `newv()`'s implementation. +@{function@arcanist:newv}. Elsewhere, copy `newv()`'s implementation. = Equality is not Transitive = diff --git a/src/docs/user/configuration/managing_daemons.diviner b/src/docs/user/configuration/managing_daemons.diviner --- a/src/docs/user/configuration/managing_daemons.diviner +++ b/src/docs/user/configuration/managing_daemons.diviner @@ -65,7 +65,7 @@ You can get a list of launchable daemons with **phd list**: - - **libphutil test daemons** are not generally useful unless you are + - **test daemons** are not generally useful unless you are developing daemon infrastructure or debugging a daemon problem; - **PhabricatorTaskmasterDaemon** performs work from a task queue; - **PhabricatorRepositoryPullLocalDaemon** daemons track repositories, for diff --git a/src/docs/user/configuration/troubleshooting_https.diviner b/src/docs/user/configuration/troubleshooting_https.diviner --- a/src/docs/user/configuration/troubleshooting_https.diviner +++ b/src/docs/user/configuration/troubleshooting_https.diviner @@ -32,7 +32,7 @@ You can self-sign a certificate by creating your own CA, but clients will not trust it by default. They need to add the CA as a trusted authority. -For instructions on adding CAs, see `libphutil/resources/ssl/README`. +For instructions on adding CAs, see `arcanist/resources/ssl/README`. If you'd prefer that `arc` not verify the identity of the server whatsoever, you can use the `https.blindly-trust-domains` setting. This will make it diff --git a/src/docs/user/field/darkconsole.diviner b/src/docs/user/field/darkconsole.diviner --- a/src/docs/user/field/darkconsole.diviner +++ b/src/docs/user/field/darkconsole.diviner @@ -48,7 +48,7 @@ The "Error Log" plugin shows errors that occurred while generating the page, similar to the httpd `error.log`. You can send information to the error log -explicitly with the @{function@libphutil:phlog} function. +explicitly with the @{function@arcanist:phlog} function. If errors occurred, a red dot will appear on the plugin tab. diff --git a/src/docs/user/userguide/arcanist.diviner b/src/docs/user/userguide/arcanist.diviner --- a/src/docs/user/userguide/arcanist.diviner +++ b/src/docs/user/userguide/arcanist.diviner @@ -90,15 +90,8 @@ To install Arcanist, pick an install directory and clone the code from GitHub: - some_install_path/ $ git clone https://github.com/phacility/libphutil.git some_install_path/ $ git clone https://github.com/phacility/arcanist.git -This should leave you with a directory structure like this - - some_install_path/ # Wherever you chose to install it. - arcanist/ # Arcanist-specific code and libraries. - libphutil/ # A shared library Arcanist depends upon. - Now add `some_install_path/arcanist/bin/` to your PATH environment variable. When you type "arc", you should see something like this: @@ -110,8 +103,7 @@ - On Windows: @{article:Arcanist User Guide: Windows} - On Mac OS X: @{article:Arcanist User Guide: Mac OS X} -You can later upgrade Arcanist and libphutil to the latest versions with -`arc upgrade`: +You can later upgrade Arcanist to the latest version with `arc upgrade`: $ arc upgrade @@ -122,7 +114,7 @@ able to use: - Facebook does most development on development servers, which have a standard - environment and NFS mounts. Arcanist and libphutil themselves live on an + environment and NFS mounts. Arcanist lives on an NFS mount, and the default `.bashrc` adds them to the PATH. Updating the mount source updates everyone's versions, and new employees have a working `arc` when they first log in. diff --git a/src/docs/user/userguide/arcanist_coverage.diviner b/src/docs/user/userguide/arcanist_coverage.diviner --- a/src/docs/user/userguide/arcanist_coverage.diviner +++ b/src/docs/user/userguide/arcanist_coverage.diviner @@ -27,9 +27,9 @@ If the test engine enables coverage by default, it will be uploaded to Differential and displayed in the right gutter when viewing diffs. -= Enabling Coverage for libphutil, Arcanist and Phabricator = += Enabling Coverage for Arcanist and Phabricator = -If you're contributing, libphutil, Arcanist and Phabricator support coverage if +If you're contributing, Arcanist and Phabricator support coverage if you install Xdebug: http://xdebug.org/ diff --git a/src/docs/user/userguide/arcanist_quick_start.diviner b/src/docs/user/userguide/arcanist_quick_start.diviner --- a/src/docs/user/userguide/arcanist_quick_start.diviner +++ b/src/docs/user/userguide/arcanist_quick_start.diviner @@ -20,9 +20,6 @@ Then install Arcanist itself: - $ mkdir somewhere/ - $ cd somewhere/ - somewhere/ $ git clone https://github.com/phacility/libphutil.git somewhere/ $ git clone https://github.com/phacility/arcanist.git Add `arc` to your path: diff --git a/src/docs/user/userguide/conduit.diviner b/src/docs/user/userguide/conduit.diviner --- a/src/docs/user/userguide/conduit.diviner +++ b/src/docs/user/userguide/conduit.diviner @@ -19,8 +19,7 @@ the API and making calls. This is the best starting point for learning about the API. See the next section for details. -`ConduitClient`: This is the official client available in `libphutil`, and -the one used by `arc`. +`ConduitClient`: This is the official client available in `arcanist`. `arc call-conduit`: You can use this `arc` command to execute low-level Conduit calls by piping JSON in to stdin. This can provide a simple way diff --git a/src/docs/user/userguide/diffusion_managing.diviner b/src/docs/user/userguide/diffusion_managing.diviner --- a/src/docs/user/userguide/diffusion_managing.diviner +++ b/src/docs/user/userguide/diffusion_managing.diviner @@ -55,10 +55,9 @@ install but do not need to be globally unique, so you are free to use the single-letter callsigns for brevity. For example, Facebook uses "E" for the Engineering repository, "O" for the Ops repository, "Y" for a Yum package -repository, and so on, while Phabricator uses "P", "ARC", "PHU" for libphutil, -and "J" for Javelin. Keeping callsigns brief will make them easier to use, and -the use of one-character callsigns is encouraged if they are reasonably -evocative. +repository, and so on, while Phabricator uses "P" and Arcanist uses "ARC". +Keeping callsigns brief will make them easier to use, and the use of +one-character callsigns is encouraged if they are reasonably evocative. If you configure a callsign like `XYZ`, Phabricator will activate callsign URIs and activate the callsign identifier (like `rXYZ`) for the repository. These diff --git a/src/docs/user/userguide/diffusion_symbols.diviner b/src/docs/user/userguide/diffusion_symbols.diviner --- a/src/docs/user/userguide/diffusion_symbols.diviner +++ b/src/docs/user/userguide/diffusion_symbols.diviner @@ -83,8 +83,8 @@ 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 repositories. + Phabricator lists "Arcanist" because it uses classes and functions defined + in `arcanist/`. == External Symbols == diff --git a/src/docs/user/userguide/drydock_hosts.diviner b/src/docs/user/userguide/drydock_hosts.diviner --- a/src/docs/user/userguide/drydock_hosts.diviner +++ b/src/docs/user/userguide/drydock_hosts.diviner @@ -41,7 +41,7 @@ properly with any software you need, and have tools like `git`, `hg` or `svn` that may be required to interact with working copies. -You do **not** need to install PHP, arcanist, libphutil or Phabricator on the +You do **not** need to install PHP, arcanist, or Phabricator on the hosts unless you are specifically running `arc` commands. **You must configure authentication.** Drydock also does not handle credentials diff --git a/src/docs/user/userguide/events.diviner b/src/docs/user/userguide/events.diviner --- a/src/docs/user/userguide/events.diviner +++ b/src/docs/user/userguide/events.diviner @@ -23,7 +23,7 @@ To install event listeners in Phabricator, follow these steps: - - Write a listener class which extends @{class@libphutil:PhutilEventListener}. + - Write a listener class which extends @{class@arcanist:PhutilEventListener}. - Add it to a libphutil library, or create a new library (for instructions, see @{article@phabcontrib:Adding New Classes}. - Configure Phabricator to load the library by adding it to `load-libraries` @@ -40,7 +40,7 @@ To install event listeners in Arcanist, follow these steps: - - Write a listener class which extends @{class@libphutil:PhutilEventListener}. + - Write a listener class which extends @{class@arcanist:PhutilEventListener}. - Add it to a libphutil library, or create a new library (for instructions, see @{article@phabcontrib:Adding New Classes}. - Configure Phabricator to load the library by adding it to `load` diff --git a/src/docs/user/userguide/utf8.diviner b/src/docs/user/userguide/utf8.diviner --- a/src/docs/user/userguide/utf8.diviner +++ b/src/docs/user/userguide/utf8.diviner @@ -22,48 +22,6 @@ Encodings" below). This is not completely supported, and repositories with files that have multiple encodings are not supported. -= Detecting and Repairing Files = - -It is recommended that you write source files only in ASCII text, but -Phabricator fully supports UTF-8 source files. - -If you have a project which isn't valid UTF-8 because a few files have random -binary nonsense in them, there is a script in libphutil which can help you -identify and fix them: - - project/ $ libphutil/scripts/utils/utf8.php - -Generally, run this script on all source files with "-t" to find files with bad -byte ranges, and then run it without "-t" on each file to identify where there -are problems. For example: - - project/ $ find . -type f -name '*.c' -print0 | xargs -0 -n256 ./utf8 -t - ./hello_world.c - -If this script exits without output, you're in good shape and all the files that -were identified are valid UTF-8. If it found some problems, you need to repair -them. You can identify the specific problems by omitting the "-t" flag: - - project/ $ ./utf8.php hello_world.c - FAIL hello_world.c - - 3 main() - 4 { - 5 printf ("Hello World<0xE9><0xD6>!\n"); - 6 } - 7 - -This shows the offending bytes on line 5 (in the actual console display, they'll -be highlighted). Often a codebase will mostly be valid UTF-8 but have a few -scattered files that have other things in them, like curly quotes which someone -copy-pasted from Word into a comment. In these cases, you can just manually -identify and fix the problems pretty easily. - -If you have a prohibitively large number of UTF-8 issues in your source code, -Phabricator doesn't include any default tools to help you process them in a -systematic way. You could hack up `utf8.php` as a starting point, or use other -tools to batch-process your source files. - = Support for Alternate Encodings = Phabricator has some support for encodings other than UTF-8. diff --git a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php --- a/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php +++ b/src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php @@ -66,7 +66,8 @@ $class = $this->getTaskClass(); try { - // NOTE: If the class does not exist, libphutil will throw an exception. + // NOTE: If the class does not exist, the autoloader will throw an + // exception. class_exists($class); } catch (PhutilMissingSymbolException $ex) { throw new PhabricatorWorkerPermanentFailureException( diff --git a/src/infrastructure/storage/lisk/LiskDAO.php b/src/infrastructure/storage/lisk/LiskDAO.php --- a/src/infrastructure/storage/lisk/LiskDAO.php +++ b/src/infrastructure/storage/lisk/LiskDAO.php @@ -116,7 +116,7 @@ * $pugs = $dog->loadAllWhere('breed = %s', 'Pug'); * $sawyer = $dog->loadOneWhere('name = %s', 'Sawyer'); * - * These methods work like @{function@libphutil:queryfx}, but only take half of + * These methods work like @{function@arcanist:queryfx}, but only take half of * a query (the part after the WHERE keyword). Lisk will handle the connection, * columns, and object construction; you are responsible for the rest of it. * @{method:loadAllWhere} returns a list of objects, while diff --git a/support/startup/PhabricatorStartup.php b/support/startup/PhabricatorStartup.php --- a/support/startup/PhabricatorStartup.php +++ b/support/startup/PhabricatorStartup.php @@ -67,7 +67,7 @@ */ public static function getMicrosecondsSinceStart() { // This is the same as "phutil_microseconds_since()", but we may not have - // loaded libphutil yet. + // loaded libraries yet. return (int)(1000000 * (microtime(true) - self::getStartTime())); } diff --git a/webroot/rsrc/externals/javelin/docs/concepts/behaviors.diviner b/webroot/rsrc/externals/javelin/docs/concepts/behaviors.diviner --- a/webroot/rsrc/externals/javelin/docs/concepts/behaviors.diviner +++ b/webroot/rsrc/externals/javelin/docs/concepts/behaviors.diviner @@ -124,7 +124,7 @@ the full power of arbitrary JS execution. - It's utterly hideous. -In 2007/2008, we introduced @{function@libphutil:jsprintf} and a function called +In 2007/2008, we introduced @{function@arcanist:jsprintf} and a function called onloadRegister() to solve some of the obvious problems: lang=php diff --git a/webroot/rsrc/externals/javelin/docs/facebook.diviner b/webroot/rsrc/externals/javelin/docs/facebook.diviner deleted file mode 100644 --- a/webroot/rsrc/externals/javelin/docs/facebook.diviner +++ /dev/null @@ -1,82 +0,0 @@ -@title Javelin at Facebook -@group facebook - -Information specific to Javelin at Facebook. - -= Building Support Scripts = - -Javelin now ships with the source to build several libfbjs-based binaries, which -serve to completely sever its dependencies on trunk: - - - `javelinsymbols`: used for lint - - `jsast`: used for documentation generation - - `jsxmin`: used to crush packages - -To build these, first build libfbjs: - - javelin/ $ cd externals/libfbjs - javelin/externals/libfbjs/ $ CXX=/usr/bin/g++ make - -Note that **you must specify CXX explicitly because the default CXX is broken**. - -Now you should be able to build the individual binaries: - - javelin/ $ cd support/javelinsymbols - javelin/support/javelinsymbols $ CXX=/usr/bin/g++ make - - javelin/ $ cd support/jsast - javelin/support/jsast $ CXX=/usr/bin/g++ make - - javelin/ $ cd support/jsxmin - javelin/support/jsxmin $ CXX=/usr/bin/g++ make - -= Synchronizing Javelin = - -To synchronize Javelin **from** Facebook trunk, run the synchronize script: - - javelin/ $ ./scripts/sync-from-facebook.php ~/www - -...where `~/www` is the root you want to pull Javelin files from. The script -will copy files out of `html/js/javelin` and build packages, and leave the -results in your working copy. From there you can review changes and commit, and -then push, diff, or send a pull request. - -To synchronize Javelin **to** Facebook trunk, run the, uh, reverse-synchronize -script: - - javelin/ $ ./scripts/sync-to-facebook.php ~/www - -...where `~/www` is the root you want to push Javelin files to. The script -will copy files out of the working copy into your `www` and leave you with a -dirty `www`. From there you can review changes. - -Once Facebook moves to pure git for `www` we can probably just submodule -Javelin into it and get rid of all this nonsense, but the mixed SVN/git -environment makes that difficult until then. - -= Building Documentation = - -Check out `diviner` and `libphutil` from Facebook github, and put them in a -directory with `javelin`: - - somewhere/ $ ls - diviner/ - javelin/ - libphutil/ - somewhere/ $ - -Now run `diviner` on `javelin`: - - somewhere/ $ cd javelin - somewhere/javelin/ $ ../diviner/bin/diviner . - [DivinerArticleEngine] Generating documentation for 48 files... - [JavelinDivinerEngine] Generating documentation for 74 files... - somewhere/javelin/ $ - -Documentation is now available in `javelin/docs/`. - -= Editing javelinjs.com = - -The source for javelinjs.com lives in `javelin/support/webroot/`. The site -itself is served off the phabricator.com host. You need access to that host to -push it.