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
F14077010: D15342.diff
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)
Thu, Oct 24, 12:51 AM
Unknown Object (File)
Oct 17 2024, 3:40 AM
Unknown Object (File)
Oct 4 2024, 3:09 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.