Page MenuHomePhabricator

Allow `ArcanistPhutilLibraryLinter` to run with an out-of-date XHPAST binary
ClosedPublic

Authored by joshuaspence on Jan 27 2015, 9:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 12:38 AM
Unknown Object (File)
Sun, Apr 21, 5:29 PM
Unknown Object (File)
Sun, Apr 21, 5:29 PM
Unknown Object (File)
Sun, Apr 21, 5:04 PM
Unknown Object (File)
Sun, Apr 21, 4:31 PM
Unknown Object (File)
Mon, Apr 15, 8:49 PM
Unknown Object (File)
Thu, Apr 11, 8:31 AM
Unknown Object (File)
Mar 11 2024, 1:41 AM
Subscribers

Details

Summary

There is no need to check if the XHPAST binary is available here because this linter does not actually parse PHP, it only considers the library map.

Test Plan

Removed the XHPAST binary and ran arc lint on a bunch of files.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Allow `ArcanistPhutilLibraryLinter` to run with an out-of-date XHPAST binary.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

(For when this un-WIP's, what's the rationale here?)

Oh, the rationale is that we would build XHPAST later anyway. Or may I'm wrong, I'll take a closer look shortly.

OK, I'm not crazy (I think).

I think that this still makes sense. Specifically, this linter doesn't need to parse PHP at all... it only cares about the library map.

joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence edited edge metadata.
epriestley edited edge metadata.
epriestley added inline comments.
src/lint/linter/ArcanistPhutilLibraryLinter.php
74

Something invokes XHPAST later on, or this doesn't make sense (and I'm like 99% sure the builder invokes it). But if that also builds the binary (which I think it does) then removing this is fine.

I think the only reason not to remove this explicit check is if the build failure deep in the stack is much harder to figure out? Does it come out with just some extra stack stuff, or is it like 5 errors wrapping one another as we end up several CommandExceptions deep?

This revision is now accepted and ready to land.Feb 2 2015, 8:13 PM
src/lint/linter/ArcanistPhutilLibraryLinter.php
74

It's not too bad:

Exception
Some linters failed:
    - ArcanistPhutilLibraryLinter: CommandException: Command failed with error #1!
      COMMAND
      '/home/joshua/workspace/github.com/phacility/libphutil/scripts/build_xhpast.sh'
      
      STDOUT
      (empty)
      
      STDERR
      derp
      
(Run with `--trace` for a full exception trace.)
This revision was automatically updated to reflect the committed changes.