Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 22, 2012
  1. @epriestley

    Parse "--help" correctly in `arc`

    epriestley authored
    Summary:
    We delegate parsing to `PhutilArgumentParser` but then skip the parts of the code which do something with this flag.
    
    In particular, `arc --help list` just runs `arc list`.
    
    See https://github.com/facebook/arcanist/issues/58
    
    Test Plan: Ran `arc --help`, `arc list --help`, `arc --help list`, `arc --help help --help`. Got expected help in all cases.
    
    Reviewers: vrana, chad, btrahan
    
    Reviewed By: chad
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D4023
Commits on Nov 5, 2012
  1. Delete license headers from files

    vrana authored
    Summary:
    This commit doesn't change license of any file. It just makes the license implicit (inherited from LICENSE file in the root directory).
    
    We are removing the headers for these reasons:
    
    - It wastes space in editors, less code is visible in editor upon opening a file.
    - It brings noise to diff of the first change of any file every year.
    - It confuses Git file copy detection when creating small files.
    - We don't have an explicit license header in other files (JS, CSS, images, documentation).
    - Using license header in every file is not obligatory: http://www.apache.org/dev/apply-license.html#new.
    
    This change is approved by Alma Chao (Lead Open Source and IP Counsel at Facebook).
    
    Test Plan: Verified that the license survived only in unit tests and LICENSE file.
    
    Reviewers: epriestley, btrahan, edward
    
    Reviewed By: epriestley
    
    CC: aran, Korvin, davidrecordon
    
    Maniphest Tasks: T2035
    
    Differential Revision: https://secure.phabricator.com/D3881
Commits on Oct 30, 2012
  1. @epriestley

    Don't try to run didAbortWorkflow() if the user never provided a command

    epriestley authored
    Summary:
    If you type `arc`, you currently get a fatal since $config isn't defined. Don't try to run the hook if we never built a config.
    
    (We could build the config earlier and then run the hook anyway, but $workflow and $command would not be defined. It seems unlikely that executing the hook here is useful, since it affects only the case that the user types `arc` on its own.)
    
    Test Plan: Typed `arc`. Typed `arc diff`, etc.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3841
Commits on Oct 22, 2012
  1. Provide a hook for aborted workflow

    vrana authored
    Summary:
    We start Sandcastle push when `arc diff` starts.
    If `arc diff` throws then HHVM waits for finishing the futures.
    We need to kill them sooner.
    
    Test Plan: Will implement the hook.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3713
Commits on Oct 16, 2012
  1. Fix typo in comment

    vrana authored
Commits on Oct 8, 2012
  1. Write to STDERR instead of php://stderr

    vrana authored
    Summary: See D3661.
    
    Test Plan:
      $ arc diff --raw
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1261
    
    Differential Revision: https://secure.phabricator.com/D3662
