Page MenuHomePhabricator

Mostly remove "STDERR" and "STDOUT" constants from Arcanist
ClosedPublic

Authored by epriestley on Apr 28 2022, 10:25 PM.
Tags
None
Referenced Files
F18791742: D21794.id51954.diff
Thu, Oct 16, 5:40 PM
F18744560: D21794.id51955.diff
Fri, Oct 3, 3:24 AM
F18742197: D21794.diff
Thu, Oct 2, 5:58 PM
F18703483: D21794.id51950.diff
Sun, Sep 28, 4:10 AM
F18646409: D21794.id.diff
Fri, Sep 19, 9:54 AM
F18627634: D21794.id51955.diff
Sep 16 2025, 4:26 AM
F18597125: D21794.id51955.diff
Sep 13 2025, 2:11 AM
F18589909: D21794.diff
Sep 12 2025, 4:37 AM
Subscribers

Details

Summary

Ref T13675. Ref T13556. The "STDOUT" and "STDERR" constants are defined by the PHP CLI SAPI, in cli_register_file_handles().

The "native arc" embedded PHP wrapper doesn't define these, and there's no real reason to define them, since they're just defined in terms of the PHP stream wrappers ("php://stdin", etc) anyway.

This patch isn't exhaustive (and a subsequent change should add lint, rejecting these magic constants) but is just trying to make native arc functional.

Test Plan

Created this revision with a standalone native arc binary.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley created this revision.
cspeckmim added inline comments.
src/utils/PhutilSystem.php
31

This and the next function look swapped. This is getStderr but is initializing and returning stdout, and vice-versa below

src/utils/PhutilSystem.php
31

Ah, quite. Thanks!

  • Fix stderr vs stdout mixup.
This revision was not accepted when it landed; it landed in state Needs Review.May 3 2022, 6:58 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.