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
F13048543: D7840.diff
Thu, Apr 18, 8:53 PM
Unknown Object (File)
Mon, Apr 15, 5:32 PM
Unknown Object (File)
Sat, Apr 6, 3:03 AM
Unknown Object (File)
Sat, Apr 6, 1:34 AM
Unknown Object (File)
Fri, Apr 5, 11:38 PM
Unknown Object (File)
Mon, Apr 1, 2:44 AM
Unknown Object (File)
Mon, Apr 1, 2:44 AM
Unknown Object (File)
Mon, Apr 1, 12:19 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.