Autobahn icon indicating copy to clipboard operation
Autobahn copied to clipboard

Plugin architecture

Open BenchR267 opened this issue 8 years ago • 1 comments

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:

  • libraries need to be linked when the Autobahn.swift file is evaluated
    • currently only AutobahnDescription is linked, that needs to be extended
    • we could parse the import statements to get every library that is needed and try to link them - but we still need to specify where those libraries are located
  • we need a protocol or base class for plugins, depending on the state and functionality the plugins need to provide
  • we need a place for documentation
    • documentation should be shown when autobahn action foo is executed, so the CLI tool somehow needs access to the plugin + it's documentation

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.)

BenchR267 avatar Sep 11 '17 06:09 BenchR267

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

kdawgwilk avatar Sep 11 '17 06:09 kdawgwilk