Page MenuHomePhabricator

"arc liberate" incorrectly includes subdirectories of "src/extensions/" in library map
Closed, ResolvedPublic

Description

To reproduce:

  • Create a directory in src/extensions/.
  • Put a .php class file into it.
  • Run arc liberate.

Expected:

  • File is not included in the library map.

Actual:

  • File is included in the library map.

Event Timeline

epriestley triaged this task as Wishlist priority.Sep 16 2019, 6:44 PM
epriestley created this task.

I actually tried to use the extensions directory to hide Composer's vendored files and ran into this same issue.

Looking at this in slightly more detail, I think the immediate issue is just that .gitignore specifies /src/extensions/*, not /src/extensions/**.

It would be better for arc liberate to explicitly exclude these files regardless of the .gitignore setting, though, since loose files in extensions/ should never be part of the map even if they're checked in (and it's conceptually "fine" to bypass .gitignore and check them in if you're forking anyway -- this doesn't make any more trouble than forking would on its own).

Oh, no, that's unrelated:

if (dirname($file) == 'extensions') {
  // Ignore files in the extensions/ directory.
  continue;
}