[darcs-devel] [issue1504] darcs plugin mechanism?

Eric Kow bugs at darcs.net
Wed Jul 22 12:53:50 UTC 2009


New submission from Eric Kow <kowey at darcs.net>:

I don't know how useful this would be, but maybe it would be good to provide
some mechanism by which people can create darcs commands as plugins.

One way this could look to be able to run "darcs foo" where (if darcs were so
configured), darcs would just hand control off to that plugin

Rough ideas:
- the plugin is a standalone program.  It can be written in any language; it
could even be a shell script for all we care.  For convenience, Haskell hackers
might use the Darcs library to write their plugins, but it's not necessary.

- there would be some very simple easy-to-understand mechanism for darcs to tell
things to the plugins (and back?), say passing JSON objects around.  Things we
could tell the plugin might be: the current repository root, the current path
relative to the repository.

- we would provide a way for the user to write configuration files telling darcs
what plugins to use

- plugins only have to respect a small number of conventions (eg. support a
--help command, tell darcs what your name is).  We leave all command line
parsing up to the plugin.

- Darcs could refuse to run a plugin (sorry, there already is a plugin named "foo")

One thing which we may want to be careful about though is that users be somewhat
aware when they are running a plugin and not darcs proper.  For example, we
could force this by making it something the user would have to install via a
configuration file.

----------
messages: 7984
nosy: dmitry.kurochkin, kowey, simon, thorkilnaur
priority: feature
status: unread
title: darcs plugin mechanism?

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1504>
__________________________________


More information about the darcs-devel mailing list