Skip to content

Commit

Permalink
Changes to Arcanist for libphutil "extensions/"
Browse files Browse the repository at this point in the history
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
  • Loading branch information
epriestley committed Apr 22, 2013
1 parent c0ff985 commit 9047408
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
._*
/src/.phutil_module_cache
/src/extensions/*
/docs/
/.divinercache/
/externals/includes/*
12 changes: 5 additions & 7 deletions scripts/lib/PhutilLibraryMapBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,6 @@ private function loadSourceFileMap() {

$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, '/');

Expand All @@ -404,6 +397,11 @@ private function loadSourceFileMap() {
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);
Expand Down
2 changes: 2 additions & 0 deletions src/extensions/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
You can add `.php` files to this directory to load classes and functions defined
in them at runtime.

0 comments on commit 9047408

Please sign in to comment.