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)
Tue, Mar 19, 5:48 PM
Unknown Object (File)
Fri, Mar 15, 2:17 PM
Unknown Object (File)
Tue, Mar 5, 7:20 PM
Unknown Object (File)
Mon, Mar 4, 6:10 PM
Unknown Object (File)
Mon, Mar 4, 6:10 PM
Unknown Object (File)
Mon, Mar 4, 6:10 PM
Unknown Object (File)
Mon, Mar 4, 6:10 PM
Unknown Object (File)
Feb 22 2024, 3:15 PM
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.