AutobahnSwift / Autobahn

CLI tool written in Swift heavily inspired by https://github.com/fastlane/fastlane
MIT License
129 stars 6 forks source link

Plugin architecture #5

Open BenchR267 opened 6 years ago

BenchR267 commented 6 years ago

One of the most useful features imo of fastlane is the plugin architecture. Everyone can just write his own plugin which is then loaded into fastlane and can be used. We should think about this architecture as soon as possible since it's necessary for every feature development. Shuttle e.g. is 'just' an plugin for Autobahn which should be loaded explicitly when needed. In contrast to fastlane, Autobahn is compiled instead of interpreted and plugins would be libraries instead of globally installed programs.

Some of the first thoughts that came to my mind:

Maybe it makes sense to create an .autobahn directory in the root of the project. We could store plugin frameworks there to be able to link them. We could also search in that directory for available plugins that are shown when autobahn actions is executed. It would then also makes sense to have a light package manager built in or use SPM somehow. (Maybe create a dummy package that has all necessary plugins + versions as dependencies.)

kdawgwilk commented 6 years ago

I agree and still need to solve the linking problem for the AutobahnDescription library, I believe most of that work will be done during the homebrew install process and will install to the /usr/local/lib directory and that way we can just point the linker to that dir when linking the Autobahn.swift file however maybe it would be better to create a ~/.autobahn folder similar to how fastlane does and store libs/plugins there? I would like to see a autobahn add_plugin <plugin_name> that would then create some manifest of what libs need to be linked when running the Autobahn.swift file