[vlc-devel] Lua extension and vlc.misc

Jean-Baptiste Kempf jb at videolan.org
Tue Feb 28 20:34:58 CET 2012


On Tue, Feb 28, 2012 at 09:07:40PM +0200, Rémi Denis-Courmont wrote :
> Le mardi 28 février 2012 20:13:09 Jean-Baptiste Kempf, vous avez écrit :
> > Hello,
> > 
> > Since 52d4b4bb1c, vlc.misc.* are not available outside of lua
> > interfaces, notably for extensions and sds.
> > It seems indeed that vlc.misc was over-exposing things, like should_die
> > or quit.
> > 
> > However, some things were useful, like version() or copyright() or
> > cachedir().
> > 
> > Therefore, I suggest to allow back some of those things for other lua
> > modules, and keep the other ones only for intf. I will do the work of
> > splitting, but I would need feedback.
> > 
> > Here is the list of things:
> > 
> > Those seems safe to explose:
> > "version"
> 
> Bad idea.

Disagree. How do you detect API breakage?

> > "copyright"
> > "license"
> 
> Both useless.

But not dangerous.

> > "datadir"
> > "userdatadir"
> > "homedir"
> > "configdir"
> > "cachedir"
> > "datadir_list"
> 
> All mostly useless and bad ideas, c.f. other post.

Disagree. How do you store temp files? How do you do SDs like windirs if
you do not have access to home?

> > "action_id"
> Same as for the MacOS UI: this should not be exposed.
> 
> > Those, I do not know:
> > "mdate"
> 
> Useless in an extension. The only reported use was to reimplement msleep() 
> with mdate() and mwait(), which was stupid.

The question is not about usage but dangerousity.

> > "mwait"
> 
> Mostly harmless but mostly only used for shitty polling code
> -> bad idea.

Is there any current working way of doing it differently?

> My opinion is that none of these should be exposed outside interfaces.

But, they were exposed. And noone blocked that, before the releases.

Removing them because they seem useless is not enough.
Blocking dangerous ones, sure.
Warning for bad ideas ones, if we provide a better way, and then
deprecating them, sure.


-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list