[00:33:28] If I have a change to an extension that needs a corresponding change in core first (i.e. adding a new hook), is there any way to tell Gerrit about the dependency? [00:34:03] Nope [00:34:19] other than putting it in a comment/your commit summary so humans know [00:34:25] I didn't think so, but I wanted to be sure. Thanks. [13:35:03] Any lastmodified people around? [13:36:20] ori-l? [13:38:17] In any case, you'll want to look at http://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Tab_.22history.22_doesn.27t_work as a matter or some urgency. [13:38:21] *of [13:38:52] Given that the extension is breaking "history" links across dozens of articles... [13:40:17] Anyway, can't stay, got exam tomorrow. Just thought I'd mention it (don't have time to file a bug). [16:55:19] hey everybody, I have downloaded a wikipedia offline file (that was compressed in tar.bz2) now I have huge enwiki-20120403-pages-articles.xml file how can I open it to be able to see it offline, what software can do it ? [16:56:20] Pollo_: Any text reader should be able to read it, as it is an xml file. The question is: why did you download the dump? [16:56:27] What are you trying to do? [16:57:09] well i'm trying to be able to see it offline but i dont know how to do it [16:57:33] evopedia and kiwix won't open this file [16:57:50] You mean, you would like to have a copy of wikipedia which you can use offline? [16:58:00] yes [16:59:10] To do that, you will want to set up an installation of Mediawiki on you offline computer, and import this wiki dump into it. You can learn how to do that at https://mediawiki.org, and you can ask for help in doing it in #mediawiki [16:59:35] (This channel is more focused on *developing* mediawiki than *supporting* it.) [17:00:22] ok i'll look at this thank you ! [17:00:28] You're welcome. [20:48:29] can i influence the order of loading of gadgets? [20:49:39] Danny_B|backup: Not overall, that would make efficient asynchronous loading impossible. [20:49:48] But if you need a gadget A to load before gadget B, use dependencies [20:50:00] that's exactly what they're for. [20:50:26] they are independent on each other [20:50:46] also, you can separate "loading" from "execution". It is generally a good practice to make your gadget in such a way that when the js file is executed it is loading defining a function, it doesn't invoke it right away. [20:50:54] Danny_B|backup: Then why should they load in a certain order? [20:51:13] both add box under categories. but if both are added, they need to be added in given order [20:51:51] in that cast it is important to step back and try to get a hold of what really matters. [20:52:20] I think the real question is not to force the loading order (that would only result in unreliable implementations), but how to force the order in which they are eventually presented in the document. [20:52:41] which may be dependent [20:52:50] if the display order is A B C, it is perfectly possible for them to be loaded as C A B, then the javascript code should make sure it is inserted in the right place. [20:53:33] sure, but that means everytime you add new gadget which uses the same placement, you have to rewrite all other relevand gadgets to reflect it [20:53:42] that also makes the core more reliable and future proof, because if you'd depend on the load order itself, the asynchronous execution can still mess it up. Not to mention what would happen if another user makes a similar gadget that you don't know about. [20:53:54] rl2 should care about execution order [20:53:54] Danny_B|backup: No, that's exactly what you shouldn't do. [20:54:18] No it shouldn't. Relying on load order is a bad habbit. There are more reliable ways to do this. [20:54:19] that's what i actually do not want to do ;-) [20:54:31] that's why i asked about the order of execution enforcement [20:54:48] What you care about is execution of the code and insertion into the document, it has nothing to do with loading. [20:55:10] in a very basic html environment, those three are the same, but not in a more advanced, optimized environment like this one. [20:55:45] so what's the solution? [20:55:59] Danny_B|backup: Also, although it is a detail, it may work for you: Right now in production mode (not debug mode), modules that are loaded in the same request (combined and minified) are in alphabetical order. [20:56:33] Danny_B|backup: It may sound silly, but the solution is to implement what you really need, and not the easy workaround that may be easy from your side, but would require an enormous shuffle in the system that doesn't make it better. [20:56:52] So if you have a gadget cat-box-author and cat-box-tags [20:57:20] and you want them to be in a certain order, you'll need to have some sort of [20:57:24] some sort of system [20:57:27] is it alphabetical? [20:57:33] or manually decided? [20:58:03] both are perfectly possible, your choice [20:59:20] alphabetical is the easiest to implement, because you can simply have a gadget "cat-box-insertion" (a hidden "meta" gadget, that the others use), which takes care of the order. [20:59:52] it's not these catboxes we spoke about actually [21:00:06] sure, no problem. [21:00:26] if you need a manual order, then naturally you need a fixed registry. That means every gadget has to have an identifier that you can use. That's harder to implement, but that's how it has to be. Even if RL2 would have something for this, it would be the same thing. [21:02:36] The great thing (bot also the cause of many security issues) in javascript is that there is no hierarchy. Whether a method is created in core, in an extension, a gadget, user script or a mini-script somewhere in between, it has the same capabilities. SO there is no advantage of doing this in core rl, actually it would be even better when done as module so that wikis that don't need it, don't have to load it all on every page all the time. [21:02:36] Dependencies are made for this. [21:02:46] Danny_B|backup: I think that's all the pointers I can give without more details. [21:03:15] The main clue is the "cat-box-insertion" meta gadget that you'll probably have to do. [21:03:36] This will also improve code in general by having less duplication (the insertion is probably not the only thing you are or would be duplicating) [21:06:50] it's two different independent gadgets doing totally different thing. so somebody may have only one turned on, somebody the second, somebody both [21:07:13] well, it can't be that different. [21:07:23] They are inserting something in the same place, in a similar fashion [21:07:29] if the order matters, then they are related. [21:08:04] If that's true then it makes sense to have a meta gadget that centralizes part of that code, part of which takes care of the order. [21:08:10] Whether only one or more of them are enables doesn't matter, the injector would take care of that. [21:13:08] they insert something different, unrelated on each other. the only relation is their importance which makes the order. or not importance, just a static place. [21:18:31] So what solution would be good enough? It seems you don't want to make a central registry, do you have another idea? [21:18:47] gadgets have a central registry [21:19:53] One my own (local) wiki I once created a gadget like "article-top-bar-insert.js" which just had an array with gadget names. and a method to insert the icon. [21:20:13] All gadgets that inserted icons there would simply have a dependency on that and use that function to insert it [21:20:27] if a gadget would not use that, then it would be added to the front (or end) whatever the default is [21:22:05] so you suggest to have some central "gadget" which actually won't be nothing else than array of identifiers in desired order? [21:31:41] New patchset: Krinkle; "Separate `fetcher` and `submit`. Unrelated scripts." [integration/testswarm] (master) - https://gerrit.wikimedia.org/r/11823 [21:32:27] New patchset: Krinkle; "Update path to submit script." [integration/jenkins] (master) - https://gerrit.wikimedia.org/r/11824 [21:33:05] Danny_B|backup: an array and a function to do the insertion [21:35:34] the function would be like (function() { var order = [ .., .., .., ]; mw.libs.catBoxInsert = function ( $element, identifier ) { ... /* uses order and loops through to check if $('#mw-catbox-' + order[i] ') exists, and if so, insert it in the right position */ }; }()); [21:42:10] thanks for suggestion, i will try to play with it