agent
agent copied to clipboard
Split bootstrap
the bootstrap.go file is currently about 4k lines long, and is basically impossible to navigate with anything other than ctrl-f and judicious use of go to definition.
This PR splits the bootstrap file up into 6(!) files - one for the main bootstrap process, still called bootstrap.go, and one each for:
- Checkout-related stuff (
checkout.go) - Artifacts (
artifacts.go) - Plugin handling (
plugin.go) - Command running (
command.go) - Hook handling (
hook.go)
It also does a minor clean up in the *Bootstrap.Run() function
Another approach to this might be to actually split out the phases as different structs in different files. 🤔
@lox yeah, i agree, but that's a lot more difficult than just splitting up a file and calling it a day 😅
i'd love to have more functional separation between bootstrap phases as well as having them just live in different files, but i think it achieves a different thing that this PR does, which is just make the bootstrap process more navigable from a "having files open in your editor" standpoint