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
Unknown Object (File)
Tue, Jan 21, 9:00 AM
Unknown Object (File)
Fri, Jan 17, 5:10 PM
Unknown Object (File)
Thu, Jan 16, 11:46 PM
Unknown Object (File)
Thu, Jan 2, 1:02 AM
Unknown Object (File)
Mon, Dec 30, 5:48 PM
Unknown Object (File)
Dec 28 2024, 4:05 PM
Unknown Object (File)
Dec 22 2024, 6:49 PM
Unknown Object (File)
Dec 22 2024, 6:49 PM
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.