On Mon, Jul 14, 2014 at 12:22 AM, gnosygnu <[email protected]> wrote:
> * Will Scribunto support Lua 5.2 in the future? According to this comment, > it may: > > https://github.com/wikimedia/mediawiki-extensions-Scribunto/blob/master/Scribunto.php#L140 > It may someday, but there's no hurry to change over. And changing over will involve some rewriting of the sandboxing which will need security auditing. See https://gerrit.wikimedia.org/r/#/c/139479/ for example. > * If so, what is the best approach to ensure forward compatibility of > Module code for 5.2? Note that code that is valid for 5.1 may "break" in > 5.2. (Again, see below for details) > ** Should there be a reference page on MediaWiki or in the enwiki Wikipedia > Namespace that details these breaking issues for other Module writers? > Feel free to create one. > ** Or should 5.1 vs 5.2 issues be corrected on a case-by-case basis for > each Module? > They'd have to be anyway. > ** Or should they be left as is, as any future-proofing may be unnecessary > and / or premature? > Possibly. > * Lastly, is there a general purpose mailing list for Scribunto issues? > I've had a few technical questions in the past that have been painful to > sort out on my own. I'd like to think that there might be other Module > writers who would also be interested in a mailing list as well. > No. There are various talk pages on enwiki and other wikis that are used for this purpose, although I don't remember the specifics offhand and am too lazy to search right now. ;) > * In contrast, Lua 5.2 has code that only cares if a base is not specified. > // http://www.lua.org/source/5.2/lbaselib.c.html > static int luaB_tonumber (lua_State *L) { > if (lua_isnoneornil(L, 2)) { /* standard conversion */ > ** If a base is specified, Lua 5.2 will not do the standard conversion, and > instead try to parse the number > ** This parse code only accepts alpha-numeric characters. The dot is > considered invalid, and any decimal number is converted to NIL > Possibly sensible since it removes a weird special case of base-10 being different from all other bases. > Finally, I've come across a related issue with the varargs operator > ("..."). This operator is valid in 5.1, but not in 5.2. I've seen some > Modules use this varargs operator, that will presumably just break in 5.2. > See https://en.wikipedia.org/wiki/Module:Horizontal_timeline and "function > getNotNilValue(...)" > Note the 'arg' parameter is already deprecated in 5.1, so people should already be avoiding it. See http://www.lua.org/manual/5.1/manual.html#7.1 -- Brad Jorsch (Anomie) Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
