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)
Wed, Jun 11, 9:17 AM
Unknown Object (File)
Apr 29 2025, 2:54 AM
Unknown Object (File)
Apr 24 2025, 11:41 AM
Unknown Object (File)
Apr 1 2025, 10:35 AM
Unknown Object (File)
Mar 31 2025, 5:28 AM
Unknown Object (File)
Mar 30 2025, 12:26 PM
Unknown Object (File)
Mar 30 2025, 4:24 AM
Unknown Object (File)
Mar 22 2025, 8:01 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

Branch
ddock5
Lint
Lint Passed
Unit
No Test Coverage

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.