[14:00:33] Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:50:17] Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @Lucas_WMDE & @James_F - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting [14:50:29] * James_F waves. [14:51:39] * Lucas_WMDE waves back [15:00:11] Okie-dokie, that's the time. [15:00:21] Welcome all to the weekly Technical Advice meeting. [15:00:36] Lucas_WMDE and are here and happy to answer any questions you might have. [15:00:49] o/ [15:15:52] sure is a quiet session today [15:15:59] Indeed. [15:17:02] well, since no one else is asking anything, here's a question for you (for some vague value of "you"): why can I not via the mw api export all revisions of some set of pages, but only the current ones? [15:17:20] you would think that if special:export lets me do it from the browser, I ought to be able to do it from the api, but no. [15:17:29] I think that's for performance reasons. [15:17:38] Special:Export is very locked-down. [15:17:55] But a rights-restricted API would be fine. [15:18:00] well, presumably you can only get x number of revisions per request, you pass in a continue param, etc like all the batched api queries [15:18:24] The "and transcluded content" flag expands the scope a great deal. [15:18:32] And makes batching hard. [15:18:43] ugh transcluded [15:18:44] But yeah, we could do that. [15:19:01] but we could ("we", i.e. $someone) [15:19:14] ...could do it for a stright up list of pages, no transclusions [15:19:15] Transcluded is the only valuable flag. "Get me this template and all its documentation, templatestyles, Scribunto modules, and sub-templates". [15:19:32] Sure, but would that be significantly useful? [15:19:49] (I don't use the API for content access, so I'm not the best judge of utility.) [15:19:55] it could save people the headache of digging out 10 pages from a 200gb dump set [15:20:40] just a 'nice to have' [15:20:55] Yes, but do they definitely want plain content without transclusions? [15:20:57] * James_F nods. [15:21:00] not sure how continuation would work here… would users have to “glue” the XML together themselves? [15:21:21] I have a question about processing templates provided to LUA function via frame:getParent().args [15:21:21] each xml file would have to have the full mediawiki, siteinfo, and page/title tags [15:21:30] then a set of revisions [15:21:36] oooh a question! woo [15:22:31] This is related to T40669 but AFAICT not the same, right? [15:22:32] T40669: API export action does not support exporting specific revisions - https://phabricator.wikimedia.org/T40669 [15:22:56] if a template calling LUA code is transcluded, the templates provided inside arguments are sometimes processed in wrong context (namespace) [15:22:56] James_F: yep, but I'm going to defer in favor of ankry's question, I can follow up at any time [15:23:07] any hint ow to avoid this? [15:23:07] Sure. [15:23:17] Lucas_WMDE: Do you know Lua enough to help ankry? [15:23:33] probably not :/ [15:23:37] :( [15:23:40] ankry: do you have an example somewhere? [15:24:30] I have the templates, but not an example calling them [15:25:01] If I need to construct an example, then mabe till next meeting? [15:26:31] I have no idea who will be at the next meeting, tbh [15:26:36] but an example would probably help in general [15:26:49] are any Lua experts online at the moment who could help out? [15:30:55] Lucas_WMDE: If I do not use the templates in arguments, but replace them with their code ("substitute" them), everything works fine [15:33:04] looks like templates were processed in some context, their result cached some way and then the cached data used in another context. Unsure if this is a bug or feature [15:43:50] as far as I’m aware, Lua invocations are generally supposed to be pretty independent of each other [15:43:57] unless you opt into some sharing with mw.loadData() [15:44:23] so to me that sounds more like a potential bug [15:45:37] but multi-level substitution can also be terribly confusing – there’s some safesubst thing that I don’t understand at all [15:48:43] No-one does. [15:56:43] are there debugging tips you can provide for wading through the multiple levels of substitution? even that could help [15:57:56] With MW template craziness, generally I recommend simplifying as a way to avoid unexpected issues. [15:58:07] So instead of four levels of template indirection, try to do it in one or two. [15:58:08] Etc. [15:58:27] Each Lua call multiplies up the "bug surface" of things that can wrong. [15:58:42] ankry: Good luck. :-( [16:01:38] yeah, I don’t have any tips for this, sorry :/ [16:01:48] guess that concludes the Technical Advice IRC Meeting… [16:01:52] OK, that's us at time. [16:02:03] you could try asking at https://discourse-mediawiki.wmflabs.org/ [19:37:11] hi!