[00:04:27] New patchset: Addshore; "use EntityIdParser in api/getclaims" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72532 [00:13:30] New review: Hoo man; "(1 comment)" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/72641 [00:26:36] New patchset: Addshore; "changeopaliases use fix use MWException" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72670 [02:46:19] New patchset: Daniel Werner; "Added Wikibase\EntityContent::testGetParserOutput" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66971 [02:47:37] New patchset: Daniel Werner; "Introduction of $.wikibase.claimgrouplabelscroll" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/69632 [04:45:18] addshore: lazyktm says I should talk to you about opening large items causing the browser to freeze [04:49:25] wctaiwan: on Wikidata? [04:49:33] items shouldn't be freezing your browser... [04:49:43] yes. [04:49:44] [12:43:04 AM] so, loading http://www.wikidata.org/w/index.php?title=Q865&curid=1185&diff=54963407&oldid=54870230 just made my browser freeze briefly [04:49:44] [12:43:19 AM] on my laptop, it's enough to make firefox do the "are you sure you want to keep running this script" thing [04:49:46] try opening the one for Republic of China. [04:49:51] lazyktm: no leaking :v [04:50:04] wctaiwan: no complaining :^ [04:50:44] also to be clear it's not because it's a diff page. [04:50:51] the main item does that as well [04:51:13] though I do think it may be a good idea to make &diffonly=1 default? [04:51:21] ...can't understand why it isn't, really [04:51:23] wctaiwan: Maybe you're just loading too much JS? [04:51:25] even for wikipedia [04:51:41] I don't think I have any user js. [04:51:42] * wctaiwan checks [04:51:45] Hazard-SJ: he hasnt set up user.js yet [04:52:24] that page doesn't freeze for any of you? o_O [04:52:33] I'm using firefox 22 on windows 7, fwiw. [04:53:33] it froze for me for 2 seconds [04:53:35] i saw the beachball [04:53:50] Firefox is known to choke on JS [04:53:56] yeah, that's what happens on this computer. On my laptop it triggers the warning. [04:53:58] isn't Chrome supposed to have the best JS engine? [04:54:26] granted my laptop is throttled to 800MHz because I take the battery out. But even then... you shouldn't need a super fast computer just to view an item. [04:54:40] worksforme on Chrome [04:54:43] also not a solution, given firefox's market share >>< [04:54:44] * Jasper_Deng tries firefox [04:54:44] >.< [04:55:11] yeah Firefox freezes very briefly for me [04:55:16] but I have like 40 tabs open. [04:56:52] probably a CPU thing rather than a memory thing [04:57:07] (so not necessarily correlated with how many tabs you have open) [04:57:11] no, i think its network [04:57:18] you have to make a few api requests to get all the info [04:57:18] but yeah. ...can't you guys cut down on the js? [04:57:32] well, or make it non-blocking [04:57:40] if you think it's the network. [04:58:36] lazyktm: I don't really think so, b/c Chrome doesn't choke on it, even if it takes a bit of time to load. [04:58:46] hm. weird then. [04:58:59] maybe chrome is smarter about handing the CPU back if js blocks? [05:23:29] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72670 [05:35:33] DanielK_WMDE: It's okay if I use composer for the PHP client right? It has a dependency on Guzzle, so.. [05:38:14] Or is there any other method to manage dependencies that MediaWiki generally prefers...like git submodules (God no :( ) [05:38:22] aude^ [06:21:19] nileshc: use composer. we may use submodules to manage deployment, but don't worry about it. [06:56:41] Wctaiwan I'll take a look in a sec :-) [06:57:25] addie :D [07:36:25] DanielK_WMDE: ok, cool. [07:41:38] New patchset: Addshore; "Changing summary for wbeditentity clear" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72641 [07:42:32] mhhm, thats diff works fine for me :P [07:42:32] DanielK_WMDE: The prototype is almost up, but I've hit a strange snag...ingesting (upload the training csv file to Myrrix and Myrrix builds the model) the data.csv (~250MB) file via EntitySuggesterService->ingestFile isn't working on the server...No errors, just "Killed" on the command line. No errors given. I tried grepping the whole PHP code for the php client (including guzzle code etc) for "Killed" to no avail. This is a stran [07:42:33] ge one. [07:45:35] I tried fiddling with memory and script execution times in php.ini, no effect.. I think PHP error reporting is Off, I'll check that. [08:02:47] addshore: hello! I have whitelisted you on Jenkins, test should now run for you ( aka https://gerrit.wikimedia.org/r/#/c/72531/ got deployed ) [08:03:18] Why thankyou :) [08:03:53] all the merits go to aude who wrote the Zuul configuration patch :) [08:03:57] I just clicked some buttons hehe [08:05:28] nileshc: "killed" means the process got killed by the OS using SIGKILL [08:05:35] hashar: clicking the buttons is normally the fun part ;p [08:05:38] nileshc: the question is really: what killed it, and why? [08:06:32] nileshc: on some systems, process that use too much memory or cpu get killed automatically... i can't think of a good way to find out how or why, though [08:06:41] please ask the labs folks [08:06:43] nileshc: also look at dmesg on the server, maybe the script consumed all memory and got killed by the kernel [08:06:46] oh, and check your ulimit [08:06:53] DanielK_WMDE: SIGKILL - I see...but exactly - the question is how do I find what kills it? I've tried 3 times already. No logs, no error output. [08:07:07] nileshc: what hashar said: check dmesg [08:07:25] ah...okay, right away. dmesg and ulimit. [08:08:46] Thanks guys. It was "Out of memory: Kill process 8633 (php) score 851 or sacrifice child" [08:08:50] nileshc: anyway - you are importing via a web service? that is not going to work for large amounts of data i'm afraid. especially not with php [08:09:10] or are you calling this from the command line? [08:10:03] DanielK_WMDE: Nope, I'm calling this from the cli [08:10:14] maybe the csv could be split in smaller batches [08:10:48] the split command is a lovely tool for that, split -l 1000 foobar.csv , would create files which are 100 lines long [08:11:18] Yes, I'll do that. When I was testing this at home, the data size was almost half of what it is now, maybe splitting will help, unless it's a bug. [08:13:55] New patchset: Henning Snater; "Implemented wikibase toolbarlabel and toolbarbutton widget" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71633 [08:20:12] New patchset: Henning Snater; "Implemented toolbar and toolbareditgroup jQuery widgets" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72247 [08:22:37] New patchset: Henning Snater; "Limiting number of registered event handlers in toolbar button widget" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72529 [08:25:14] nileshc: it'S strange that the client gets killed, right? it should not really collect massive amounts of data in RAM... that's for the actual engine to do. [08:25:34] the client and servlet should both really just pass data through, without storing it. [08:26:04] nileshc: is there any state that needs to be kept in the client? anything large? [08:26:24] hm, this is a PHP client getting killed, yes? [08:26:39] make sure php has gc enabled in cli mode [08:26:50] other than that: just don't use php for anything long running or memory intensive [08:26:57] php sucks at that [08:28:24] nileshc: btw, jeroen has been working on a java implementation of the wikibase data model. [08:28:46] you wouldn't have to interpret the json yourself any more, but could rely on a standard lib. [08:30:01] New patchset: Henning Snater; "Removed toolbarlabel's get/setContent method" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72692 [08:34:24] DanielK_WMDE: Oh...ok, could you give me a link to the code or docs? I already finished the Python parsers at last; I'll have a look at the Java implementation later too. On the wikidata-suggester instance, the hadoop job took around 15 mins to parse a 1.2G dump... [08:35:59] nileshc: https://github.com/JeroenDeDauw/WikibaseDataModelJava/ [08:36:15] i don't know whether it's complete. ask jeroen about it. [08:36:29] nileshc: no requirement to use that. if you have a working solution, stick to it. [08:36:34] this is just for reference [08:36:59] DanielK_WMDE: ok, yes. [08:37:40] nileshc: not that this code is GPL, so yopu can't use it in an MIT licensed app. [08:37:53] maybe the two of you can meet in the middle an make everything LGPL :) [08:39:58] nileshc: btw - are you using an IDE for development? [08:40:01] Yes...I might not need it at the moment, given that the python parser just works. About the license - do you think I should change my code license (unrelated to WikibaseDataModelJava, just asking) [08:40:32] DanielK_WMDE: Yes, for Java and PHP I use Netbeans [08:41:03] And good ol' vim or a configured gedit works for Python. :) [08:41:16] ok, good. [08:41:47] re licensing: MIT should be fine for now, just keep in mind that most of mediawiki is GPL. [08:42:21] so any code "linking" to the core (whatever that means for php) must be GPL. Anythign else can be under any OSI compliant license. [08:43:01] DanielK_WMDE: Exactly...hmm..we'll have to be on the look-out for this...if code have to be mixed, I'll change those parts to GPL. [08:47:47] New patchset: Henning Snater; "Removed toolbarlabel's set/removeFocus" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72698 [08:48:04] nileshc: i just replied to your mail. most importantly: never mind authentication, and don't worry about the UI/JS stuff for now. [08:48:25] Alrighty. [08:50:46] New patchset: Daniel Kinzler; "Factor string normalization functions out of Utils." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72078 [08:50:57] New review: Daniel Kinzler; "rebased" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72078 [08:50:59] DanielK_WMDE: Thanks! I'm reading it... We can choose not to make the REST API public...I opened port 8080 on labs to make it public to help me while I code. All servlets can be internal. [08:51:11] New patchset: Daniel Kinzler; "(bug 46867) trim bad utf-8 sequences before normalizing." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/70139 [08:51:17] New patchset: Daniel Kinzler; "Move search key generation to TermSqlIndex." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72079 [08:54:05] New review: Daniel Kinzler; "@aude: please make all of them look." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/68002 [08:58:02] New review: Daniel Kinzler; "(1 comment)" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66271 [08:58:33] New review: Daniel Kinzler; "needs rebase." [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/66271 [08:58:48] New patchset: Daniel Kinzler; "Added Wikibase\EntityContent::testGetParserOutput" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66971 [08:59:57] * DanielK_WMDE looks around [09:00:00] daily delay? [09:12:34] New review: Henning Snater; "I would like getting around adding that specific template which is invoked in the back-end exclusive..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72090 [09:19:12] aude: i see ba nunch of failing tests locally, in LanguageWithConversionTest and LanguageFallbackChainFactoryTest [09:19:33] this is on master... [09:19:39] anyone else having this problem? [09:19:48] New patchset: Henning Snater; "Limiting number of registered event handlers in toolbar button widget" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72529 [09:19:57] New patchset: Henning Snater; "Removed toolbarlabel's get/setContent method" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72692 [09:20:01] New patchset: Henning Snater; "Removed toolbarlabel's set/removeFocus" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72698 [09:21:48] they worked for me [09:21:52] DanielK_WMDE: those worked for me [09:22:09] hm... [09:23:12] i'm seeing: [09:23:15] -'de' [09:23:17] +'de-formal' [09:23:28] oh, wait. [09:24:29] silly me. forgot to remove a local hack [09:25:55] DanielK_WMDE: repo or client? [09:25:58] oh, ok :) [09:28:00] DanielK_WMDE: are you reviewing liangent's patches now? [09:28:06] New patchset: Jeroen De Dauw; "Added SelectionRequestDeserializer" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72619 [09:30:00] New patchset: Jeroen De Dauw; "Introduction of $.wikibase.claimgrouplabelscroll" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/69632 [09:30:49] Jeroen De Dauw: hi [09:31:21] ye ye ye [09:31:27] JeroenDeDauw: you here? [09:32:05] lazowik: physically yes, mentally perhaps less so :) [09:32:10] ok [09:32:29] shouldn't take much thinking [09:32:37] :) [09:33:07] regarding SimpleSiteLink [09:33:16] is it better to add array pageBadges [09:33:29] or create page array [09:33:37] with name string and badges array? [09:33:55] New review: Jeroen De Dauw; "(1 comment)" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/66971 [09:34:06] JeroenDeDauw: ^ [09:35:54] lazowik: I do not understand your second suggestion. What I was thinking off is having a $badges field that is an array of string [09:37:06] the second would be { site: 'en'; page: { name: 'Title'; badges: {} } } [09:39:33] that kind of structure will be needed nevertheless in Item [09:40:22] bacause of data['links'][$siteId] which now contains pageName [09:41:08] JeroenDeDauw: I'll stop pinging you now, just take a look sometimes here [09:41:13] if you can of course :) [09:50:40] New patchset: Jeroen De Dauw; "Tweaks to entry point file" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72705 [09:51:03] New patchset: Jeroen De Dauw; "Rename source folder to src" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72706 [09:56:05] Denny_WMDE: can you review https://gerrit.wikimedia.org/r/#/c/70433/ for DanielK_WMDE ? [09:56:14] and then there's a big pile of patches that depend on it [09:56:20] about the bad value stuff [10:00:37] New review: Denny Vrandecic; "(1 comment)" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72547 [10:05:01] New review: Daniel Kinzler; "(1 comment)" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/66971 [10:05:09] DanielK_WMDE: Il going to slowly go through the whole api and its error calls now :) try and align each module with each other and then also with core [10:05:26] addshore: yay! [10:06:32] just watch this keep changing ;p https://docs.google.com/spreadsheet/pub?key=0ArUN7tgsOZ8qdFpnTWlTbW1sZ2ZvMl9MbWkyNTdINlE&output=html [10:07:35] New patchset: Daniel Kinzler; "Fix some bad @group annotations" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72707 [10:07:50] easy chocolate enyone? ----^ [10:09:36] Change merged: Addshore; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72707 [10:10:57] New patchset: Henning Snater; "Removed toolbarlabel's get/setContent method" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72692 [10:11:10] New patchset: Henning Snater; "Removed toolbarlabel's set/removeFocus" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72698 [10:12:57] New review: Aude; "(1 comment)" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/72316 [10:16:35] lazowik: the format of our serialization should not affect the way we represent the things in the PHP object all that much [10:17:01] lazowik: also keep in mind we cannot just change the serialization format - people would go mad as this would break things [10:18:13] lazowik: I don't think there is reason to put both title and badges in a page field - they all fit on the top level [10:18:32] The site is as much part of the page info as the title is [10:19:07] Though one can take a different view on that [10:19:19] Denny_WMDE: what do you think? [10:19:36] Any OS around? [10:20:07] Denny_WMDE: Can I use traits? Ran into a place where this would be rather useful :) [10:20:37] Wikidata has no local OS? [10:21:19] Okay. I will ask a steward then [10:22:16] ok, will do badges [10:22:26] * $badges [10:22:51] JeroenDeDauw: I agree with you on the badge being on the top level, i.e. { site: 'enwiki', title : 'Wikidata', badge: 'awesome' } -> lazowik [10:22:57] what is an OS? [10:23:08] badges: ['awesome'] [10:23:35] We are creating Wikidata OS? Cool [10:23:38] :D [10:23:50] In Haskell right? [10:23:56] in an array [10:24:05] (just lost connection for a moment, sorry) [10:24:11] JeroenDeDauw: I meant oversight not operating system :p [10:24:13] JeroenDeDauw: when where traits introduced to PHP? [10:24:39] Denny_WMDE: 5.4 [10:24:53] i think that means unfortunately no [10:25:20] but then again, you knew that before :) [10:26:28] Not sure how to avoid some duplication in the Ask deserialization code then [10:27:17] aude: >> Uncaught TypeError: Cannot call method 'getGlobalSiteId' of null [10:27:54] load.phpln791 ;p [10:28:26] JeroenDeDauw: with a comment to the effect that this is duplcated, that we can get rid of it using traits, and that should be refactored when we bump to 5.4 [10:29:17] New review: Aude; "running all the api tests again, I did not get the fatal. But got some test failures:" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72316 [10:31:52] Denny_WMDE1: we'll lose the comment due to proton decay before that happens [10:32:40] addshore: can you reproduce with debug=true [10:32:47] * aude cannot reproduce [10:32:52] * addshore looks* [10:33:02] in chrome or firefox [10:34:59] chrome debug=true all looks fine :) [10:34:59] JeroenDeDauw: as usual, i am slightly more optimistic :) [10:36:06] Denny_WMDE1: I'm quite sure I won't be off by more then 200 orders of magnitude [10:37:33] yes, that is likely. decimal base, i assume. [10:41:56] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72547 [10:45:17] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72548 [10:48:12] New patchset: Daniel Kinzler; "Allow rendering of entities without an ID." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72711 [10:50:29] New review: Daniel Kinzler; "...alternatively to setting an ID (see comment), you can also just approve I3c7eec765 and rebase onc..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66971 [10:50:47] DanielK_WMDE: core doesnt really localise the message content of errors, do we want to? [10:50:56] Denny_WMDE1: hard to imagine the difference between 2^200 and 10^200, they are both somewhat big [10:51:25] :) aye [10:51:41] and longer than time as we currently expect it [10:52:08] addshore: in the api no [10:52:15] in the ui, yes i think so [10:52:35] mhhm, the ui doesnt use the wikibase-api-* error keys does it? [10:52:48] is there an language code for non-geek speak? :) [10:53:07] that's what the users should see and localised.... in the js [10:53:18] addshore: ask henning [10:53:36] Henning_WMDE, im aware im sat next to you but ^^ [10:53:51] addshore: or you can look in resources.php [10:53:58] in lib and repo [10:54:13] aude: i thought en-xnongeek [10:54:44] if i remove all of the wikibase-api-* keys from i18n on repo will I break any UI stuff? :P [10:54:56] quite possibly [10:56:17] addshore: tough question. generally, no. but in some cases, the actual underlying error comes from a Status object or some such. in that case, the localized error message should be used. [10:56:45] addshore: basically, anything that is a logic error (that is, the client misbehaving) doesn't need localizing [10:57:17] Denny_WMDE1: huh? The lifetime of Wikidata is expected to be under 10^200 years? :( [10:57:33] addshore: anything that can be caused by the user, or depends on the system's state, should be localized. E.g. edit conflicts. [10:57:58] DanielK_WMDE: okay :) *i think* :) [10:58:44] New review: Daniel Kinzler; "you need to rebase on something else. if rebase is tricky, make a new branch on top of whatever and ..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71280 [10:58:50] JeroenDeDauw: we have a chance if this turns out to be what we are working on… http://www.wikidata.org/wiki/Q979311 [10:59:30] JeroenDeDauw: https://gerrit.wikimedia.org/r/71543 Could you think about your -1 again? [11:04:11] New review: Daniel Kinzler; "This will work, but it seems the wrong approach. Mentioning the concrete kind of entity in the copyr..." [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/71613 [11:08:02] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72619 [11:08:32] New review: Daniel Kinzler; "(1 comment)" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/72321 [11:09:21] New review: Jeroen De Dauw; "@DanielK: The web API is part of the presentation layer. Domain logic does not belong there. This ha..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71543 [11:09:37] New review: Denny Vrandecic; "why this? I though that includes is the usual place for MediaWiki extensions and libraries?" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72706 [11:15:04] Denny_WMDE1: looks like an interesting, though dated, story. Reminds me of https://www.wikidata.org/wiki/Q74378 [11:16:10] DanielK_WMDE: could you take a look at https://bugzilla.wikimedia.org/show_bug.cgi?id=50983 ? :) [11:21:44] New review: Daniel Kinzler; "@Jeroen: I really don't understand the problem. We have an interface that takes a page title. We can..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71543 [11:22:39] addshore: can you reproduce 50983? [11:22:45] yup [11:23:24] addshore: with JS involved, or directly on the API? [11:23:41] is js, havnt tried directly on the api [11:23:50] please put steps to reproduce on the bug report [11:26:12] DanielK_WMDE: done [11:29:17] wikidata.org is broken [11:29:27] can someone confirm? [11:30:05] Abraham_WMDE: Define broken? [11:30:14] DanielK_WMDE: regarding serialization of fallback chain: 1) construction of fallback chain "claims" to be depending on the context, without telling what is used in the context (currently, language and user) it would be better not to touch or guess its internals in external code 2) if we pass back babel info (or even use babel info from user page), it's still open to dos attack [11:30:17] Seems to work for me [11:30:25] upload.wikimedia and bits.wikimedia dont appear to be responding from here :P [11:31:14] hoo: does not load at all here [11:31:16] 3) it won't be so difficult to be change the serialize to use another serialization format later (eg. just include construction source info and implement construction in ->unserialize() [11:31:43] Worksforme [11:31:48] hoo http://grab.by/oirO [11:32:38] mh [11:32:46] works for me with debug true and false [11:32:57] they are all back :> [11:33:01] Abraham_WMDE: ^^ [11:33:09] liangent: it still makes me very uneasy. the fallback chain is nothing the client should get to decide. it should be determiend by the server only. [11:33:30] liangent: in our case, it would *normally* come from the server, but we accept it as input, so there is no way to be sure [11:33:40] if we go that route, we have to be very restrictive about it. [11:38:15] DanielK_WMDE: only to avoid dos? might be a tricky way: to concatenate the fallback chain with wgSecretKey (or whatever) then hash it, and include the hash as a part of serialized form too :p [11:38:28] but it's still open to dos by defining a big label [11:38:30] *babel [11:42:45] Denny_WMDE1: should api provide way to search sitelinks by badges? [11:43:02] I'm looking for a best way to store then in database [11:44:04] *the best [11:47:36] Sk1d: if you don't CC anyone on a bug, bugzilla is just acting as a blackhole of bugs and ideas :D [11:48:27] Sk1d: ops, sorry, wanted to send to addshore [11:49:04] liangent: i don't like the idea in principle. as i said, fallback chains should never come from the client. I'm not convinced we need this. I think looping the current language through should be sufficient. [11:50:36] ebraminio: every component has a default asignee, which is typically a mailing list [11:50:41] so no, no black hole. [11:51:00] DanielK_WMDE: didn't know, thanks [11:51:00] DanielK_WMDE: what's "looping the current language"? [11:51:12] &languages=**|** in api calls? [11:51:31] liangent: passing it from the backend to the client, and back to the api. [11:51:32] then this param affects both qqc and other labels [11:52:30] liangent: sorry, i must be missing something... how does it influence anything? [11:53:22] i'm not sure about the qqc stuff either... we are losing the information which language qqc is referring to for each string. we'd need that fordirectionality etc, right? [11:54:12] we've already been using 'en':{'value':'something','language':'en'} in serialized form [11:54:30] and I add another 'qqc':{'value':'something','language':'en'} [11:54:32] ah, right, that's good. [11:54:45] with the second 'en' untouched, which indicate the "real" language [11:54:49] so we'd have 'qqc':{'value':'something','language':'en'} [11:54:55] yea, that's good [11:54:57] yeah [11:55:36] * DanielK_WMDE would probably have used something like '(preferred)' instead of qqc# [11:55:41] then in api calls, do we use &languages=en|qqc to get {'labels':{'en':{'value':'something','language':'en'},'qqc':{'value':'something','language':'en'}}} ? [11:56:05] we could do that, yes [11:56:33] if so, it can't be sure that we can always find the original context (thus the fallback chain) back [11:56:46] that's the initial motivation to serialize the chain [11:57:00] (passing the original context back somehow should be fine too [11:57:02] liangent: right. i don't think it'SA very important to be 100% sure that you get the original context. [11:57:21] it's going to be the same 99.99% of the cases, and when it's not, I can't think of a case where that would be a problem [11:57:32] DanielK_WMDE: can you assign this to a suitable mailing list? https://bugzilla.wikimedia.org/show_bug.cgi?id=40258 [11:57:34] on the other hand, i can see plenty of problems with fallback chains coming from the client [11:57:59] DanielK_WMDE: I am not very familiar with mediawiki groups and ... [11:58:19] ebraminio: it already is: "Assigned To: Wikidata bugs " [11:58:26] DanielK_WMDE: besides dos? [11:58:51] hoo: are you around? [11:59:05] Abraham_WMDE: Sure :) [11:59:17] DanielK_WMDE: hmm, but after one year... nobody cares... [11:59:45] liangent: besides DoS, mostly on principle: keep the input minimal and restrictive. don't leak internal info. don't pollute interfaces with internal cruft. [12:00:40] ebraminio: hm? the bug i was looking at ios from yesterday. which one do you mean? [12:00:56] DanielK_WMDE: https://bugzilla.wikimedia.org/show_bug.cgi?id=40258 [12:01:11] ebraminio: bugs *can* get lost, if they arn't urgent enough to be handled right away. so it helps to poke every now and then. [12:01:29] DanielK_WMDE: hmm, right [12:02:19] DanielK_WMDE: specifically any &uselang= param info will be lost [12:02:38] which is used by some site script on wikidata.org to enable localized view for anons [12:03:00] see [[d:MediaWiki:Common.js]] [12:03:00] [6] 10https://www.wikidata.org/wiki/MediaWiki:Common%2Ejs [12:03:16] ebraminio: ah. not m,uch i can do about that one. poke Aharoni about it? [12:03:33] DanielK_WMDE: would be nice, please [12:03:54] liangent: no, that's not lost because the current language should indeed be passed to the client. that's what i meant with "loop the current language". [12:04:27] ebraminio: i can cc him on the bug, but you have as much a chance of poking him on irc as i do. [12:06:14] DanielK_WMDE: If you have him email, please cc him but I don't have him in my joined channels [12:06:25] DanielK_WMDE: and I mangle the (or create a new / derivative) context to add the language into it somehow, then construct the fallback chain with that context? [12:06:46] ebraminio: done already. he's in here quite often, later in the day [12:06:55] DanielK_WMDE: thanks [12:07:00] lazowik: no search by badge [12:07:12] so I can just add one column [12:07:12] for now, maybe later if the use case is clear [12:07:16] and serialize in php? [12:07:26] a column where? [12:07:31] to database [12:07:36] for badges [12:07:43] New patchset: Jeroen De Dauw; "Optimized imports" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72714 [12:07:43] New patchset: Jeroen De Dauw; "Refactor code re-use by inheritance to using the strategy pattern" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72715 [12:07:43] where in the db? [12:07:44] and serialize( $badges ) in php [12:08:02] DanielK_WMDE: there's no newFromContextAndLanguage and I don't really want to add one, which looks not so clean [12:08:05] in wb_items_per_site [12:08:12] liangent: yes. though i'm starting to feel that it's not good that the fallback depends on "anything in the context". COntext is a kitchen sink, a kludge to get rid of some globals without massive refactoring. there's no coherence in what it contains. [12:08:30] I have to store these badges somewhere... [12:08:37] liangent: so depending on contaxt means introducing a bag of dependencies . which is annoying precisely in cases like this. [12:08:50] New patchset: Jeroen De Dauw; "Refactor code re-use by inheritance to using the strategy pattern" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72715 [12:09:30] in the item [12:09:52] Denny_WMDE1: https://gerrit.wikimedia.org/r/#/q/status:open+project:mediawiki/extensions/Ask,n,z [12:10:27] lazowik: the badges would primarily be in the json blob. that might be sufficient, though it means the client has to load the full entity in order to show sitelinks. that's probably not good in the long run. [12:10:29] lazowik: Denny_WMDE1 i think it would be icky to load the entire entities to get the badge info [12:10:40] DanielK_WMDE: but if one day I want to add, for example, the functionality to extract info from Accept-Language: header, I don't need to change a bunch of chain creation lins [12:10:47] lazowik: so, i suppose wb_items_per_site is the right place. in a blob field, as json. [12:10:51] we could do like the wb_property_info or maybe it could be in the site link table [12:11:02] ah, ok, not as primary i assume? [12:11:09] the primary is in the item blob [12:11:12] lazowik: or do we need to query by badge? and have multiple batches per target page? then we need a separate table. [12:11:13] a blob field in items per site is fine [12:11:17] we are talking about secondary, right? [12:11:18] Denny_WMDE1: yes [12:11:24] DanielK_WMDE: no querying of badges [12:11:26] it's a lookup table [12:11:52] so blob field of json-serialized? [12:11:55] liangent: that's why it'S good to avoid inline object creation, and push object creation up the stack. that way, there are fewer places to change when dependencies change. [12:12:28] liangent: https://en.wikipedia.org/wiki/Law_Of_Demeter [12:12:29] DanielK_WMDE: then there's still one per class.. [12:12:44] liangent: not if you inject the chain into the class [12:12:54] ideally, there is exactly one [12:13:21] now, if you anticipate that you will have *different* contexts to deal with during the same request, you can't do that [12:13:24] but when would that happen? [12:13:55] well technically context is not tied to requests [12:14:40] maybe I would setContext in the context source [12:14:43] then call it cgain [12:15:01] New patchset: Jeroen De Dauw; "Rename source folder to src" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72706 [12:15:05] New patchset: Jeroen De Dauw; "Optimized imports" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72714 [12:15:08] New patchset: Jeroen De Dauw; "Refactor code re-use by inheritance to using the strategy pattern" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72715 [12:15:33] so I sometimes I want to delay chain creation and cache factory instead [12:15:47] so I may override setContext and create a new chain when needed [12:17:07] liangent: i see no use case for that. but yes, if you want to support that, you have to locally create the chain. which means you have to update all these places when dependencies change [12:17:43] delaying chain creation is a good thing, i supose, because languages are so heavy... [12:17:55] still one per class if I use a getLanguageFallbackChain() method, right? [12:17:57] * DanielK_WMDE is pondering about creating a LanguageInfo class without all the cruft. [12:18:14] if you do that in every class, yes [12:18:24] honestly, i do not see the use [12:18:41] ok [12:18:43] context is not designed to be replaced or changed on the fly. [12:18:57] lots of stuff gets confused if you do that [12:21:40] New review: Denny Vrandecic; "(1 comment)" [mediawiki/extensions/Ask] (master) C: 2; - https://gerrit.wikimedia.org/r/72705 [12:21:40] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72705 [12:22:46] New review: Daniel Kinzler; "(1 comment)" [mediawiki/extensions/Wikibase] (master) C: 2; - https://gerrit.wikimedia.org/r/71845 [12:24:03] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71845 [12:25:03] some visualization of wikidata geographical data: https://dl.dropboxusercontent.com/u/172199972/map/index.html [12:26:24] DanielK_WMDE: btw regarding https://gerrit.wikimedia.org/r/#/c/71845/11/repo/includes/actions/ViewEntityAction.php : you can always inject with the setter [12:27:28] creates a wrapper of parent::__construct requires one more place to change if the function definition ever changes [12:27:59] liangent: no, that's no in addition to the linitialization in the getter, but *instead*. so it'S the same number of places. [12:28:26] but lazy initialization is good in case of the language cruft, so let's keep it for now. [12:29:14] yes, injecting with a setter works, though it's not very pretty. [12:30:05] New patchset: Jeroen De Dauw; "Remove Serializer from SerializationException" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72717 [12:30:06] New patchset: Jeroen De Dauw; "Added attributeValue to InvalidAttributeException" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72718 [12:30:30] DanielK_WMDE: "no, that's no in addition to the linitialization in the getter, but *instead*. so it'S the same number of places." I mean, if you add a param to the constructor in its base class in the future, you'll have to change this class too [12:30:43] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71865 [12:30:50] if you use a getter/setter (thus no __construct is added in this class), that step is not needed anymore [12:32:10] liangent: hm? you either need initialization in the constructor or in the getter. you don't need both. [12:32:39] DanielK_WMDE: assume the change in constructor is not related to language fallback [12:33:16] so with getter/setter approach no change is needed when you change constructor somehow [12:33:23] you mean, just because the constructor exists? [12:33:28] DanielK_WMDE: right [12:33:33] well yea, if it only exists for that reason, sure. [12:34:13] but i don't think that would be a huge burden. it's just passing a parameter. no extra initialization logic or anything. [12:34:16] *whrug* [12:34:19] DanielK_WMDE: and in https://gerrit.wikimedia.org/r/#/c/71845/11/repo/includes/actions/ViewEntityAction.php there's no constructor originally [12:34:19] *shrug* [12:34:34] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72320 [12:34:36] you even need to change the number of params [12:34:51] and we don't have python-style def func(*args, **kwargs) [12:35:35] it'll look nice if we can use function __construct(*args, **kwargs) in these cases [12:36:05] changing constructor parameters isn't a problem at all if you take care to avoid inline/local construction of service objects. [12:36:07] (though it might be a nightmare for ides [12:37:14] no, constructiopn of helper objects like the fallback chain from a factory is always problematic. but that'S about the fallback chain's constructor, not the "user" classe's. [12:39:51] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72352 [12:42:08] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72353 [12:42:21] DanielK_WMDE: sorry but I mean changing constructors of "user classes" from beginning maybe you misunderstood [12:43:13] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72354 [12:43:51] New review: Daniel Kinzler; "I think serializing fallback chains is a bad thing: these should not be passed around, and we should..." [mediawiki/extensions/Wikibase] (master) C: -2; - https://gerrit.wikimedia.org/r/72256 [12:44:17] liangent: sorry about that one, i know it will make refactoring a pain :/ [12:44:51] liangent: perhaps you can just remove this dependency from https://gerrit.wikimedia.org/r/#/c/72257/? [12:45:06] (just make a fresh branch/commit - as long as the change id stays the same, it will work) [12:45:56] DanielK_WMDE: I know how gerrit works :) [12:45:57] New review: Daniel Kinzler; "please remove the dependency on I65d69c8b12fa4" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/72257 [12:46:15] liangent: sorry :) [12:46:36] * DanielK_WMDE thinks gerrit works based on magic gears and pixy dust [12:46:53] there are a bit light on the pixie dust and a bit heavy on the gears, though [12:47:06] that explains a lot [12:47:35] DanielK_WMDE: so let me still use the contextlanguage name, but accept a single language code instead? [12:49:09] New review: Daniel Kinzler; "Looks good, but is missing a test case." [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/72225 [12:51:43] New review: Daniel Kinzler; "FTR: when returning a label based on the current requests fallabck chain, qqc would be the code for ..." [mediawiki/extensions/Wikibase] (master) C: 1; - https://gerrit.wikimedia.org/r/72258 [12:55:16] New review: Daniel Kinzler; "I don't see why this is needed - couldn't we just put "qqc" into the language parameter? (or whatev..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [12:56:33] DanielK_WMDE: "Please provide a unit test for this." maybe I should just copy some tests from label/desc serializer [13:02:25] Denny_WMDE1: You are falling behind on the ask review queue :p [13:02:53] New review: Daniel Kinzler; "...or we could do this another way alltogether: add a "usefallback" parameter. If that is set, and w..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [13:03:05] JeroenDeDauw: you haven't answered a question at the root of the queue :) [13:04:35] anyone familiar with Scribunto_LuaWikibaseLibrary ? [13:04:42] what's the lifespan of such an object? [13:05:08] a request? a parser run? or a single #invoke call? or whatever? [13:05:18] New review: Jeroen De Dauw; "Nope, src is the usual place to put code in PHP projects. includes is typical for MW extensions, the..." [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72706 [13:05:31] Denny_WMDE1: ah, replied [13:05:57] Jens no longer on this IRC? [13:09:02] JeroenDeDauw: you rang? [13:09:12] liangent: ^^ [13:09:17] (15:04:36) liangent: anyone familiar with Scribunto_LuaWikibaseLibrary ? [13:09:17] (15:04:44) liangent: what's the lifespan of such an object? [13:09:17] (15:05:09) liangent: a request? a parser run? or a single #invoke call? or whatever? [13:09:45] liangent: good question, actually. [13:10:59] liangent: since it's more or less taken von Scribunto, I would guess the answer's there. [13:11:44] New review: Daniel Kinzler; "Seems fine now, except for depending on fallback chain serialization." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72226 [13:12:02] liangent: do you run into problems? [13:12:50] i think she wants to add language fallback support there [13:12:51] johl: I want to make some change and I have to decide how much I can depend on instance variables [13:12:53] or variant [13:13:32] to cache and avoid outdated stuff [13:14:15] liangent: okay, i'll investigate. i'll get back to you in a few minutes. [13:14:52] New review: Daniel Kinzler; "(1 comment)" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72351 [13:14:56] New review: Denny Vrandecic; "My question was not about PHP projects in general, but about MediaWiki extensions and libraries. If ..." [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72706 [13:15:14] liangent: Scribunto_LuaWikibaseLibrary gets initialized together with the Scribunto object that pulls it in, but I have no idea how long that lives. [13:16:24] aude: actually it won't be so urgent to do that if getEntity accepts an entity id [13:16:40] so lua coders can simply do what they want [13:17:06] instead of depending on label( id ), which may need some variant work [13:20:05] liangent: hmmm, that would be nice [13:20:38] DanielK_WMDE told me that page cache invalidation doesn't work well currently [13:20:55] liangent: i see that Scribunto_LuaEngine has a load function where it fetches the registered scribuntu libraries [13:21:11] DanielK_WMDE: still around? :) [13:22:10] liangent: what aude says [13:22:43] addshore: yes. Ibc91a10b seems to be incomplete, jenkins fails [13:22:54] liangent: the interpreter gets initialized, but code is loaded for every #invoke [13:23:02] yup, I forgot to update the permissions expected returns [13:23:04] liangent: does that help? [13:23:34] just wondering if you could take a peak at http://etherpad.wmflabs.org/pad/p/addshore and give me some sort of idea of which ones should be translated? [13:23:36] johl: so every invoke creates a new Scribunto_LuaWikibaseLibrary instance? [13:23:43] liangent: no. [13:24:00] hmm one global Scribunto_LuaWikibaseLibrary instance [13:24:04] liangent: yes, yes [13:24:18] and there's no clear state stuff? [13:24:30] at the beginning of invoke or parser run? [13:24:39] i see clearState [13:25:06] * aude needs to study the scribuntu code more [13:25:12] * aude needs to study the scribunto code more [13:25:34] I read bug 45277 also, might it be an idea for ApiWikibase to override dieUsage in our api modules, making it work slightly differently. dieUsage->(code-in-i18n,vars-array,translate-bool)? [13:25:42] liangent: tricky, there are edge cases... wikibase-api-patch-incomplete for example, or wikibase-api-patch-incomplete [13:25:53] err, that was for addshore [13:26:34] aude: clearState is there, to my knowledge it's never used. [13:26:44] addshore: no, changing the signature of a method when overriding it is a bad idea (actually, it's illegal) [13:26:58] xD > well a new method then :) [13:26:59] addshore: we could just use our own function instead. [13:27:03] right [13:27:09] but that sounds okay? :) [13:27:25] aude: where is clearState? [13:27:30] you mean in parser? [13:27:32] sure, if you want to translate everything... [13:27:39] liangent: in scribunto hooks [13:27:42] it also has stuff like if ( Scribunto::isParserEnginePresent( $parser ) ) { [13:27:49] liangent: Scribunto/common/Hooks.php line 55 [13:27:49] *ideally* the caller would tell us if and when they want translated (and html formatted) errors [13:27:51] then sets stuff [13:27:59] so per default, we'd just send to code (and maybe english) [13:28:13] it also sets the engine in invoke hook [13:28:14] yup [13:28:19] so maybe it is per invoke [13:28:31] addshore: see here for ideas: https://bugzilla.wikimedia.org/show_bug.cgi?id=45843 [13:28:34] clear state is just some housekeeping maybe [13:28:39] aude: that would make sense [13:28:49] addshore: for now, i'd just use a hardcoded string unless we have a status object [13:29:00] okay :) [13:29:21] aude: if we can reach it somehow, that seems abusing a function created for something else [13:29:24] addshore: but do think about the problem; this is a typical case for an RFC. [13:29:26] that call is in public static function reportLimits [13:29:42] DanielK_WMDE: yup! [13:29:55] New review: Denny Vrandecic; "Trying to sum up the face2face conversation on the -1: it is not suggested to not have this function..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71543 [13:30:03] liangent: yeah [13:30:26] liangent: Brad Jorsch helped me a lot with Scribunto questions. [13:30:50] there is also is a class Scribuntu with a bunch of static functions for setting parser entine [13:30:53] engine [13:31:27] New review: Denny Vrandecic; "Jeroen promised me that this move won't make any problems for deployment. He owes me one if it does." [mediawiki/extensions/Ask] (master) C: 2; - https://gerrit.wikimedia.org/r/72706 [13:31:28] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72706 [13:32:28] aude: I think I'd better avoid caches for now [13:32:36] liangent: sure [13:32:51] it seems per invoke, but i really am not sure [13:33:07] yey DanielK_WMDE , also another thing, core doesnt seem to use -'s at all xD [13:33:11] New review: Daniel Kinzler; "@denny, @jeroen: so the actionable essence is: factor out the resolve-sites+titles-into-items into a..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71543 [13:33:43] addshore: yea, silly them. [13:35:01] New review: Denny Vrandecic; "(1 comment)" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72714 [13:36:06] New review: Daniel Kinzler; "not all claims are statements..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72532 [13:43:06] New review: Daniel Kinzler; "seems fine now except for the naming issue mentioned by aude." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72316 [13:45:42] New review: Denny Vrandecic; "yes" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/71543 [13:49:17] New patchset: Jeroen De Dauw; "Split off StrategicDeserializer from TypedObjectDeserializer and added QueryOptionsDeserializer" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72723 [13:51:45] JeroenDeDauw1: do we also get a tactical deserializer? [13:51:47] I have installed a local wikibase project. but I am unable to save a statement. getting a generic error from the API only. any ideas what I have done wrong? [13:52:12] DanielK_WMDE: yeah, it'll be easier to construct, but have a lower yield [13:52:12] Raymond_: what generic error? have you looked at the actual result structure? there may be hints there [13:52:27] And lower lifetime [13:52:37] Unelss you wrap it in an ICBM adapter [13:52:57] or put it into a shipping container [13:53:08] DanielK_WMDE: getting this error: 'wikibase-error-save-generic' => 'An error occurred while trying to perform save and because of this, your changes could not be completed.', [13:53:24] DanielK_WMDE: whart do you mean with "looked at the actual result structure" where? [13:53:26] DanielK_WMDE: sneaky! [13:53:26] i hate that error message [13:54:06] Raymond_: whatever the API returns. do you have a "details" link when that error is shown? [13:54:15] otherwise, use firebug to look at the returned json [13:54:27] DanielK_WMDE: the content of the details link is "" ... [13:54:37] addshore: maybe you can help Raymond_ find the problem given un unhelpful error message :) [13:54:48] Raymond_: >_< [13:55:11] Raymond_: i don't know then. i'd use a debugger :P [13:55:26] DanielK_WMDE: ok. thanks anyway [13:55:43] DanielK_WMDE: Denny_WMDE: there are a bunch of names that might be improved in the deserialization code now; it is however not fully clear what the final structure is going to be, and I don't have better ideas for the names ATM. Given this can very easily be changed when wrapping up this feature, we can just defer till then [13:56:42] New patchset: Daniel Kinzler; "Factor string normalization functions out of Utils." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72078 [13:57:17] JeroenDeDauw1: maybe start a brain storming on the names on the mailing list? [13:58:19] New patchset: Daniel Kinzler; "Factor string normalization functions out of Utils." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72078 [13:58:32] New review: Daniel Kinzler; "rebased" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72078 [13:58:34] JeroenDeDauw1: ok. i would appreciate a small code comment with a todo to that effect [13:58:53] DanielK_WMDE: did you change anything significant to https://gerrit.wikimedia.org/r/#/c/72078/ ? [13:58:54] New patchset: Daniel Kinzler; "Move search key generation to TermSqlIndex." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72079 [13:59:09] New patchset: Daniel Kinzler; "(bug 46867) trim bad utf-8 sequences before normalizing." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/70139 [13:59:21] DanielK_WMDE: err, no, in person discussion is probably better [13:59:27] DanielK_WMDE: firebug shows me: "SyntaxError: JSON.parse: unexpected characte" and Fatal error: Cannot use object of type stdClass as array in D:\F_Programmierung\xampp\htdocs\core\extensions\Wikibase\lib\includes\PropertyInfoDataTypeLookup.php on line 70
[13:59:34] On the mailing list people are not going to bother to properly understand the code to begin with [13:59:45] New patchset: Micha? ?azowik; "(bug 40810) Extend SimpleSiteLink by badges." [mediawiki/extensions/WikibaseDataModel] (master) - https://gerrit.wikimedia.org/r/72725 [14:00:03] JeroenDeDauw1: no, minor fixes only (i broke client tests) [14:00:33] Raymond_: ah! fatal error! [14:00:39] Denny_WMDE: I have several other such TODOs. There is however no clear place to put those. Could create bugzilla items, but considering the scope, this is massive overhead [14:00:55] aye [14:01:11] you probably have a readme? even there is fine [14:01:16] Raymond_: that's very new code, not yet tried much. will check right away [14:01:20] it's not a strong request anyway, just an idea [14:01:28] Change merged: Jeroen De Dauw; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72078 [14:01:38] DanielK_WMDE: thanks [14:01:42] Change merged: Jeroen De Dauw; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72079 [14:02:08] Raymond_: did you run update.php? [14:02:23] DanielK_WMDE: I try to realize a project of a customer with wikidata... I know it's dangerous to use unstbale code :) [14:02:25] aude: yes [14:02:26] there is a new table, although it should work without it (that requires a setting) [14:02:30] Raymond_: ok [14:02:35] probably a bug then [14:02:55] Denny_WMDE: DanielK_WMDE: Going to discuss some design stuff with Danwe whenever he shows up related to the deserialization code, naming will be included in that [14:03:12] Raymond_: please show me what you see on line 120 from PropertyInfoTable.php [14:04:42] DanielK_WMDE: Denny_WMDE: I'm a bit mystified by the confusion on https://gerrit.wikimedia.org/r/#/c/71543/ Any idea by what it is caused? Different understanding of terminology? [14:05:04] DanielK_WMDE: $info = json_decode( $res, true ); [14:05:16] New patchset: Micha? ?azowik; "(bug 40810) Extend SimpleSiteLink by badges." [mediawiki/extensions/WikibaseDataModel] (master) - https://gerrit.wikimedia.org/r/72725 [14:05:36] Raymond_: ok, that's strange, then... that should return an array. wtf? [14:06:27] New patchset: Micha? ?azowik; "(bug 40810) Extend SimpleSiteLink by badges." [mediawiki/extensions/WikibaseDataModel] (master) - https://gerrit.wikimedia.org/r/72725 [14:06:38] Raymond_: can you try to find out what exactly getPropertyInfo is returning? and what class $this->infoStore is an instance of? In PropertyInfoDataTypeLookup, i mean [14:06:52] maybe the table is not populated? [14:07:00] although that should not throw a fatal [14:07:23] JeroenDeDauw1: when you said "The web API is part of the presentation layer." and should not have a certain functionality, DanielK_WMDE and hoo thought you meant that it should be moved up, outside of the API [14:07:44] whereas you meant to move it down, deeper inside the code, and not have it in the API [14:07:49] JeroenDeDauw1: it was not clear that you were talking about a code factoring issue. to me it sounded like you were arguing against having this feature at all [14:08:25] JeroenDeDauw1: it would have helped if you had suggested a solution - saying "move the normalization code to a separate class" would have made it obvious. [14:08:31] but then, to you it already was obvious... [14:09:06] and yes, what Denny_WMDE said. nicely analysed, thanks! [14:12:25] Raymond_: got it! [14:12:30] fix upcoming [14:12:40] DanielK_WMDE: great! [14:12:48] :| mhh ok [14:13:19] hm, this is a blocker i guess :/ [14:15:05] New review: Jeroen De Dauw; "(1 comment)" [mediawiki/extensions/WikibaseDataModel] (master) C: -1; - https://gerrit.wikimedia.org/r/72725 [14:22:25] So I tested everything, except the happy path behaviour... what a strange world [14:27:58] Raymond_: quick fix: in the PropertyInfoTable, find the *other* call to json_decode, and add "true" as the second param. [14:28:37] Raymond_: you may have to restart memcached to get rid of broken stuff in memory. [14:30:20] DanielK_WMDE: yeah! works. you are my hero of the day :) [14:35:45] Raymond_: thanks for reporting, this would have been nasty in production! [14:36:02] * DanielK_WMDE wonders why this isn't failing all over the place [14:36:26] ok gerrit. why the FUCK do you want to push 3 commits when i only made one? [14:39:06] New patchset: Daniel Kinzler; "(bug 51040) Fix json decode in PropertyInfoTable." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72728 [14:39:58] aude: blocker ---^ [14:40:08] Abraham_WMDE: would you put that one on the board please? under "feedback" [14:40:33] bug 51040: PropertyInfoTable decodes JSON to object instead of array [14:40:52] with a pretty red dot [14:41:58] DanielK_WMDE: ok [14:42:08] DanielK_WMDE: done [14:43:05] DanielK_WMDE: 51040 should be assigned, right? [14:47:11] Abraham_WMDE: yes, sorry [14:47:17] JeroenDeDauw1: "var will get turned into string"? whut? [14:48:59] New patchset: Daniel Kinzler; "(bug 46867) skip bad search keys and report them." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/70140 [14:51:43] addshore: Errors parsing repo/Wikibase.i18n.php ? [14:51:53] I missed a single '>' ;p [14:52:12] not exactly sure how... [14:52:17] but i did :) [14:56:55] JeroenDeDauw1: https://gerrit.wikimedia.org/r/#/c/72714/ ? [14:57:23] Salut, il y a-t-il quelqu'un de français ? [14:57:30] svp [14:58:01] un peu, Ninayeah79 [14:58:13] maybe hashar can help [14:58:26] depends on the question :) [15:00:00] J'ai crée une page du nom de Tom Guiry (un acteur américain) mais le nom principale reste Talk:Q13669823 ? Que faire pour le changer ? :O :) [15:01:10] ca y'est la page de tom guiry http://www.wikidata.org/wiki/Q13669823 [15:01:38] et le nom du la page francais est tom guiry [15:01:40] DanielK_WMDE: go ahead , I am listening [15:03:16] ok wait [15:03:19] je donne un nome anglais [15:04:20] Ninayeah79: qu'essaie tu de faire ? [15:04:35] Denny_WMDE: of course I have zero clue how Wikidata works :-] I am not really going to be helpful *smile* [15:05:03] Change merged: jenkins-bot; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72728 [15:05:10] hashar: i have the domain knowledge [15:05:11] J'aimerais changer le nom principal. Normalement ce serait Tom Guiry mais là c'est Talk:Q13669823... [15:05:18] hopefully it is already resolved with my terrible french :) [15:05:28] what is the nom principal? [15:05:59] ok I will try to speak english maybe; :) [15:06:40] Principal name --> Tom Guiry but Talk:Q13669823 and I would like to change that in Talk:Q13669823.. [15:06:52] why the heck am I getting Fatal error: Class 'Wikibase\Test\EntityTest' not found in [...]/WikibaseDataModel/tests/phpunit/Entity/ItemTest.php on line 52 [15:06:55] on master [15:07:10] New patchset: Liangent; "Label and description serialization now accepts LanguageFallbackChain as the language option" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72225 [15:07:36] aaah [15:07:39] no, you cannot [15:07:42] sorry [15:07:57] talk always shows the ID [15:07:58] could be a feature request [15:08:16] Denny_WMDE: sounds like it. we even change the title of the history page [15:08:20] okey i don't understand all [15:08:20] lazowik: checking... [15:08:36] thanks [15:08:40] Ninayeah79: c'est ne pas possible, sorry [15:08:48] When production code proves you messed up your test... /facepalm [15:09:02] hey [15:09:02] on master [15:09:03] DanielK_WMDE: whut what? [15:09:18] Ninayeah79: le talk page utilize le ID, le nombre avec Q [15:09:37] Denny_WMDE: that file has more useful contents in one of the follow up commits :p [15:09:47] ok. ? :) [15:09:57] Ninayeah79: it is a good idea [15:10:22] New patchset: Liangent; "Include preferred labels / descriptions for entities in JS on EntityView" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72226 [15:11:06] New review: Liangent; "need to rebase to master" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/72226 [15:11:26] lazowik: my buess is that your copies of Wikibase and WikibaseDataModel are out of whack. make sure you have latest master of both (and no leftover files from older versions) [15:11:42] will try [15:11:45] lazowik: ItemTest and EntityTest should both be in WikibaseDataModel, not Wikibase [15:11:57] anyway, works fine for me [15:12:11] they are [15:12:22] but if that's on my side [15:12:28] then that's my problem ^^ [15:12:29] lazowik: cd into WikibaseDataModel, and type "phpunit" [15:12:40] the same [15:12:44] o_O [15:12:47] ok, that'S very odd [15:12:49] works fine for me [15:13:02] Ninayeah79: i made a feature request https://bugzilla.wikimedia.org/show_bug.cgi?id=51044 [15:13:17] Ninayeah79: one day it should be as you suggested it :) [15:13:18] git shows no changes [15:14:29] probably something with my phpunuit [15:14:59] I get whola lotta question marks before that [15:15:22] o_O [15:15:28] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72714 [15:15:46] lazowik: OK (539 tests, 1368 assertions) [15:15:59] ... [15:17:03] phpunit --version ? [15:17:03] Denny_WMDE : thank you :) [15:17:03] The number of assertions in Ask is more leet now I finished the deserialization stuff (556 tests, 1337 assertions) [15:17:03] Ninayeah79: thanks for reporting [15:17:03] JeroenDeDauw1: :D [15:17:06] lazowik: 3.7.19 [15:19:07] New patchset: Liangent; "ApiGetEntities now accepts a new parameter, contextlanguage." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:19:22] New patchset: Jeroen De Dauw; "Added QueryDeserializer" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72731 [15:19:31] New review: Liangent; "rebase+test." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:20:56] DanielK_WMDE: for your last comment on https://gerrit.wikimedia.org/r/#/c/72260/ patch 3: Denny_WMDE doesn't like it :/ [15:21:36] liangent: usually DanielK_WMDE is more right than me on coding stuff [15:21:39] it's so complicated. I stop but it does not matter. bye bye [15:21:42] let's see what it is about... [15:21:53] DanielK_WMDE: and we may need to care api users consuming xml [15:21:58] Ninayeah79: sorry to hear. we try to make it easier. [15:22:20] it's impossible to write 'de-ch:{...,'language':'de'} with xml [15:22:46] but for qqc it's only consumed by our ajax frontend, using json [15:22:52] ^^ It's the english ;) [15:23:00] but you can write de-ch|en-uk, i.e. have a literal pipe [15:23:21] Ninayeah79: oh, i hoped our french interface is OK [15:23:44] Ninayeah79: but yeah, we need more documentation [15:24:33] yeah maybe a little bit more [15:26:44] New review: Jeroen De Dauw; "Dare I remark that this is again adding domain logic into the presentation layer? Please keep it in ..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:28:36] DanielK_WMDE: indeed looks loke my phpunit is broken [15:31:10] * addshore wishes phpunit ran faster on his laptop [15:38:06] nope [15:38:17] it's just too strange [15:38:34] I can't even make list-groups [15:40:56] aude: hello [15:41:27] New patchset: Liangent; "Label and description serialization now accepts LanguageFallbackChain as the language option" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72225 [15:42:00] hi pragunbhutani [15:42:36] hoo|away: your change to some test (the one fixed a failure in master) introduced so many skip messages [15:42:41] hoo|away: like https://integration.wikimedia.org/ci/job/mwext-Wikibase-client-tests/1454/console [15:42:59] hoo|away: so I always have to click " Full Log " to see what's going wrong [15:45:12] New patchset: Liangent; "Merge commit '5dbdfb3c5032e24cf4d042959844256f1550c743'; commit '1907ee0ffcd9f99fd4221fdee796051a2084d3e6'" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72257 [15:45:29] aude: I'm back on entity view [15:45:33] and a little stumbped [15:45:36] *stumped [15:45:42] ok [15:46:01] New patchset: Liangent; "Include preferred labels / descriptions for entities in JS on EntityView" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72226 [15:46:51] first of all, am I to define a new class for getHtmlForClaims? [15:47:15] getHtmlForClaim (one claim) [15:47:32] we can look at the getHtmlForClaims later [15:47:37] New patchset: Liangent; "ApiGetEntities now accepts a new parameter, contextlanguage." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:48:12] ah yes, I always get confused between the two [15:48:22] means we should probably change the naming as well [15:48:32] sure [15:49:01] so now, would our class need to extend anything? [15:49:10] no [15:49:10] New patchset: Liangent; "Include preferred labels / descriptions for entities in JS on EntityView" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72226 [15:49:21] or can it straightaway be abstract class ClaimGenerator [15:49:50] why would it be abstract? [15:50:32] JeroenDeDauw1: when i put comments in the code and merge, do you still actually see them? [15:50:46] ye [15:50:48] ( i know that you *can* see them, the question is, do you see them, or just move on? ) [15:50:49] Denny_WMDE: ^ [15:50:56] aude: I'm not sure but i thought it wouldn't have to be instantiated? [15:51:13] New review: Denny Vrandecic; "(1 comment)" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72715 [15:51:17] we would instantiate it and give the class any dependencies [15:51:17] Denny_WMDE: I have a folder in my gmail with the gerrrit stuff [15:51:28] New review: Denny Vrandecic; "There seems to be a lot of code repetition going on in QueryOptionsDeserializer.php, SelectionReques..." [mediawiki/extensions/Ask] (master) C: 2; - https://gerrit.wikimedia.org/r/72715 [15:51:29] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72715 [15:51:46] JeroenDeDauw1: and you read it? :) [15:51:49] New patchset: Liangent; "ApiGetEntities now accepts a new parameter, contextlanguage." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:51:56] ah, okay, giving it dependencies at the time of instantiating, like you'd mentioned before? [15:51:59] dependency injection [15:52:17] pragunbhutani: yes [15:52:37] New patchset: Liangent; "ApiGetEntities now accepts a new parameter, contextlanguage." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:52:39] I'm already getting sick of phpunit [15:54:24] I [15:54:25] New patchset: Liangent; "ApiGetEntities now accepts a new parameter, contextlanguage." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:54:38] I'm guessing I'll need the valueFormatter variable [15:54:48] * aude looknig at the code [15:55:32] New review: Liangent; "@Jeroen De Dauw: does it look cool to create another newFromContextAndLanguage? and it's even only f..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [15:56:31] liangent: I don't think I've introduced those [15:56:47] I've only introduced a single markTestSkipped AFAIR [15:56:56] hoo: hmm [15:57:09] I don't really remember what you touched [15:57:49] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72717 [16:00:38] New patchset: Liangent; "Include preferred labels / descriptions for entities in JS on EntityView" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72226 [16:01:00] pragunbhutani: injecting the value formatter in the constructor looks the right thing to do [16:02:46] DanielK_WMDE: care to give the draft at https://gerrit.wikimedia.org/r/#/c/72528/ a once over and check my sanity? still more to do.. [16:02:52] aude: so all the constructor has is $this->valueFormatters = $valueFormatters? [16:03:13] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72718 [16:03:16] for now yes [16:03:24] we might want to add more later, but not yet [16:04:47] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72723 [16:05:47] pragunbhutani: looks like what we actually need is the ValueFormatterFactory [16:05:48] and in EntityView, on top there's a list of things we 'use' in EntityView [16:05:54] Change merged: Denny Vrandecic; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72731 [16:06:03] $valueFormatters (which could use a nicer name in the new class) [16:07:17] pff [16:07:30] it gets "funnier" and "funnier" [16:07:41] aude: I didn't get what you mean when you say we need the ValueFormatterFacroty [16:07:59] EntityTest.php gets loaded before [16:08:12] as in, we'll have to use ValueFormatters\ValueFormatterFactory [16:08:14] ? [16:08:16] *decides he is also going to review and comment on thats draft* [16:08:39] pragunbhutani: it's one of the class member variables in entity view [16:09:21] yes we need that [16:09:27] oh the $valueFormatters is a variable of type valueFormatterFactory [16:09:29] I see [16:09:52] DanielK_WMDE: do you want more suprises? [16:09:54] it's poorly named [16:09:58] we can do better in the new class [16:10:02] true, we'll change that [16:10:08] oh [16:10:14] he's not here [16:10:26] nooo, he is [16:10:37] why am I writing to myself? [16:10:49] aude: so to come again from the top, I'll create the new class, add it to the list of classes and then have EntityView use ClaimGenerator [16:11:12] in which our getHtmlForClaim will be a public member function? [16:11:17] how about ClaimHtmlGenerator [16:11:22] it's not creating the claim itself [16:11:34] that's more accurate, yes [16:12:18] and what all does our ClaimHtmlGenerator need to use? [16:12:33] Html, Language, MWException [16:13:51] pragunbhutani: i am not sure [16:14:00] whichever things used in that function [16:14:23] yeah that's how I got these [16:14:41] so I'll just use the obvious ones to begin with and we can let the error messages guide us from there? [16:14:53] lazowik: my computer is usually online, but i'm not always in front of it :) [16:14:54] sure :) [16:15:11] also beware about use of namespaces in wikibase [16:15:29] value formatters is in its own namespace [16:15:41] Change merged: Jeroen De Dauw; [mediawiki/extensions/WikibaseQuery] (master) - https://gerrit.wikimedia.org/r/72523 [16:15:50] oh yes, I'll see how it's done in EntityView and use that to guide me [16:16:07] ok [16:16:11] I'm going to clone the entire installation on my system first [16:16:19] aude: I broke stuff yesterday :p [16:16:26] directly after including WikibaseDataModel/tests/phpunit/Entity/EntityTest.php I get a lot of question marks [16:16:26] oh no :( [16:16:34] back on track! [16:16:50] hey Danwe_WMDE [16:16:52] and then WikibaseDataModel/tests/phpunit/Entity/ItemTest.php fails to load with mentioner error [16:17:18] *mentioned [16:17:35] aude: basically what I've realized is I need one copy to hack on and one copy to push the final changes to gerrit [16:17:48] or a branch [16:17:50] silly me [16:17:53] a branch [16:17:56] that's easiest [16:18:04] aye, I'll do that [16:18:10] that's what branches are for! [16:18:28] all praise git branch! no wait! hail git stash! [16:18:39] DanielK_WMDE: that's why I still count myself as an amateur developer :) [16:18:57] * DanielK_WMDE makes a new branch for about every thought [16:18:58] DanielK_WMDE: About the API Getentities... can you give pointer on how to refactor it? (Class names, in which component, ...)? ;) [16:19:07] * pointers [16:19:16] DanielK_WMDE: I'll get in the habit of using that practise [16:19:28] ooooh, i got solr working with geodata extension :) [16:19:52] * aude see how to hook wikidata into it [16:20:01] [travis-ci] wikimedia/mediawiki-extensions-WikibaseQuery#8 (master - b03c7b8 : jeroendedauw): The build has errored. [16:20:01] [travis-ci] Change view : https://github.com/wikimedia/mediawiki-extensions-WikibaseQuery/compare/c6811a3148ea...b03c7b895899 [16:20:01] [travis-ci] Build details : http://travis-ci.org/wikimedia/mediawiki-extensions-WikibaseQuery/builds/8892846 [16:20:25] hoo: it'd suggest something like ItemByTitleHelper, and put it into the api directory. It may take an ApiMain object in the constructor, so it inherits the api's context, if needed. [16:20:54] other than that, it's responsible for taking the API parameters, and giving you a list of EntityId objects. [16:21:02] oh, right, you'll need ApiMain for error reporting. [16:21:09] the helper would be api-specific, so no problem [16:21:14] ah ok [16:21:35] hoo: the nice tr hing is: you can test title resolution in isolation, and you can easily recycle the code in other api modules [16:21:40] I already feared I had to separate that totally... which would have let to much more complexity [16:21:50] changing inheritance is messy, adding a helper object as a member is easy [16:22:17] I don't really think that needs testing in isolation, the API module test should cover that, but the re-usability is a point [16:22:20] having the helper not know about api concepts looks "clean", but leads to a ton of messy glue code, imho [16:22:53] Yeah... I would need to do a lot of return value analyzing and stuff in the API module then [16:23:10] hoo: testing in isolation helps a lot. for one thing, api tests are horribly slow. and it's often not obvious why something fails. and even debugging into the call is hard, because there's so much cruft on the stack [16:23:34] * addshore emphasises the word slow used above ^^ [16:23:44] hoo: also, think about it the otrher way around: the API module can then be tested without the need to access the database. [16:23:54] just inject a fake title resolver, and a fake entity lookup - done! [16:25:34] pragunbhutani: when you have something to submit to gerrit, you can use the -D flag with git-review to mark it as a draft [16:25:44] then you can add me and other people as reviewers [16:25:52] it can be a work in progress [16:25:58] * addshore doesnt used git-review :O [16:26:02] aude: okay [16:26:09] addshore: oh really? [16:26:28] addshore: makes things a lot easier, though it sometimes gets confused [16:26:46] also, the code sucks [16:26:46] hehe :P [16:27:31] git push origin HEAD:refs/public/master isnt that hard to type ;p [16:28:02] DanielK_WMDE: which code? :O [16:28:31] addshore: git-review's. i had the misfortune of hunting a bug in there once [16:29:44] addshore: https://bugs.launchpad.net/git-review/+bug/1177429 [16:29:54] admire the suckyness [16:31:27] hah [16:46:35] Change merged: Daniel Werner; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72535 [16:51:23] does anybody know what mean question marks during including php class to phpunit? [16:51:27] a lot of them [16:51:44] later the class which the file contains is not recognized [17:01:34] lazowik: err, hold on. phpunit often gives "class x could not be found in x.php", even though that is the exact file the class is defined in. that error is misleading. [17:01:56] what it actually means is: no *tests* found. the error happens if the class isn't a test and/or is abstract [17:01:57] that's not the case [17:02:13] well, if you try to run EntityTest directly, this is what you get: Class '/home/danielk_wmde/www/wikidata/extensions/WikibaseDataModel/tests/phpunit/Entity/EntityTest' could not be found in '/var/www/daniel/wikidata/extensions/WikibaseDataModel/tests/phpunit/Entity/EntityTest.php'. [17:02:33] lazowik: i just though i'd mention it :) [17:02:35] but it fails on ItemTest.php on line 52 [17:02:53] very odd [17:03:09] I added echo'es around phpunit loading files [17:03:12] lazowik: are you using symlinks? the autoloader sometimes has trouble with that [17:03:21] nope [17:03:27] then i'm out of ideas :) [17:03:40] and _during_ loading EntityTest.php I get a lot of quetion marks [17:03:48] and some "* [17:04:26] w00t solr geosearch works :) [17:04:27] it's between my two debugs: first is before require_once second after [17:04:53] that means thaaaat much closer to having solr for wikidata search [17:04:53] (in phpunit fileloader) [17:05:07] and geodata search using wikidata [17:07:23] Catchable fatal error: Argument 1 passed to Wikibase\TermSqlIndex::__construct() must be an instance of Wikibase\StringNormalizer, string given [17:07:27] known dependency issue again? [17:07:49] liangent: it's new code [17:08:02] aude: so? [17:08:05] must be yet another bug or maybe we need more of DanielK_WMDE 's follow up patches merged [17:08:34] o_O [17:08:50] i think it's unrelated to his other patches [17:08:55] liangent: version mismatch between lib and client, or some such? [17:09:14] DanielK_WMDE: shouldn't be some mismatch I guess, because they're in the same git repo [17:09:41] liangent: what did you do to get that? [17:09:46] api? [17:09:49] client? [17:09:55] repo? [17:10:03] wait... i see a bad constructor call in DirectSqlStore [17:10:05] aude: simply viewing a page [17:10:08] client page [17:10:10] oh, ick [17:10:12] wtf? why didn't that show up? [17:10:14] with a wikibase eneity [17:10:15] entity [17:10:18] i'll fix in a minute [17:10:28] DanielK_WMDE: do you need a stack trace [17:10:33] no [17:14:02] DanielK_WMDE: could you describe how you would do the api test helper instead of the base? [17:20:36] DanielK_WMDE: dafuq? grep sees EntityTest.php as binary... [17:20:36] Binary file ./tests/phpunit/Entity/EntityTest.php matches [17:21:56] aude, liangent: sorry, i'm a bit tied up in family stuff. fix has to wait a few hours. basically, the constructor call in DirectSqlStore has to be the same as in SqlStore [17:22:52] addshore: sorry, not now. family stuff [17:23:09] np :) [17:23:09] DanielK_WMDE: do you have a known good version I can checkout and test other changes? [17:23:11] eg HEAD~10? [17:23:21] * aude busy figuring out how my toollabs account got corrupt :o [17:23:45] New review: Daniel Werner; "(1 comment)" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66271 [17:24:17] aude: what did you do? [17:24:31] * aude did nothing! [17:24:34] * aude innocent :) [17:27:25] whoops > missclick > http://www.wikidata.org/w/index.php?title=Q1&diff=55229408&oldid=51177525 [17:27:31] New patchset: Jeroen De Dauw; "Move generic (de)serialization code into (Des/S)erializers namespace" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72748 [17:33:14] Change merged: Daniel Werner; [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72748 [17:41:19] HA [17:41:25] gotya [17:45:08] New patchset: Daniel Werner; "Added Wikibase\EntityContent::testGetParserOutput" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66971 [17:46:17] New patchset: Liangent; "Label and description serialization now accepts LanguageFallbackChain as the language option" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72225 [17:50:06] JeroenDeDauw1: what are the characters around WikibaseDataModel/tests/phpunit/Entity/EntityTest.php line 567 ? [17:50:29] on mac they cause the file is treated as binary [17:50:43] lazowik: hehe [17:50:44] and class is not properly loaded to phpunit [17:50:51] That is PHP serialization [17:50:57] Of some old version of the object [17:51:06] Mhh that sucks [17:51:12] in vim I see them as ^@ [17:51:26] in sublime text as nil [17:51:40] I guess we could have 3 files containing the stings, and then file_get_contents them [17:52:08] this is output of serialization? [17:52:20] so why don't just call the function there [17:52:26] instead of hardcoding? [17:52:46] New patchset: Liangent; "Label and description serialization now accepts LanguageFallbackChain as the language option" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72225 [17:54:01] New patchset: Daniel Werner; "Allow rendering of entities without an ID." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72711 [17:54:12] New patchset: Liangent; "Merge commit '5dbdfb3c5032e24cf4d042959844256f1550c743' into KNOWN_GOOD_X" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72257 [17:54:37] JeroenDeDauw1: cannot these bytes be represented differently [17:54:39] New patchset: Liangent; "Include preferred labels / descriptions for entities in JS on EntityView" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72226 [17:54:44] New patchset: Liangent; "ApiGetEntities now accepts a new parameter, contextlanguage." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [17:54:45] http://stackoverflow.com/questions/8556744/why-does-phpunit-give-me-an-assertequals-failure-for-apparently-identical-string [17:54:48] take a look here [17:55:13] yup [17:55:14] \x00 [17:57:25] New patchset: Liangent; "Allow mw.wikibase.label( ) to find labels written in variants" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72751 [17:58:18] who's johl? [17:58:20] I mean gerrit name [17:59:20] or who can review this https://gerrit.wikimedia.org/r/#/c/72751/ ? [17:59:52] Change merged: Daniel Werner; [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72711 [18:00:22] JeroenDeDauw1: mwahahahahahahahaha [18:00:26] fixed it! [18:00:49] replaced all real nils with \x00 [18:00:56] changed string format to " [18:01:00] New patchset: Daniel Werner; "Added Wikibase\EntityContent::testGetParserOutput" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66971 [18:01:07] & escaped all " in string [18:01:16] New patchset: Daniel Werner; "Added Wikibase\EntityContent::testGetParserOutput" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66971 [18:01:21] * lazowik feels like a hacker [18:01:26] (for a second) [18:01:53] DanielK_WMDE: ^ [18:02:54] New patchset: Daniel Werner; "Added Wikibase\EntityContent::testGetParserOutput" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/66971 [18:13:39] New review: Liangent; "@Daniel Kinzler: then it wouldn't allow me to adapt JavaScript one by one to get them ready to read ..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72260 [18:16:46] New patchset: Jeroen De Dauw; "Move out (de)serialization code to Serializers [DO NOT MERGE]" [mediawiki/extensions/Ask] (master) - https://gerrit.wikimedia.org/r/72757 [18:19:54] New review: Liangent; "If we use some "unusual" one and someone is iterating every key/value in labels array and expecting ..." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72258 [18:20:14] eh [18:20:20] some test fail then [18:22:03] New patchset: Liangent; "TEST FOR UNIT TEST FAILURES" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72758 [18:26:43] DanielK_WMDE: still around? [18:36:32] JeroenDeDauw1: hey, I will try to get your Zuul changes deployed later tonight [18:36:44] hashar: err wait [18:36:50] JeroenDeDauw1: right now I am busy trying to trick my daughter into going back to bed :-D [18:37:07] hashar: the repo does not exist yet, I'm awaiting its creation [18:37:08] Timo / marktraceur could handle it as well :-) [18:37:10] ahh [18:37:12] The code is there already tho [18:37:17] are you there tonight ? [18:37:19] As soon as its created, I can import [18:37:34] No, I'll be afk in a bit [18:37:37] ok [18:37:42] I can get you the repo created tomorrow [18:37:58] and we can deploy the jenkins jobs and zuul triggers while we are it [18:37:59] Cool :) [18:38:05] Sure [18:38:19] JeroenDeDauw1: now fixed for real [18:38:30] added detect_unicode = Off to php.ini [18:38:46] JeroenDeDauw1: we should probably fill a bunch of bugs as well following our mail exchanges :D [18:40:08] hashar: yeah [18:40:22] lazowik: you earned the 1337 h4x0r badge now [18:40:29] tahnks :) [18:40:32] *thanks [18:40:42] so much win ^^ [18:41:15] heh, won badge working on badges :D [18:41:19] congratulations lazowik ! [18:41:59] * lazowik proudly presents new badge [18:54:01] on master all test should pass? [19:09:31] DanielK_WMDE: I prototype is working, I've tested with the command line client. But the REST API is giving me some problems. I'm checking it out, will let you know soon. [19:09:38] The prototype* [19:25:08] New patchset: Micha? ?azowik; "(bug 40810) Extend SimpleSiteLink by badges." [mediawiki/extensions/WikibaseDataModel] (master) - https://gerrit.wikimedia.org/r/72725 [19:25:24] is DanielK_WMDE back? [20:11:30] liangent: re [20:11:52] nileshc: ok, let's chat tomorrow. [20:12:22] btw, i'll be offline from thursday. will be back on monday. [20:12:34] DanielK_WMDE: Okay, cool. I'll try some more on this in the morning. Too sleepy. :/ [20:12:41] not sure whether i'll be able to check mail [20:13:10] nileshc: enough for today, then [20:13:18] DanielK_WMDE: phpunit failed because of nul characters in the file [20:13:25] lazowik: o_O [20:13:30] which were part of php-serialized string [20:13:34] are they supposed to be there? [20:13:37] yep [20:13:42] huh [20:13:47] never saw that problem [20:13:57] adding detect_unicode = Off to php.ini solved that [20:14:00] DanielK_WMDE: that &usefallback : I don't think it looks nice to mix context / user / request data into it [20:14:09] oh, right - i ran into problems with that too. sqlite doesn't like null characters in string literals :D [20:14:52] found out only because grep treated the file as binary [20:14:59] so I started searching why [20:15:03] liangent: i thought it should just be a yes/no flag. if it's set, fallback will be applied based on each language in the language param [20:15:12] that was quite lucky [20:15:20] ok, enough of that :) [20:15:31] lazowik: indeed! i wonder why your phpunit is different though [20:15:54] liangent: no need to pass any additional info, i think... [20:15:55] maybe you arelady have detect_unicode = Off ? [20:16:37] how would i find out? [20:16:55] no. my contextlanguage attempt include babel from user etc [20:16:59] maybe phpinfo() [20:17:17] it won't look nice to mix it into fallback specified for *languages* [20:17:25] liangent: i know. i'm saying that i do not think this is needed [20:17:51] but if I want to show best fallback chain for *user*, I still need it [20:18:52] liangent: hm... [20:19:24] i guess you are right - but that could be covered by asking for labels in a pseudo-language, like qqc... [20:19:55] or "*preferred*" or whatever [20:20:31] DanielK_WMDE: and index.php?uselang= still need to be passed in somehow [20:20:46] that's my *current* &contextlanguage= [20:20:57] aude, liangent: btw, have you done anything about the DirectSqlStore error? i'll work on it now if you haven't. [20:21:22] DanielK_WMDE: I haven't [20:21:45] I just found a good version and rebased some of my patches to avoid the error [20:22:58] liangent: i was thinking contextlanguage would not be necessary in the api call (though it needs to be known in the JS code), because you would just ask for labels in that language, and say that fallbacks should be applied. that would indeed exclude babel info though [20:24:01] so, with my solution, you can make use of the context language with "pure" language fallback, or use qqc for user-specific fallback (but ignoring the current context language). [20:24:11] your solution allows for both at once. [20:24:19] am i getting that right? [20:25:53] liangent: to have both at once, we'll indeed need contextlanguage (with a single language code), or encoding this in the language parameter somehow (e.g. using something like "ru+babel" or whatever). [20:25:53] DanielK_WMDE: given my babel "en|zh-cn" uselang "zh-tw" known values in "en|zh-cn" [20:25:59] DanielK_WMDE: your api call? [20:26:14] expected api returned data? [20:26:20] can you give some example? [20:27:52] getLabels("zh-tw", usefallback) ---> zh-cn:"something". Assuming zh-cn is in the "pure" fallback chain for zh-tw. [20:28:21] but i do see your point [20:29:01] i was trying to avoid the additional parameter, but you are right that we'd loose the possibility to combine uselang info with babel info. [20:30:19] DanielK_WMDE: then abuse the language param to have ...&languages=xx|qqc:zh-tw|yy&... :p [20:30:32] it's worth thi9nking about whether that is really needed. also, the semantgic is strange... we really want to ask for content in that language, not supply it as a context when asking for content in another language [20:31:05] liangent: yes, i was considering that. see above: 'encoding this in the language parameter somehow (e.g. using something like "ru+babel" or whatever)'. [20:31:09] it's a possibility [20:31:37] i like it better because it's semantically clearer. on the other hand, ad hoc syntax stuff is icky. [20:31:54] yeah [20:32:20] my contextlanguage is not really some api for "real data fetching" [20:32:31] it's just something for presentation [20:32:42] ie fetched and directly displayed to users [20:32:43] let's think about the use case. [20:33:15] we want to see labels, for the present item and for linked items. [20:33:46] say my user language is de and i have en in babel. [20:34:04] i now set uselang=fr, because i want to see stuff in french to check something [20:34:22] hmm I ignore de in this case [20:34:28] so do you think I should consider [20:35:06] "i now set uselang=fr, because i want to see stuff in french to check something" with ULS this is usually done with setlang=fr, changing your user language at the same time [20:35:18] could be treated link a babel language. but usually, it will already be in the babel list anyway. also, one may use uselang precisely to override the user language... [20:35:34] ok [20:35:35] next [20:35:37] yes i know about setlang, i invented it :P [20:35:55] "invented" -> set a cookie. [20:35:59] anyway [20:36:56] so, i want to ask for labels in french, and tell wikibase to apply language fallback, while considering my babel info., [20:37:26] so perhaps i should just do: getLabel( language = "fr", fallback = "user" ) [20:38:15] if i want a label in a given variant, say de-ch, i'd do getLabel( language = "fr", fallback = "variant" ) [20:38:33] oh, right: the fallback parameter would be the same as your fallback modes in php. [20:39:14] if i wanted to get a label in a specific language and only exactly that language, i'd use getLabel( language="fr", fallback = "none" ). [20:39:24] which should be the default, for "data fetching" [20:40:35] user doesn't match some mode... [20:40:38] DanielK_WMDE: Going to Wikimania this year? [20:40:46] liangent: basically, we need to supply the fallback mode in addition to the desired language. if multiple languages are given, this is a bit awkward, but would still work. [20:40:51] even though i can't think of a good use for that [20:40:58] multichill: absolutely! [20:41:18] liangent: the "user" code matches FALLBACK_OTHER, no? [20:41:35] no. other just go through the system fallback chain for that language [20:41:39] liangent: i guess in the example,m the code should just be "all". [20:42:16] also FALLBACK_OTHER for user means I have to global $wgUser... [20:42:23] otherwise I don't know what user it is... [20:42:39] DanielK_WMDE: Any idea where you are staying? [20:42:42] doesn't that info come from the context? [20:42:56] multichill: not yet [20:43:01] the language entry point doesn't take a context now [20:43:07] i'll have to ask at the office [20:43:21] DanielK_WMDE: ok.. [20:43:24] Probably in Macau knowing your office :P [20:43:47] liangent: i'd propose getChain( language, mode, context ) [20:44:03] newFromLanguageAndContext ? [20:44:04] or multiple methods, one per mode [20:44:12] because depending on mode, we need different info [20:44:13] remember context contains another language... [20:44:33] yes, ignore it [20:44:40] :/ [20:44:45] actually, perhaps we don't want context there [20:44:49] perhaps we'd want the user object [20:45:36] will we want more later? [20:45:41] liangent: in the case of setlang, the languages will be the same. in the case of uselang, the user *asked* their language setting to be ignored. [20:46:22] uselang changes the language wrapped in context, right? [20:46:57] yes. but not for the getLabel call, since it's not set there. [20:47:10] actually, we could just set it. no idea whether that works with the api [20:47:14] but it doesn't matter [20:47:28] eh [20:47:30] we ask for a language, specify a mode, and supply the info needed to determin the chain for that mode [20:47:46] I'm getting lost in these DataModels DataValues and so on [20:47:49] "we ask for a language, specify a mode, and supply the info needed to determin the chain for that mode" at what level? [20:47:59] user->api module or api module->chain factory? [20:48:04] liangent: both. [20:48:11] is there any overview of that all? [20:48:25] liangent: though the additional info for building the chain is not used on the api level [20:48:46] it comes from the call's context (or more specifically, the user's settings) [20:48:48] and api just pass it on? [20:48:51] ok [20:49:05] api module fetch the info then pass it to factory? [20:49:09] lazowik: ask JeroenDeDauw1, but i doubt it :) [20:49:51] lazowik: DataValues are little things, like a time or a string. the WikibaseDataModel is the module that models entities, statements, etc [20:49:58] the "big" stuff [20:50:07] looks like I'll know all ins and outs of WD before I finish this bug [20:50:09] liangent: yes [20:50:40] lazowik: haha! that's how it goes... [20:52:36] DanielK_WMDE: so user gives api lang+mode, api adds user to make it lang+mode+user and pass it to factory [20:53:45] liangent: yes [20:54:19] i'd suggest to add the "any" mode to the mode parameter too, but that's a different story. [20:54:42] or more precisely user gives lang=lang1|lang2|lang3&mode=mode, api makes chain1=factory(lang1,mode,user),chain2=factory(lang2,mode,user),chain3=factory(lang3,mode,user) [20:55:06] then attach chainX to langX in returned keys [20:55:31] and tag their real lang in {'value':'xxx','language':'HERE'} [20:55:40] is this right? [20:58:54] liangent: yes, that sounds good to me! [20:59:14] * DanielK_WMDE is trying to fix the TermSqlIndex thing [20:59:16] DanielK_WMDE: btw it's still open to dos by listing a bunch of lang= and mode=all [20:59:30] asking the server to create a bunch of expensive fallback chains... [21:00:09] liangent: true. the number of languages should be limited, maybe based on mode (with fallback=none, it should be ok to ask for all languages) [21:00:18] btw, please call the paramter "fallback", not "mode". [21:00:22] "mode" could be anything [21:00:27] ok [21:04:07] New patchset: Daniel Kinzler; "Fix construction of TermSqlIndex in client." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72835 [21:04:13] it does respond. after a minute or two. [21:04:40] DanielK_WMDE: what "mode" should wbEntity and wbUsedEntities use? [21:07:54] wbUsedEntities=uselang,all,currentuser for sure [21:07:59] what about wbEntity? [21:14:56] New patchset: Micha? ?azowik; "(bug 40810) Extend SimpleSiteLink by badges." [mediawiki/extensions/WikibaseDataModel] (master) - https://gerrit.wikimedia.org/r/72725 [21:17:23] liangent: wbEntity will contain all languages (at least, that'S how it is at the moment) [21:17:44] you are injecting an additional qqc language there - that should be uselang,all,currentuser [21:18:05] other languages should be served "as is". [21:18:36] DanielK_WMDE: so this will be the only place for qqc in the future? with lang=lang1|lang2|lang3&mode=mode ? [21:18:43] liangent: if you use qqc or another pseudo-language, we have to check for it in input to EditEntiy etc, so we don't write it to the database [21:19:14] yes, i think so. ideally, we could even get rid of that... but i can't think how. [21:19:24] unless we introduce wbEntityInUserLang or some such [21:19:56] liangent: but... that stuff is in the parser output... it gets cached... [21:20:07] well, not at the moment, but it could/should. [21:20:18] well one of my original idea is to separate original (unfallbacked) data with fallbacked data [21:20:33] thinking about it, that will probably be needed [21:20:47] the ParserOutput must not depend on user-specific things [21:20:54] that poisons the parser cache [21:21:05] DanielK_WMDE: including registerJsConfigVars? [21:21:13] or whatever name I forgot it [21:21:16] yes. [21:21:20] whatever is in the object is cached [21:21:45] ouch [21:21:45] liangent: to add user-specific stuff, you have to intercept the ParserOutput when it gets added to the OutputPage. there's a hook for that [21:21:52] *then* you can add user-specific stuff [21:21:56] ok [21:22:03] someone told me registerJsConfigVars is not cached [21:22:14] sometime here iirc [21:22:30] liangent: well, don't take my word for it, double check [21:22:53] it has been a while since i looked. but from my understanding, the object is cached as-is, so it must not contain anything user specific [21:23:16] liangent: if that part wasn't cached, how would it be filled in later? it would be empty when the parser output comes from the cache... [21:23:51] liangent: uh... wait. registerJsConfigVars isn't in ParserOutput. where is it? [21:24:07] EntityView.php [21:24:22] yea, but where does entityview pout that info? [21:24:29] render [21:24:30] into the ParserOutput, or into the OutputPage? [21:24:39] in the output page, it's fine [21:24:40] in the parser output, it's not [21:25:13] liangent: the rendered output (html) goes into the parser output and is cached... but where do the JS vars go? [21:25:26] hmm outputpage [21:25:28] so it's find [21:25:30] fine [21:25:37] yea [21:25:39] *phew* [21:25:45] all calls are $out->addJsConfigVars)_ [21:25:46] () [21:25:58] yea, parser output doesn't have such a method [21:26:10] sorry for the confusion, i thought it did [21:26:11] and there's already [21:26:12] // tell JS whether the user can edit [21:26:12] $out->addJsConfigVars( 'wbUserCanEdit', $entityContent->userCanEdit( $user, false ) ); //TODO: make this a per-entity info [21:26:19] right [21:28:52] DanielK_WMDE: my line "well one of my original idea is to separate original (unfallbacked) data with fallbacked data" [21:29:13] if using qqc only for fallbacked data, we only need to care not to store qqc back [21:29:38] if fallbacked data is mixed in 'de':{'value':'xx','language':'en'} [21:29:49] we need to care every code trying to save 'xx' to de [21:30:13] even in user scripts, at the time we roll out this change [21:30:21] eg in wbUsedEntities [21:33:05] DanielK_WMDE: also I think qqc is already rejected by editing calls [21:33:13] as it's not in Utils::getLanguageCodes() [21:35:21] liangent: but it can still be used in the json structure passed to the editentity modeul [21:35:27] i don't know if we filter there [21:35:29] please check [21:36:59] filtered [21:37:18] EditEntity::checkMultilangArgs [21:37:23] if ( isset( $this->validLanguageCodes ) && !array_key_exists( $arg['language'], $this->validLanguageCodes ) ) { [21:37:23] $this->dieUsage( "unknown language: {$arg['language']}", 'not-recognized-language' ); [21:37:31] $this->validLanguageCodes = array_flip( Utils::getLanguageCodes() ); [21:37:33] liangent: in wbEntity, only qqc would be using fallsback. but for whatever you get from getEntities, we'd have indede to make sure it gets handled correctly by EditEntity [21:37:40] i think we have to do that in any case [21:37:54] ah, good [21:38:04] then we also need to check key vs internal language code [21:38:19] (or just ignore the key) [21:40:07] DanielK_WMDE: but ... https://bugzilla.wikimedia.org/show_bug.cgi?id=51071 [21:40:57] DanielK_WMDE: that's not really good [21:41:06] there's converted keys [21:41:13] converted values [21:41:51] {'language':'zh-cn','source-language':'zh-tw','value':'something in simplified chinese [21:42:21] but qqc avoids this mess :p [21:42:47] hmm not completely [21:42:50] but more or less [21:45:10] New patchset: Micha? ?azowik; "(bug 40810) Extend SiteLink by badges." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72842 [21:47:27] New patchset: Micha? ?azowik; "(bug 40810) Extend SiteLink by badges." [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72842 [21:50:46] New patchset: Daniel Kinzler; "Adding tests for DirectSqlStore" [mediawiki/extensions/Wikibase] (master) - https://gerrit.wikimedia.org/r/72843 [21:56:44] New review: Daniel Kinzler; "needs rebase" [mediawiki/extensions/Wikibase] (master) C: -1; - https://gerrit.wikimedia.org/r/71595 [22:31:17] Hello. Would it be appropriate to put orthographic variants of terms in "Also known as" fields? [22:36:30] Well, of labels for pagenames rather.