]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Changes to Arcanist for libphutil "extensions/"
authorepriestley <git@epriestley.com>
Mon, 22 Apr 2013 21:38:49 +0000 (14:38 -0700)
committerepriestley <git@epriestley.com>
Mon, 22 Apr 2013 21:38:49 +0000 (14:38 -0700)
Summary: See D5714. Ref T2971.

Test Plan: Built a library map for libphutil's test library.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran
Maniphest Tasks: T2971

Differential Revision: https://secure.phabricator.com/D5715

.gitignore
scripts/lib/PhutilLibraryMapBuilder.php
src/extensions/README [new file with mode: 0644]

index aca49089540f63bec13e3cae777966c43509f81f..8013bb1728dd86581e85f00e92474e556906c0e4 100644 (file)
@@ -1,6 +1,7 @@
 .DS_Store
 ._*
 /src/.phutil_module_cache
+/src/extensions/*
 /docs/
 /.divinercache/
 /externals/includes/*
index 3b0f31ebc51b2be5186d109a91985d76fb8bf363..861a9352d9df42136c580d545a90fdf554c44960 100755 (executable)
@@ -388,13 +388,6 @@ final class PhutilLibraryMapBuilder {
 
     $map = array();
     foreach ($files as $file => $hash) {
-      if (basename($file) == '__init__.php') {
-        // TODO: Remove this once we kill __init__.php. This just makes the
-        // script run faster until we do, so testing and development is less
-        // annoying.
-        continue;
-      }
-
       $file = Filesystem::readablePath($file, $root);
       $file = ltrim($file, '/');
 
@@ -404,6 +397,11 @@ final class PhutilLibraryMapBuilder {
         continue;
       }
 
+      if (dirname($file) == 'extensions') {
+        // Ignore files in the extensions/ directory.
+        continue;
+      }
+
       // We include also filename in the hash to handle cases when the file is
       // moved without modifying its content.
       $map[$file] = md5($hash.$file);
diff --git a/src/extensions/README b/src/extensions/README
new file mode 100644 (file)
index 0000000..5329621
--- /dev/null
@@ -0,0 +1,2 @@
+You can add `.php` files to this directory to load classes and functions defined
+in them at runtime.