flatland/lazybot — Issue #32: Redesign configuration
Author: Raynes
Created: 2011-10-21 05:56:08+00:00
State: open

Right now, our configuration is a mess. Plugins just do whatever the hell they want with the configuration file and nothing is standard. Besides that, half of our keys don't make any sense.

I propose the following configuration conventions/guidelines:

* A plugin should never have configuration keys in the top level of the configuration file. Instead, they should have their configuration in a key named after the plugin. For example: `{:clojure {:prepends ..}}`. This should be true regardless of whether or not a plugin only has a single configuration key. It needs to be standardized. There is no way to enforce it, but we can certainly encourage it.
* Plugins should document their configuration keys. I will create a plugin description file and being documenting the existing plugins.
* Plugins should never die if configuration is not set. It is okay to fail if it is set incorrecly, but only if it would be inconvenient to die gracefully. It should never die because a key simply isn't set.
* A huge problem with our configuration is that you have a top-level `:plugins` key and one for every server. This is ugly and inconvenient. It makes more sense for each server to have a `:plugins` key, but not a top level key. lazybot should be intelligent enough to know what to do here, and there should be a way for 'all' plugins to be loaded without copying them each and every time or wrapping the configuration in a let.