Page MenuHomePhabricator

Treat non-string arguments as normal arguments in PhutilArgumentParser
ClosedPublic

Authored by hach-que on Jan 2 2015, 1:31 AM.
Tags
None
Referenced Files
F14111480: D11138.diff
Wed, Nov 27, 9:35 PM
Unknown Object (File)
Wed, Nov 20, 10:22 AM
Unknown Object (File)
Tue, Oct 29, 2:12 PM
Unknown Object (File)
Oct 23 2024, 10:12 PM
Unknown Object (File)
Oct 22 2024, 3:35 AM
Unknown Object (File)
Sep 16 2024, 7:58 AM
Unknown Object (File)
Aug 19 2024, 5:43 AM
Unknown Object (File)
Aug 17 2024, 2:33 PM
Subscribers

Details

Summary

This treats non-string arguments as "normal" arguments in PhutilArgumentParser (basically it prevents it from trying to detect - or -- prefixes).

In Omni, I use the PhutilArgumentParser to parse arguments, but Omni supports passing structured data (arrays, objects and other things with types) as arguments to builtins and Omni scripts.

Test Plan

Didn't see errors due to strncmp, etc. when passing arrays to builtins.

Diff Detail

Repository
rPHU libphutil
Branch
arg-parser-object
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 3474
Build 3481: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

hach-que retitled this revision from to Treat non-string arguments as normal arguments in PhutilArgumentParser.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
epriestley edited edge metadata.

This is a little off-label but seems reasonable enough.

This revision is now accepted and ready to land.Jan 2 2015, 6:35 PM
This revision was automatically updated to reflect the committed changes.