Bug 264852 - devel/arcanist: arc diff --create error
Summary: devel/arcanist: arc diff --create error
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Michael Gmelin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-23 16:01 UTC by Fernando Apesteguía
Modified: 2022-06-26 16:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (grembo)


Attachments
update arcanist to 20220518 (7.37 KB, patch)
2022-06-23 16:48 UTC, Michael Gmelin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Apesteguía freebsd_committer 2022-06-23 16:01:20 UTC
While using arc diff --create main from a branch that has a commit for which I want to create a review, I get the following error:

$ arc --trace diff --create main
 ARGV  /usr/local/bin/arc --trace diff --create main
 PCNTL  Unable to install signal handler, pcntl_signal() unavailable. Continuing without signal handling.
>>> [0] (+0) <exec> $ /usr/local/bin/php -f /usr/local/lib/php/arcanist/scripts/arcanist.php -- --trace diff --create main
 ARGV  /usr/local/lib/php/arcanist/scripts/arcanist.php --trace diff --create main
 LOAD  Loaded "arcanist" from "/usr/local/lib/php/arcanist/src".
Config: Reading user configuration file "/home/fernape/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/data/fernape_data/FreeBSD-repos/src/.arcconfig".
Working Copy: Path "/data/fernape_data/FreeBSD-repos/src" is part of `git` working copy "/data/fernape_data/FreeBSD-repos/src".
Working Copy: Project root is at "/data/fernape_data/FreeBSD-repos/src".
Config: Reading local configuration file "/data/fernape_data/FreeBSD-repos/src/.git/arc/config"...
>>> [0] (+0) <http> https://reviews.freebsd.org/api/user.whoami
<<< [0] (+500) <http> 500,895 us
>>> [1] (+507) <exec> $ git --version
<<< [1] (+514) <exec> 7,334 us
>>> [2] (+514) <exec> $ git status --porcelain=2 -z
<<< [2] (+811) <exec> 296,954 us
>>> [3] (+812) <event> diff.didCollectChanges <listeners = 0>
<<< [3] (+812) <event> 72 us
>>> [4] (+812) <exec> $ git rev-parse --git-dir
<<< [4] (+820) <exec> 7,148 us
>>> [5] (+820) <exec> $ git rev-parse HEAD
<<< [5] (+827) <exec> 6,927 us
>>> [6] (+827) <exec> $ git merge-base -- main ae9b852aaa34a840820cc920a13000b7969034ab
<<< [6] (+835) <exec> 7,710 us
>>> [7] (+835) <exec> $ git log ae9b852aaa34a840820cc920a13000b7969034ab --not 1f1e2261e341e6ca6862f82261066ef1705f0a7a --format='%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02' --
<<< [7] (+843) <exec> 7,961 us
>>> [8] (+844) <http> https://reviews.freebsd.org/api/differential.parsecommitmessage
<<< [8] (+1,014) <http> 169,460 us

[2022-06-23 15:58:06] EXCEPTION: (RuntimeException) trim(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist()
  #0 PhutilErrorHandler::handleError(integer, string, string, integer)
  #1 trim(NULL) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1949]
  #2 ArcanistDiffWorkflow::parseCommitMessagesIntoFields(array) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1779]
  #3 ArcanistDiffWorkflow::getDefaultCreateFields() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1402]
  #4 ArcanistDiffWorkflow::getCommitMessageFromUser() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1336]
  #5 ArcanistDiffWorkflow::buildCommitMessage() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:353]
  #6 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:419]
<<< [0] (+1,088) <exec> 1,088,562 us


$ pkg info -x 'arcanist.*'
arcanist-lib-php81-20211210
arcanist-php81-20211210
Comment 1 Michael Gmelin freebsd_committer 2022-06-23 16:48:57 UTC
Created attachment 234896 [details]
update arcanist to 20220518

Can you please try the attached patch?
(hardly tested, only checked if it builds/installs cleanly and runs in general)
Comment 2 Fernando Apesteguía freebsd_committer 2022-06-24 05:35:49 UTC
(In reply to Michael Gmelin from comment #1)
Hi Michael,

Thanks for the patch. It seems to work fine. I was able to create the review.
Comment 3 Fernando Apesteguía freebsd_committer 2022-06-26 16:26:20 UTC
(In reply to Fernando Apesteguía from comment #2)
Just for the record I could also update the review. arc is working fine for me so far.