Commits on Sep 17, 2012
  1. Require PHP 5.3.0 on Windows

    vrana authored
    Test Plan:
      $ arc diff
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3506
  2. Lint functions not available on Windows on PHP 5.2

    vrana authored
    Summary: Also use absolute paths.
    
    Test Plan: Linted Arcanist, libphutil, Phabricator, found no false positives and one real error in [[ https://secure.phabricator.com/diffusion/PHU/browse/master/src/channel/PhutilSocketChannel.php;42d8e8447c8b5d6a$92 | PhutilSocketChannel ]].
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3504
Commits on Sep 7, 2012
  1. @fmoo

    Use /usr/bin/env python

    fmoo authored
    Summary: Use python from env, instead of the distro installed one in /usr/bin
    
    Test Plan:
    Ran arc anoid on a system that only had python in /usr/bin, still
    works. Ran arc anoid on a system that had a python in /usr/local/bin before
    /usr/bin.  Still works as well
    
    Reviewers: epriestley, alanh
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3451
Commits on Sep 5, 2012
  1. @epriestley

    Implement the arcanist top-level log handling in terms of $console->w…

    epriestley authored
    …riteLog()
    
    Summary:
      - See D3422.
      - Also improve some event configuration/debugging stuff.
    
    Test Plan: Ran `arc list --trace`, set bogus/valid event handlers.
    
    Reviewers: vrana, nh
    
    Reviewed By: vrana
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3423
Commits on Aug 21, 2012
  1. @epriestley

    Improve management of zlib dependency

    epriestley authored
    Summary:
      - Add zlib functions to extension functions.
      - Provide a better error if the extension is actually missing.
    
    Test Plan: Eyeballed it.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: btrahan
    
    CC: Korvin, aran
    
    Differential Revision: https://secure.phabricator.com/D3321
Commits on Aug 10, 2012
  1. @epriestley

    Raise exception instead of returning magical number from 'arc anoid'

    epriestley authored
    Summary: how do I python
    
    Test Plan: help
    
    Reviewers: alanh
    
    Reviewed By: alanh
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3245
  2. @epriestley

    Fix serious problems with 'arc anoid'

    epriestley authored
    Summary: https://github.com/facebook/arcanist/issues/48
    
    Test Plan: hmm
    
    Reviewers: alanh, tuomaspelkonen
    
    Reviewed By: tuomaspelkonen
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3244
  3. @epriestley

    Allow arcanist to search for libphutil in externals/includes/

    epriestley authored
    Summary:
    In some cases (notably, homebrew) an installer may not control where arcanist/ and libphutil/ live and may not be able to control 'include_path'.
    
    Allow libphutil/ to be symlinked into arcanist/externals/includes/ if all else fails.
    
    Test Plan:
      - Moved `libphutil` to `libphutilx`. Ran "arc" and got a failure.
      - Symlinked it into externals/includes/, ran `arc`, got success.
      - Moved it back to `libphutil`, ran `arc`, success.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran, tfmeusburger
    
    Differential Revision: https://secure.phabricator.com/D3243
Commits on Aug 1, 2012
  1. @epriestley

    Add mysql and mysqli functions to the phutil map whitelist

    epriestley authored
    Summary: I originally excluded `mysql` these under the theory that it would be impossible to test anything without it, but `arc` doesn't need it and you could have only one of the mysql-flavored extensions without having the other one. Whitelist all the mysql and mysqli extension functions as far as depenencies are concerned.
    
    Test Plan: @floatinglomas, let me know if this fixes things for you?
    
    Reviewers: btrahan, vrana, floatinglomas
    
    Reviewed By: btrahan
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3119
Commits on Jul 26, 2012
  1. @epriestley

    Include extension classes in the builtin list

    epriestley authored
    Summary: Just like we ship with a list of extension functions, add a list of extension classes so people stop getting lint errors about DOMDocument just because some linter uses it.
    
    Test Plan: Ran "arc lint".
    
    Reviewers: vrana, btrahan, codeblock
    
    Reviewed By: vrana
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3082
  2. @epriestley

    Enrich arc configuration and add stronger typing

    epriestley authored
    Summary:
    See <https://github.com/facebook/arcanist/issues/45>
    
    Currently, when the user types `arc set-config x false`, we set it as the string "false", which is usually not desirable. We have some steps toward typed config already, but expand on what we have and move as much stuff as possible into it, including all the config settings that aren't currently documented (there are still some lint-specific and project-specific settings not present here, but this is most of it).
    
    Also make the `phutil_libraries` key a legacy name for `load`, and `immutable_history` a legacy name for `history.immutable`. Generally the goal here is to make config simpler and bring it more in-line with Git/Mercurial, which use dotted hierarchies.
    
    I'll add some documentation here but I think most of the changes should be fairly straightforward.
    
    Test Plan:
      - `arc set-config history.immutable on` (And similar -- sets to boolean true.)
      - `arc set-config history.immutable off` (And similar -- sets to boolean false.)
      - `arc set-config history.immutable derp` (And similar -- raises exception.)
      - `arc set-config history.immutable ''` (And similar -- removes setting value.)
      - `arc set-config --show`
      - `arc get-config`
      - `arc get-config base`
    
    Reviewers: dschleimer, bos, btrahan, vrana
    
    Reviewed By: dschleimer
    
    CC: aran
    
    Maniphest Tasks: T1546
    
    Differential Revision: https://secure.phabricator.com/D3045
Commits on Jul 22, 2012
  1. Create a mysterious new workflow

    Alan Huang authored
    Summary:
    Phabricator, as we all know, is marketed as a fun adventure game. However, while it is occasionally fun and often an adventure, it's so far been sorely deficient in the game aspect. This patch aims to rectify that oversight. (Presence of the first two qualities is not guaranteed.)
    
    Note: In case there's any doubt, this is not a serious suggestion. I was bored.
    
    Test Plan: Seriously?
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3026
Commits on Jul 11, 2012
  1. @epriestley

    Add mb_* functions to the external function list

    epriestley authored
    Summary: The mbstring extension is common but not part of the PHP core, and we have a soft dependency on it but generally guard calls with function_exists(). Add the mbstring functions to the whitelist of known extension functions so lint doesn't raise errors about them if you don't have mbstring installed.
    
    Test Plan: @ffx, can you verify this fixes the lint issue for you? Probably faster than recompiling my PHP without mbstring.
    
    Reviewers: ffx, btrahan
    
    Reviewed By: btrahan
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2961
Commits on Jul 6, 2012
  1. @epriestley

    Support "load" key in arc system configuration

    epriestley authored
    Summary: I think @nh needs this at some point?
    
    Test Plan: Added bogus and valid "load" to system config, got warning and load respectively.
    
    Reviewers: nh, dschleimer, btrahan
    
    Reviewed By: dschleimer
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2931
  2. @epriestley

    Print out the locations of libphutil and arcanist when arc is run wit…

    epriestley authored
    …h --trace
    
    Summary: We currently print //additional// libraries, but not the core libraries, which makes diagnosing include problems more difficult than necessary.
    
    Test Plan: ran `arc derp --trace`, got libphutil/arcanist locations
    
    Reviewers: btrahan
    
    Reviewed By: btrahan
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2929
Commits on Jul 3, 2012
  1. Use binary safe diff in arc diff

    Jason Ge authored
    Summary: Otherwise svn diff fails when the file is binary but the "svn:mime-type = application/x-shellscript" is missing in it.
    
    Test Plan: arc diff succeeded against deleting a binary file which doesn't have svn:mime-type = application/x-shellscript.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2915
Commits on Jun 26, 2012
  1. @epriestley

    Remove all libphutil v1 support

    epriestley authored
    Summary:
    Delete all code related to v1 libraries in arcanist.
    
    When users liberate a v1 library, prompt them to upgrade.
    
    Test Plan: Reverted phabricator/ to a couple of months ago and liberated it. Got prompted to upgrade. Upgraded.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1103
    
    Differential Revision: https://secure.phabricator.com/D2861
  2. @epriestley

    Add various flags to the HgProxy daemons

    epriestley authored
    Summary:
      - Add flags to exit after an idle time or client count.
      - Add flags to control daemonization.
      - Add flags to control output.
      - Add flags to skip the "hello" frame of the protocol.
      - Make the client launch a server if one does not exist.
    
    The one-time overhead to launch a server and run a command through it looks to be ~130% of the overhead to run the command directly with "hg", so even if we never run a second command we're not paying too much.
    
    The incremental overhead to run subsequent command appears to be less than 3% of the overhead to run the command directly with "hg" (and maybe less than 1%, I'm not sure how long the computation part of a command like 'hg log' "actually" takes).
    
    The overhead to launch a PHP client, connect to an existing server, run a command, and then print it and exit is roughly 50% of the overhead to run the command directly with "hg". So theoretically a user can achieve an amortized 2x performance increase for all 'hg' commands by aliasing 'hg' to the PHP client in their shell.
    
    Test Plan:
      - Ran servers with idle and client count limits, let them idle and/or hit their connection limits, saw them exit.
      - Ran foreground and background servers.
      - Ran a daemon server with redirected stdout/stderr. Verified logs appeared.
      - Ran with --quiet.
      - Ran clients and servers with and without --skip-hello, things work if they agree and break if they disagree. The throughput gain on this is fairly small (maybe 5%?) but it seems simple enough to keep for the moment.
      - Ran serverless clients and verified that servers launched the first time, were available subsequently, and relaunched after 15 seconds idle.
    
    Reviewers: csilvers, vrana, btrahan
    
    Reviewed By: csilvers
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2680
Commits on Jun 22, 2012
  1. Warn about PHP 5.3 only functions and parameters

    vrana authored
    Test Plan:
    Linted:
    
      json_decode('{}', true, 1, 1);
      gethostname();
    
    Also linted all Phabricator repositories and found no occurrence.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1158
    
    Differential Revision: https://secure.phabricator.com/D2806
  2. Save files with path to phutil cache

    vrana authored
    Test Plan:
      $ arc liberate
      $ mv a.php b.php
      $ arc liberate
    
    Previously, it didn't update the map.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2818
Commits on Jun 19, 2012
  1. Use pht() for plural

    vrana authored
Commits on Jun 17, 2012
  1. Display number of assertions in unit test details

    vrana authored
    Test Plan: Show Full Unit Results on this diff.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2777
Commits on Jun 14, 2012
  1. Use pht()

    vrana authored
    Test Plan: `arc cover`
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1139
    
    Differential Revision: https://secure.phabricator.com/D2716
  2. @epriestley
  3. @epriestley

    Bump symbol cache version from v2 -> v3

    epriestley authored
    Summary: D2728 added some extensions as builtin functions to the symbol map, but users may have old caches which still list these dependencies. Bump the symbol cache version; @nodren reported that dropping caches fixed the issue for him.
    
    Test Plan: Ran "arc lint", got cache rebuilds.
    
    Reviewers: vrana, nodren
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1347
    
    Differential Revision: https://secure.phabricator.com/D2746
Commits on Jun 13, 2012
  1. Exit with an error code if the workflow returned one.

    Alan Huang authored
    Summary:
    PHP thinks this thing is an integer... and also thinks it's not an
    integer... I'm so confused... Anyway, this seems to persuade it to
    use the correct overload.
    
    Test Plan:
    Ran arc patch with the incant provided in the bug report. It
    successfully returned 1, where it didn't before. I didn't test the
    perflab stuff; hopefully that aborts when it detects nonzero return.
    
    Reviewers: nh
    
    Reviewed By: nh
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D2743
  2. @dschleimer

    [Arcanist] add a local (per working copy) config file

    dschleimer authored
    Summary:
    This adds the concept of a local (i.e. working copy local) config file
    to arc.  This config file has the highest precedence for config
    settings that may come from any config file.  The config is stored in
    .(git|hg|sv)/arc/config, and is read ahead of the project config by
    getConfigFromAnySource().
    
    Test Plan:
    #Testing arc set-config and arc get-config
    
    [16:57:04 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19410 $ ./bin/arc get-config
    (global) default = https://phabricator.fb.com/conduit
    
    [16:57:12 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19410 $ ./bin/arc set-config foo bar
    Set key 'foo' = 'bar' in global config.
    
    [16:57:23 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19411 $ ./bin/arc get-config
    (global) default = https://phabricator.fb.com/conduit
    (global) foo = bar
    
    [16:57:26 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19411 $ ./bin/arc set-config --local foo baz
    Set key 'foo' = 'baz' in local config.
    
    [16:57:35 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19412 $ ./bin/arc get-config
    (global) default = https://phabricator.fb.com/conduit
    (global) foo = bar
    (local) foo = baz
    
    [16:57:39 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19412 $ ./bin/arc set-config foo ''
    Deleted key 'foo' from global config (was 'bar').
    
    [16:57:49 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19413 $ ./bin/arc get-config
    (global) default = https://phabricator.fb.com/conduit
    (global) foo =
    (local) foo = baz
    
    [16:57:51 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19413 $ ./bin/arc set-config --local foo ''
    Deleted key 'foo' from local config (was 'baz').
    
    [16:58:05 Tue Jun 12 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19414 $ ./bin/arc get-config
    (global) default = https://phabricator.fb.com/conduit
    
    #testing getConfigFromAnySource by means of lint
    
    [11:26:57 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19612 $ ./bin/arc set-config lint.engine BogusLintEngine
    Set key 'lint.engine' = 'BogusLintEngine' in global config.
    
    [11:30:04 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19613 $ ./bin/arc set-config --local lint.engine DummyLintEngine
    Set key 'lint.engine' = 'DummyLintEngine' in local config.
    
    [11:30:19 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19587 $ ./bin/arc lint
    Exception
    Failed to load symbol 'DummyLintEngine'. If this symbol was recently added or moved, your library map may be out of date. You can rebuild the map by running 'arc liberate'. For more information, see: http://www.phabricator.com/docs/phabricator/article/libphutil_Libraries_User_Guide.html
    (Run with --trace for a full exception trace.)
    
    [11:30:25 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19586 $ ./bin/arc set-config --local lint.engine ''
    Deleted key 'lint.engine' from local config (was 'DummyLintEngine').
    
    [11:30:34 Wed Jun 13 2012] dschleimer@dev4022.snc6 ~/devtools/arcanist
    arcanist local_config 19587 $ ./bin/arc lint
     OKAY  No lint warnings.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1233
    
    Differential Revision: https://secure.phabricator.com/D2739
  3. Don't blast if cache couldn't be saved

    vrana authored
    Summary:
    It is currently causing us some pain because we use libraries in read-only directories.
    Not saving the cache is still pretty bad because analysis is quite slow.
    But it is better than exploding.
    
    I considered other solutions like not .gitignoring the cache file but it would require committing it with each and every change.
    
    I plan to resolve the note https://secure.phabricator.com/diffusion/ARC/browse/master/src/lint/linter/ArcanistPhutilLibraryLinter.php;d93bb5abd4935bc8$56-59 in longer term.
    
    Test Plan: `arc liberate` without writable cache.
    
    Reviewers: epriestley, nh
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2734
Commits on Jun 12, 2012
  1. @epriestley

    Include common extensions in symbol mapper

    epriestley authored
    Summary:
    Spamming everyone who got bitten by this. We upgraded the libphutil library system recently, but the "use of undeclared function" lint check used to run only on files you touched and now runs on every file in every library you use. This means that if you don't have pcntl or ldap installed, you'll get errors about use of functions from them on every change.
    
    Instead, ship with a list of functions which are provided by extensions that we'll ignore when calculating dependencies, so not having pcntl doesn't mean you have to excuse through irrelevant errrors every time.
    
    Test Plan: Ran script with an unknown function, got it in the map; added it to the extension list, it vanished from the map.
    
    Reviewers: vrana, btrahan, allenjohnashton, ddfisher, keebuhm, phleet, nodren
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1347
    
    Differential Revision: https://secure.phabricator.com/D2728
Something went wrong with that request. Please try again.