Page MenuHomePhabricator

D10198.diff
No OneTemporary

D10198.diff

diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php
--- a/src/workflow/ArcanistDiffWorkflow.php
+++ b/src/workflow/ArcanistDiffWorkflow.php
@@ -364,12 +364,6 @@
'no-diff' => array(
'help' => 'Only run lint and unit tests. Intended for internal use.',
),
- 'background' => array(
- 'param' => 'bool',
- 'help' =>
- 'Run lint and unit tests on background. '.
- '"0" to disable, "1" to enable (default).',
- ),
'cache' => array(
'param' => 'bool',
'help' => '0 to disable lint cache, 1 to enable (default).',
@@ -415,10 +409,6 @@
)
);
- if (phutil_is_windows()) {
- unset($arguments['background']);
- }
-
return $arguments;
}
@@ -440,43 +430,6 @@
$this->runDiffSetupBasics();
- $background = $this->getArgument('background', true);
- if ($this->isRawDiffSource() || phutil_is_windows()) {
- $background = false;
- }
-
- if ($background) {
- $argv = $this->getPassedArguments();
- if (!PhutilConsoleFormatter::getDisableANSI()) {
- array_unshift($argv, '--ansi');
- }
-
- $repo = $this->getRepositoryAPI();
- $head_commit = $this->getArgument('head');
- if ($head_commit !== null) {
- $repo->setHeadCommit($head_commit);
- }
-
- if ($repo->supportsCommitRanges()) {
- $repo->getBaseCommit();
- }
-
- $script = phutil_get_library_root('arcanist').'/../scripts/arcanist.php';
- if ($argv) {
- $lint_unit = new ExecFuture(
- 'php %s --recon diff --no-diff %Ls',
- $script,
- $argv);
- } else {
- $lint_unit = new ExecFuture(
- 'php %s --recon diff --no-diff',
- $script);
- }
-
- $lint_unit->write('', true);
- $lint_unit->start();
- }
-
$commit_message = $this->buildCommitMessage();
$this->dispatchEvent(
@@ -489,24 +442,10 @@
$revision = $this->buildRevisionFromCommitMessage($commit_message);
}
- if ($background) {
- $server = new PhutilConsoleServer();
- $server->addExecFutureClient($lint_unit);
- $server->setHandler(array($this, 'handleServerMessage'));
- $server->run();
+ $server = $this->console->getServer();
+ $server->setHandler(array($this, 'handleServerMessage'));
+ $data = $this->runLintUnit();
- list($err) = $lint_unit->resolve();
- $data = $this->readScratchJSONFile('diff-result.json');
- if ($err || !$data) {
- throw new Exception(
- 'Unable to read results from background linting and unit testing. '.
- 'You can try running arc diff again with --background 0');
- }
- } else {
- $server = $this->console->getServer();
- $server->setHandler(array($this, 'handleServerMessage'));
- $data = $this->runLintUnit();
- }
$lint_result = $data['lintResult'];
$this->unresolvedLint = $data['unresolvedLint'];
$this->postponedLinters = $data['postponedLinters'];

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 6:45 AM (1 h, 11 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383343
Default Alt Text
D10198.diff (2 KB)

Event Timeline