[LV2] Add/remove/change ports from practical view ?

David Robillard d at drobilla.net
Fri Jun 5 13:37:47 PDT 2020


On Wed, 2020-06-03 at 14:24 +0200, Sven Jaehnichen wrote:
> Am 30.05.20 um 14:49 schrieb David Robillard:
> 
> > I'm open to this relaxation if nobody else has a problem with
> > it.  From
> > an ultra strict perspective it's breaking the spec in that hosts
> > would
> > be required to deal with a new situation, but it doesn't seem like
> > one
> > that should cause much trouble, and in practice probably already
> > doesn't as you noted.
> 
> Thank you to mention this. This already caused some headache to me. 
> Maybe the addition of a short notice ("Host developers are asked
> ...") 
> may point into the desired direction without breaking the specs?

Well, thanks for asking and trying to actually follow the rules in
general.  Sometimes people don't on purpose, and cause a bunch of
problems for everyone...

Unfortunately I don't think there is a way to not conceptually "break"
the specs here: a previously disallowed thing is allowed.  I think this
one is probably fine, but the reason this was worded that way is so
that upgrading a plugin can't break a session.  The wording will be
hairy, but I think not allowing new ports that are "very different"
(mainly in type) from ones that previously existed will also prevent
this problem in practice.

So assuming nobody objects, I'll tinker with it for the next release,
which can hopefully happen relatively quickly since I was planning on a
simple wording-refinement and documentation cleanup point release
anyway.

> > Why would an "unused" port ever have
> > existed at all?  This seems like a pretty esoteric case to me.
> 
> Control ports. Reserved in a early version of a plugin. But not used
> in 
> the plugin binary. I agree, this wasn't a good strategy. The
> question 
> is: keep the ports until there will be (maybe) a use for it?

Unfortunately, I really don't think it would be appropriate for the
spec to allow this.  It's the same as semver, really.  You can't just
remove functions from libraries, that breaks things.

That said... well, "unofficially" or whatever, if they were never used
anyway, and you remove them and test that this works with a bunch of
hosts... it's probably fine.  The rules are really to avoid breaking
user's work, or hosts that implement things based on specific special
ports (the ones with designations or special port properties).  Unused
and "undesignated" ports are neither, so if hosts don't outright
explode (e.g. I don't know what Ardour does if there was an automation
lane for a port that no longer exists) it's maybe fine.

The safe conservative thing is to leave them though, yes.
 Compatibility isn't always pretty.  You can maybe use 
https://lv2plug.in/ns/ext/port-props#notOnGUI so users don't have to be
bothered with them though.

Spec-wise, we'd need to design something so that a plugin with a
different URI (i.e. major version) can effectively "replace" an "older"
version.  This is totally doable and would be nice, but it'd be some
work to actually make it happen.

-- 
dr




More information about the Devel mailing list