Page MenuHomePhabricator

Read arc aliases from all available configuration files
ClosedPublic

Authored by epriestley on Feb 24 2016, 9:17 AM.
Tags
  • Restricted Project
Referenced Files
Unknown Object (File)
Fri, Nov 22, 11:51 PM
Unknown Object (File)
Fri, Nov 22, 6:12 PM
Unknown Object (File)
Thu, Nov 21, 8:56 PM
Unknown Object (File)
Mon, Nov 18, 3:18 AM
Unknown Object (File)
Wed, Nov 13, 4:38 PM
Unknown Object (File)
Sun, Nov 10, 5:20 AM
Unknown Object (File)
Wed, Nov 6, 6:50 AM
Unknown Object (File)
Oct 24 2024, 12:51 AM
Subscribers

Details

Summary

Fixes T10431. Updates the getAliases() method to read every arc configuration file.

Test Plan

Added an arc duck alias to /etc/arcconfig, ran arc duck, saw "quack".

Added an arc pig alias to ~/.arcrc via arc alias, ran arc pig, saw "oink oink".

Diff Detail

Repository
rARC Arcanist
Branch
T10431_aliases
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 10838
Build 15857: Run Core Tests
Build 13358: arc lint + arc unit

Event Timeline

nevogd retitled this revision from to Read arc aliases from system configuration file.
nevogd updated this object.
nevogd edited the test plan for this revision. (Show Details)
eadler added a project: Restricted Project.
eadler added a subscriber: eadler.
epriestley added a reviewer: nevogd.
  • Allow aliases to be defined in any recognized configuration file.
epriestley retitled this revision from Read arc aliases from system configuration file to Read arc aliases from all available configuration files.Jun 6 2016, 7:36 PM
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

Historically, the initial version of "aliases" was intended to be user specific, so it wasn't a "config" key.

D2191 changed this so that .arcconfig could also define them, but they remained defined in a nonstandard way in .arcrc.

Later changes added more configuration sources and D7271 consolidated configuration management, but since this one was weird it never got expanded to work with other sources.

This makes "aliases" definable in any source using standard precedence rules (runtime, local, project, user, system) by working around the weirdness of the "aliases" key in the ConfigurationManager itself. This isn't especially pretty but makes the behavior correct.

chad edited edge metadata.
This revision is now accepted and ready to land.Jun 6 2016, 7:46 PM
This revision was automatically updated to reflect the committed changes.