Bug 264852 - devel/arcanist: arc diff --create error
Summary: devel/arcanist: arc diff --create error
Status: Closed FIXED
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-07-04 09:33 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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.
Comment 4 Michael Gmelin freebsd_committer freebsd_triage 2022-07-04 09:32:23 UTC
(In reply to Fernando Apesteguía from comment #3)
Thanks for reporting!
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-07-04 09:33:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5e5a96d2d2d60193ad94cb7007185924ca3b7054

commit 5e5a96d2d2d60193ad94cb7007185924ca3b7054
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2022-06-23 16:41:05 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2022-07-04 09:31:07 +0000

    devel/arcanist-lib: Update to 20220518

    This should reduce problems running on PHP 8.1

    PR:             264852
    Reported by:    fernape@

 devel/arcanist-lib/Makefile  |  4 ++--
 devel/arcanist-lib/distinfo  |  6 +++---
 devel/arcanist-lib/pkg-plist | 12 ++++++++++++
 3 files changed, 17 insertions(+), 5 deletions(-)