[josm-dev] Add nodes and ways via remoteControl

Sebastian Klein bastikln at googlemail.com
Sun Aug 22 11:10:27 BST 2010


Bodo Meissner wrote:
> Dirk Stöcker wrote:
>> If you can automate it, it may work.
> this is impossible. I cannot automatically detect if there are
> incompatible changes in remotecontrol.
> 
>> Otherwise you will find, that updating the version tends to be
>> forgotten more often than it is updated.

We aren't talking about hot code that changes every now and then as you
add new features. It is supposed to be a minimal, *stable*, interface 
that handles the registration of callbacks. The change of the protocol 
is only necessary, when there is a fundamentally new way of defining the
callback.

E.g. if remotecommand preferences need to be extended, you
could simply subclass remotecontrol.PermissionPref.java and no change in
version number would be necessary!

> You are right. If I go this way I can only add a comment that
> updating the API version is important, but I cannot make sure that I
> or future developers will never forget to update it.

In my opinion, this should suffice. If some future developer should 
ignore the notice and forget to update the version number, it will be 
pretty obvious:

  * wmsplugin does not compile
  * every user that has installed wmsplugin and (most recent) 
remotecontrol plugin will get an exception on start.

Fixing it will be relatively easy, so not much harm done.

> The only possible thing would be to automatically update the API
> version on every change. But in this case it does not provide any
> advantage over using the SVN revision.
> 
> I think I will keep it simple: WMSPlugin will not only check for a
> minimum SVN revision of remotecontrol but also for a maximum
> revision. Whenever remotecontrol gets recompiled with a new SVN
> revision, wmsplugin has to be updated. I will replace console
> messages with a normal message window to inform the user about this
> incompatibility.
> 
> What do you think about this solution?

This breaks the link between wmsplugin and remotecontrol much more often 
than it is necessary. In addition, if there are new plugins that hook 
into remotecontrol, it is massive work for anyone who does even minimal 
changes to remotecontrol (e.g. spelling correction):

Each time they have to update every plugin that registers remotecontrol 
and change version numbers in the code!

Overall, I don't think this suggestion would be an improvement.


Sebastian




More information about the josm-dev mailing list