Extension:Scribunto/Deployment priorities

From MediaWiki.org
Jump to navigation Jump to search

This list is completely unofficial, but it reflects my current thoughts about what the priorities are prior to widespread deployment of Scribunto/Lua to Wikimedia wikis.

Must have[edit]

  • Support for Lua in mwlib (Collection extension)
  • (bugzilla:39610) Scribunto should support global module invocations

Should have[edit]

  • (bugzilla:39605) Auto-categorize Scribunto module pages that contain errors
  • (bugzilla:39606) Auto-categorize pages containing script errors from Scribunto module invocations
    • → ok
  • (bugzilla:39646) Scribunto needs sane Unicode string support
    • Can use a pure-Lua UTF-8 decoder, like the one in require('luabit/utf8.lua')
    • mw.ustring allows to treat UTF-8 strings
  • os.date() with support for at least "!*t" and "*t" formats; and os.time()
    • 280 thousand pages on the English Wikipedia use its w:en:Template:Birth date and age template, and they all expect to be able to obtain the current date in a broken down form so that they can do calendar arithmetic.
    • Other templates also use the current date and time. See w:en:Template:Indian population clock for example.
    • A Lua program should be able to obtain everything that non-Scribunto templates can obtain through {{CURRENTYEAR}}, {{CURRENTMONTH}}, {{CURRENTMONTHNAME}}, {{CURRENTMONTHNAMEGEN}}, {{CURRENTMONTHABBREV}}, {{CURRENTDAY}}, {{CURRENTDAY2}}, {{CURRENTDOW}}, {{CURRENTDAYNAME}}, {{CURRENTTIME}}, {{CURRENTHOUR}}, and {{CURRENTWEEK}}[1].
    • → "*t" and "!*t" works. Moreover mw.language allows to get localized object to have local time (and not server local time)
  • mw.page.title.name[1]
    • Lots of English Wikipedia templates have default title to name of current page semantics.
    • Some templates have special behavior depending on the fact that name=title or not.
    • mw.title included. mw.title.getCurrentTitle() is a table with lot of data related to current page (including title)
  • mw.page.title.namespaceName and mw.page.title.namespace[1]
    • Lots of English Wikipedia maintenance templates effectively do the {{#switch:{{NAMESPACENUMBER}}}} trick.
    • Non maintenance templates use this to prevent including article categories in other namespaces (i.e. docs or talk pages).
    • mw.title included. Same than page title.
  • mw.text.escape(), mw.url.encode(), mw.url.encodeAnchor()
    • Of course, these can be done in Lua. But these encoders are used frequently. The English Wikipedia's citation templates need to URL encode COinS data, for example. A C implementation would be faster than a Lua one.
    • mw.uri library does this stuff.
  • mw.text.tag()
    • Same as the encoders above. This is used a lot.
    • → same
  • mw.url.local() and mw.url.full()
    • Navigation boxes on the English Wikipedia need these for their "v·d·e" links.
    • → same
  • mw.page.talk and mw.page.subject
    • mw.title + mw.uri should do the work.
  • An {{#ifexist:}} equivalent.
  • the string library is broken on strings that come from template parameters if they include some tags (i.e. <nowiki> and <pre>). string functions act as if they can only see the special encoding of the first tag (example: passing "<pre>my string</pre>" to a template is see by the module as a 39 bytes length string (whatever the string content), which is the length of the encoded "<pre>" tag. This also prevent string functions to search or modify the "real" string content. See bug report
  1. 1.0 1.1 1.2 Of course this can be simulated using frame:preprocess("{{THE-PSEUDO-TEMPLATE}}"). But 1. this is maybe not the most efficient way to perform this and 2. a metatable to perform/store this − like for the args table − should be cleaner and would allow future improvements without impacting users code.

Can have[edit]

  • (bugzilla:39609) Limit scope of title-based syntax highlighting
    • → done. Subpage /doc is treated as a documentation page, automaticaly included at the begining of module page. It also allows to add categories.

Won't have[edit]

  • Speed problems!

Deployment following[edit]

These dates can be later than the true ones, because they are followed by final users.

date wmflabs test2 Mediawiki wikisource wikipedia
voir   ➤ wmflabs test2 Mediawiki Scribunto fr:wikisource en:wikipedia
2013-05-13 unavailable version ? MediaWiki 1.22/wmf4 version ? 2013-05-15
2013-05-01 unavailable 3622f82b MediaWiki 1.22/wmf3 3622f82b 3622f82b" ➤ 2013-05-07
2013-04-16 unavailable 581b2306 MediaWiki 1.22/wmf2 581b2306 ➤ 2013-04-18 ➤ 2013-04-22
2013-04-02 unavailable 4374903e MediaWiki 1.22/wmf1 4374903e ➤ 2013-04-04 ➤ 2013-04-08
2013-03-22 53c46561 fixed MediaWiki 1.21/wmf12 53c46561 53c46561 ➤ 2013-03-27
2013-03-21 revert to MW 1.21/wmf11
2013-03-18 53c46561 MediaWiki 1.21/wmf12 53c46561
2013-03-04 7d7b068 MediaWiki 1.21/wmf11 7d7b068 ➤ 2013-03-06 ➤ 2013-03-13
2013-02-20 8ba7c46 MediaWiki 1.21/wmf10 8ba7c46 8ba7c46 8ba7c46
2013-02-18 96615c9 MediaWiki 1.21/wmf10 96615c9
2013-02-04 4c69b13 MediaWiki 1.21/wmf9 4c69b13
2013-01-17 af0f192 MediaWiki 1.21/wmf8 af0f192
2013-01-03 9a5dc93 MediaWiki 1.21/wmf7 9a5dc93
version not displayed
because the bug 36271
without Scribunto without Scribunto
2012-12-11 bbd155c MediaWiki 1.21/wmf6 bbd155c
2012-11-28 54aef84 MediaWiki 1.21/wmf5 54aef84
2012-11-12 c2aa4c7 MediaWiki 1.21/wmf4 c2aa4c7
2012-10-31 396bf79 MediaWiki 1.21/wmf3 396bf79
2012-10-17 MediaWiki 1.21/wmf2 e7dd3e5
2012-10-15 e7dd3e5 MediaWiki 1.21/wmf1
2012-10-07 MediaWiki 1.21/wmf1 303b8c0
2012-10-01 MediaWiki 1.21/wmf1 without Scribunto
2012-10-02 303b8c0 MediaWiki 1.20/wmf12 303b8c0
2012-09-26 27428ca MediaWiki 1.20/wmf12 27428ca
2012-09-17 a2d18c9 MediaWiki 1.20/wmf12 a2d18c9
2012-09-12 MediaWiki 1.20/wmf11 aea0553
2012-09-05 aea0553 MediaWiki 1.20/wmf11
2012-08-27 MediaWiki 1.20/wmf10 ea1347a
2012-05-31 5f5b09e
2012-05-11 first deployment

See also[edit]