Page MenuHomeFreeBSD

devel/arcanist-lib: Unbreak "arc list" with php82
AbandonedPublic

Authored by markj on Jan 27 2023, 3:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 11:00 AM
Unknown Object (File)
Tue, Apr 9, 11:25 PM
Unknown Object (File)
Mon, Apr 8, 12:53 AM
Unknown Object (File)
Apr 3 2024, 2:11 AM
Unknown Object (File)
Feb 13 2024, 10:02 PM
Unknown Object (File)
Dec 20 2023, 8:26 AM
Unknown Object (File)
Nov 18 2023, 7:50 PM
Unknown Object (File)
Nov 18 2023, 1:48 PM
Subscribers

Details

Reviewers
grembo
karels
jrm
Summary

In some cases it's possible for arcanist to attempt to call strncmp()
with a null parameter. It seems that this is not allowed in php82, and
causes "arc list" to exit with an exception if the user happens to have
any open differential revisions with a null sourcePath attribute.

Add a patch to work around the problem: if there's no sourcePath, just
treat the source as being different from the current repository.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 49260
Build 46150: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jan 27 2023, 3:30 PM

Looks plausible to me, but I don't know php at all.

Looks good to me. Builds and applies fine with php81, which is currently the default PHP version in ports.

fwiw, there are separate archanist-php8[012]-* ports, and I arbitrarily chose 82.

fwiw, there are separate archanist-php8[012]-* ports, and I arbitrarily chose 82.

There is just one port (two if you count devel/arcanist and devel/arcanist-lib). Flavors is what gives support for different php versions.

% make -C/usr/ports/devel/arcanist-lib -VFLAVORS
php81 php80 php82

Sorry, I should have said "packages"; I didn't realize that they weren't always 1:1 with ports.

@markj @jrm I just committed be146a923dbda66f50c6b04b406da790837f6287 (cgit link) which addresses the issue in a more generic fashion (since we had these kinds of errors pop up over and over again). Even though I tested this locally and it seems to work as expected, it would be great if you could verify this at your end as well.

@markj @jrm I just committed be146a923dbda66f50c6b04b406da790837f6287 (cgit link) which addresses the issue in a more generic fashion (since we had these kinds of errors pop up over and over again). Even though I tested this locally and it seems to work as expected, it would be great if you could verify this at your end as well.

Thanks! This fixes the problem that I was able to reproduce.

@markj @jrm I just committed be146a923dbda66f50c6b04b406da790837f6287 (cgit link) which addresses the issue in a more generic fashion (since we had these kinds of errors pop up over and over again). Even though I tested this locally and it seems to work as expected, it would be great if you could verify this at your end as well.

Also fixes the problem I was seeing before 3b715073072794942506d27d72b2b23551c4fd30. Thank you.