1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-08 07:52:39 +01:00
Commit graph

6 commits

Author SHA1 Message Date
epriestley
e95afd1d00 Apply "pcre.*_limit" config options at startup in CLI environments
Summary:
Ref T13100. Ref T13586. These options have been in production for a while and seem to consistently improve behavior, downgrading segfaults to runtime errors.

Make them global options for all CLI environments. See next change for web enviornments.

Test Plan: Ran `arc`.

Maniphest Tasks: T13586, T13100

Differential Revision: https://secure.phabricator.com/D21566
2021-02-19 11:16:09 -08:00
Jessica Clarke
930f7e117d Suppress PHP 8 deprecation warning in __arcanist_init_script__
Summary:
As of PHP 8, the XML entity loader is disabled by default and the
libxml_disable_entity_loader function is deprecated. Thus suppress the
deprecation warning for now; we could skip the function call, but this
is safer.

Test Plan: Used to create this revision with PHP 8 on macOS

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D21497
2021-01-10 22:21:29 +00:00
epriestley
524aa2aed2 Fix "PhutilOpaqueEnvelopeTestCase" under PHP 7.4 with "zend.exception_ignore_args"
Summary:
See PHI1894. PHP 7.4 introduced a new runtime configuration option, "zend.exception_ignore_args", which removes the "args" from exception backtraces.

The "PhutilOpaqueEnvelopeTestCase" relies on this behavior (since it explicitly inspects stack frames). Although the test isn't critical and could be restructured, it seems like there is little value to ever enabling this option in the context of Phabricator.

Disable it at startup so environments are more consistent across different PHP versions and configurations.

Test Plan:
  - Enabled "zend.exception_ignore_args" under PHP 7.4.
  - Ran "PhutilOpaqueEnvelopeTestCase".
  - Before: failure, expected signpost value not present in stack trace (because no "args" are present on the exception).
  - After: test passes.

Differential Revision: https://secure.phabricator.com/D21473
2020-09-30 07:49:25 -07:00
epriestley
5451d28752 When "ArcanistRuntime" exits with a nonzero exit code, emit that exit code
Summary:
See <https://discourse.phabricator-community.org/t/failed-arc-patch-does-not-return-non-zero-exit-code/3584>.

Returning an integer from a top-level PHP file doesn't actually affect the process exit code, as much as I might wish it does.

Test Plan: Ran `arc patch adflsnadfsln; echo $?`, saw a nonzero exit code after this fix.

Differential Revision: https://secure.phabricator.com/D21037
2020-02-27 06:17:02 -08:00
epriestley
c471983697 Collapse Arcanist toolsets from "wilds" into "master", as an overlay layer
Summary:
Depends on D20988. Ref T13395. Ref T13098. Ref T13203.

This brings all the "toolsets" code into "master". We try to run commands as toolsets commands first, then fall back to older code.

Since the "toolsets" class tree is mostly parallel to the older class tree, this isn't completely broken. Currently, all commands fall back.

Test Plan: Created this diff, ran various other commands. But this is probably a long shot from finished.

Maniphest Tasks: T13395, T13203, T13098

Differential Revision: https://secure.phabricator.com/D20990
2020-02-13 14:10:46 -08:00
epriestley
acf0607683 Merge utility/support changes from "wilds" to "master"
Summary:
Ref T13395. Merge a lot of stuff which doesn't break existing workflows:

    - Merge a UTF8 fix for "cmd.exe" on Windows.
    - Merge minor changes to JSON linters.
    - Merge some shell completion stuff.
    - Merge some "arc anoid" fixes.
    - Merge various Windows improvements to unit tests which interact with processes / the filesystem.
    - Merge some other Windows path fixes.
    - Merge a UTF8 character class fix.
    - Merge script initialization.
    - Merge unit test support scripts.
    - Merge some initialization code.
    - Merge Windows stdout/stderr-as-files code.
    - Merge a bunch of code for making exec tests work on Windows.
    - Merge more Windows unit test fixes.
    - Merge "continue on failure" mode when loading symbols.
    - Merge "GPC" order CLI fixes.

Test Plan: Ran `arc unit --everything`; created this change. There's likely some less-than-perfect code here.

Maniphest Tasks: T13395

Differential Revision: https://secure.phabricator.com/D20988
2020-02-13 14:10:09 -08:00