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
F13045022: D15342.diff
Wed, Apr 17, 7:56 PM
Unknown Object (File)
Sat, Apr 6, 8:28 PM
Unknown Object (File)
Tue, Mar 19, 5:48 PM
Unknown Object (File)
Mar 15 2024, 2:17 PM
Unknown Object (File)
Mar 5 2024, 7:20 PM
Unknown Object (File)
Mar 4 2024, 6:10 PM
Unknown Object (File)
Mar 4 2024, 6:10 PM
Unknown Object (File)
Mar 4 2024, 6:10 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
Branch
aliases
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 12509
Build 15861: Run Core Tests
Build 15860: 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.