Page MenuHomePhabricator

Make all bin/* scripts locate their workflows dynamically
ClosedPublic

Authored by epriestley on Dec 26 2013, 9:50 PM.
Tags
None
Referenced Files
F15461715: D7840.id17752.diff
Tue, Apr 1, 10:35 AM
F15458623: D7840.id.diff
Mon, Mar 31, 5:28 AM
F15456829: D7840.diff
Sun, Mar 30, 12:26 PM
F15455715: D7840.id17752.diff
Sun, Mar 30, 4:24 AM
F15424058: D7840.id17733.diff
Sat, Mar 22, 8:01 PM
F15412890: D7840.id17733.diff
Wed, Mar 19, 3:36 PM
F15408632: D7840.diff
Wed, Mar 19, 12:21 AM
F15395983: D7840.id17752.diff
Sun, Mar 16, 11:02 AM
Subscribers

Details

Summary

Ref T2015. Not directly related to Drydock, but I bumped into this. All these scripts currently enumerate their workflows explicitly.

Instead, use PhutilSymbolLoader to automatically discover workflows. This reduces code duplication and errors (see all the bad extends this diff fixes) and lets third parties add new workflows (not clearly valuable?).

Test Plan

Ran bin/x help for each modified script.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I can't imagine 3rd party scripts being made too often; basically everything they could need is already there, and if it isn't they are more likely to just ask than build something...

Yeah, I don't have any real use cases in mind for that. I could maybe imagine something like a third-party file storage engine adding some commands to bin/files or something, but that's quite a stretch.