Wiki source code of IRC Archive for channel #xwiki on 24 April 2012
Last modified by Vincent Massol on 2012/10/18 19:22
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | 00:23 <jvdrean> has joined #xwiki | ||
| 2 | 00:28 <polx> has quit | ||
| 3 | 00:51 <DrLou> has quit | ||
| 4 | 01:37 <jvdrean> has quit | ||
| 5 | 01:45 <Shaddox_> has joined #xwiki | ||
| 6 | 01:46 <Denis1> has joined #xwiki | ||
| 7 | 01:51 <Denis> has quit | ||
| 8 | 01:51 <Shaddox> has quit | ||
| 9 | 01:57 <npm_> is now known as <npm> | ||
| 10 | 01:58 <jamie_wiki> has joined #xwiki | ||
| 11 | 01:58 <Shaddox_> has quit | ||
| 12 | 02:07 <jamie_wiki> I'm having a problem with a Class that has multiple Sheets bound and the attachmentSelector macro.. when you upload by browsing and selecting the attachment in one step it redirects using the 'inline' docAction. This seems to work with a single sheet, but fails with multiple sheets. | ||
| 13 | 02:10 <jamie_wiki> Humm.. actually I just removed the XWiki.SheetDescriptorClass with 'edit' action from the editing sheet and the inline docAction worked. (although now the view sheet is not activated) | ||
| 14 | 02:38 <cjd> has joined #xwiki | ||
| 15 | 02:52 <DrLou> has joined #xwiki | ||
| 16 | 03:04 <jamie_wiki> Where would I file a bug against the macro XWiki.AttachmentSelector? | ||
| 17 | 03:13 <@sdumitriu> Hi jamie_wiki | ||
| 18 | 03:13 <@sdumitriu> In the XE project (XWiki Enterprise) | ||
| 19 | 03:17 <jamie_wiki> Thanks, I found it! I reported XE-1156 and included a note with the minor change that I made in my local XWiki macro that fixed it. | ||
| 20 | 03:31 <jamie_wiki> When I imported the Attachment Selector Macro XAR after downloading it from the extensions wiki it imported as Macros.AttachmentSelector instead of XWiki.AttachmentSelector. Did the name change in the 4.0 release? | ||
| 21 | 06:02 <polx> has joined #xwiki | ||
| 22 | 06:21 <polx> has quit | ||
| 23 | 06:55 <mflorea> has joined #xwiki | ||
| 24 | 07:02 <Denis> has joined #xwiki | ||
| 25 | 07:02 <Denis1> has quit | ||
| 26 | 07:34 <rrodriguez> has quit | ||
| 27 | 08:03 <DrLou> has quit | ||
| 28 | 08:09 <tmortagne> has joined #xwiki | ||
| 29 | 08:31 <vmassol> has joined #xwiki | ||
| 30 | 08:48 <+tmortagne> sdumitriu: Hi | ||
| 31 | 08:48 <+tmortagne> did you had time to looks at http://jira.xwiki.org/browse/XE-1154 ? | ||
| 32 | 08:51 <jssolichin> has joined #xwiki | ||
| 33 | 08:53 <vmassol> Denis, sdumitriu: XE-1154 is a blocker for the 4.0 final release. Any progress? We really need to release 3.5.1 (most important, been awaited by lots of people) and 4.0 (we're lagging by more than a week) | ||
| 34 | 08:57 <vmassol> mflorea: I'm fixing the escape mistake on Welcome.xml | ||
| 35 | 08:57 <vmassol> thanks for noticing | ||
| 36 | 08:57 <vmassol> I tested it though so it's strange | ||
| 37 | 08:58 <vmassol> maybe I made last minute changes | ||
| 38 | 08:58 <+mflorea> np, I noticed while doing xar:format, I got more changes than I expected to :) | ||
| 39 | 08:58 <vmassol> mflorea: have you seen it break the home page because it displayed fine for me AFAIK? | ||
| 40 | 08:59 <+mflorea> it displays fine because browser are a bit smart | ||
| 41 | 08:59 <vmassol> it's nt just browser | ||
| 42 | 08:59 <+mflorea> i.e. they detect that > is not the end of a tag | ||
| 43 | 08:59 <vmassol> it's the XML tools we use to load the doc | ||
| 44 | 08:59 <vmassol> that's what is suprising me | ||
| 45 | 09:00 <+mflorea> probably they are not very strict | ||
| 46 | 09:00 <vmassol> (I'd have expcted them to fail) | ||
| 47 | 09:01 <CIA-160> Vincent Massol master * rdc1eee5 https://github.com/xwiki/xwiki-enterprise/commit/dc1eee50fc8642c711a1bee08c510dbc5bb43c52 / xwiki-enterprise-ui/src/main/resources/Main/Welcome.xml : [Misc] Fix invalid XML - http://git.io/ZXw-mQ | ||
| 48 | 09:03 <CIA-160> Vincent Massol stable-4.0.x * rf64bb4e https://github.com/xwiki/xwiki-enterprise/commit/f64bb4e070d33317eb00329f7b89f4e836e93649 / xwiki-enterprise-ui/src/main/resources/Main/Welcome.xml : [Misc] Fix invalid XML - http://git.io/cDP9Pg | ||
| 49 | 09:03 <vmassol> fixed, thanks | ||
| 50 | 09:04 <CIA-160> Marius Dumitru Florea master * r1aa14d0 https://github.com/xwiki/xwiki-enterprise/commit/1aa14d0d870bd6f8352eff2213ee272beaac3530 / xwiki-enterprise-ui/src/main/resources/XWiki/AttachmentSelector.xml : XE-1156: XWiki.AttachmentSelector does not work when Class has multiple Sheets bound - http://git.io/N_5uVQ | ||
| 51 | 09:04 <CIA-160> Marius Dumitru Florea stable-4.0.x * rf2aaf2d https://github.com/xwiki/xwiki-enterprise/commit/f2aaf2d829ac8b4eb8da43913fd89a8ca481243e / xwiki-enterprise-ui/src/main/resources/XWiki/AttachmentSelector.xml : XE-1156: XWiki.AttachmentSelector does not work when Class has multiple Sheets bound ... | ||
| 52 | 09:04 <+tmortagne> vmassol: > is actually valid according to http://www.w3schools.com/xml/xml_validator.asp but xml writers always escape it to be safe | ||
| 53 | 09:12 <+mflorea> sdumitriu: ping | ||
| 54 | 09:14 <rrodriguez> has joined #xwiki | ||
| 55 | 09:22 <rrodriguez> has quit | ||
| 56 | 09:25 <rrodriguez> has joined #xwiki | ||
| 57 | 09:39 <vmassol> tmortagne: I've jsut read http://www.w3.org/TR/xml11/#syntax | ||
| 58 | 09:39 <vmassol> the < char must be escaped but the > one may be escaped | ||
| 59 | 09:39 <vmassol> except for compat reason | ||
| 60 | 09:39 <+tmortagne> yep | ||
| 61 | 09:40 <vmassol> I learnt something today :) | ||
| 62 | 09:41 <sburjan> has joined #xwiki | ||
| 63 | 10:00 <rrodriguez> has quit | ||
| 64 | 10:01 <rrodriguez> has joined #xwiki | ||
| 65 | 10:04 <gdelhumeau> has joined #xwiki | ||
| 66 | 10:04 <DrLou> has joined #xwiki | ||
| 67 | 10:05 <rrodriguez> has quit | ||
| 68 | 10:12 <jvdrean> has joined #xwiki | ||
| 69 | 10:19 <jssolichin> has quit | ||
| 70 | 10:40 <Shaddox> has joined #xwiki | ||
| 71 | 10:49 <DrLou> has quit | ||
| 72 | 11:05 <jvelo> has joined #xwiki | ||
| 73 | 11:13 <vmassol> tmortagne: I'm coding the CTS this morning. I have almost a first version but just realized we don't have an event/1.0 parser. I think we need one. I've looked at http://rendering.xwiki.org/xwiki/bin/view/Syntax/XDOMXML but it's too verbose IMO. WDYT? | ||
| 74 | 11:15 <+tmortagne> vmassol: we can't parse the current event/1.0 syntax | ||
| 75 | 11:15 <+tmortagne> xdom+xml/current can be improved | ||
| 76 | 11:21 <vmassol> tmortagne: do you haven an example of what could not be parsed? | ||
| 77 | 11:24 <+tmortagne> vmassol: there is no escaping in event/1.0 syntax so you can't safely parse various bocks parameters | ||
| 78 | 11:27 <vmassol> indeed one or two tests may fail, but we could improve this easily by escaping what needs to be escaped | ||
| 79 | 11:27 <vmassol> I'm fine improving your XML format but I doubt it can be compact | ||
| 80 | 11:28 <+tmortagne> also every block as a custom way to display itself so it's a pain to write a parser while xdom+xml/current already support any future modification made to the XDOM so I would really prefer finding way to reduce its size (and there is) | ||
| 81 | 11:28 <+tmortagne> event/1.0 is not very compact either | ||
| 82 | 11:28 <vmassol> I doubt it can ever be as compact as the event format | ||
| 83 | 11:28 <vmassol> but if you have an idea please show it, I'm all for it | ||
| 84 | 11:28 <vmassol> actually | ||
| 85 | 11:29 <vmassol> thiking about it | ||
| 86 | 11:29 <vmassol> you can probably reach the same compactness | ||
| 87 | 11:29 <vmassol> let me check something | ||
| 88 | 11:30 <vmassol> tmortagne: what would be great is to have: https://gist.github.com/2478264 | ||
| 89 | 11:32 <+tmortagne> <document> makes it hard to write a generic parser compared to <block name="document"> there is more complex example | ||
| 90 | 11:33 <+tmortagne> having the value of parameter directy in the block when there is only one parameter is doable | ||
| 91 | 11:34 <vmassol> sure but for the tests I don't think we need a generic parser | ||
| 92 | 11:34 <vmassol> I prefer compactness over genericity for tests | ||
| 93 | 11:36 <+tmortagne> I don't see the point in having a test implementation of a syntax, we can reduce a lot the standard xml+dom/current syntax | ||
| 94 | 11:36 <+tmortagne> I did not said <document> was impossible | ||
| 95 | 11:36 <+tmortagne> just need to some time think about it | ||
| 96 | 11:36 <vmassol> ok, in the meantime I'm reusing the input specified instead of parsing the pivot format | ||
| 97 | 11:55 <tmortagne> has quit | ||
| 98 | 11:56 <CIA-160> tmortagne master * r550d59b https://github.com/xwiki/xwiki-platform/commit/550d59b77caf5d44e40d422d2d3ab740e8d8d943 / (9 files in 6 dirs): XWIKI-7761: The string merging is not very good during XAR merge - http://git.io/HpEmXA | ||
| 99 | 12:02 <tmortagne> has joined #xwiki | ||
| 100 | 12:14 <mflorea> has quit | ||
| 101 | 12:26 <heisenberg_> has joined #xwiki | ||
| 102 | 12:56 <gdelhumeau> has quit | ||
| 103 | 12:57 <jvdrean> has quit | ||
| 104 | 12:58 <mflorea> has joined #xwiki | ||
| 105 | 13:00 <jvdrean> has joined #xwiki | ||
| 106 | 13:04 <jvdrean1> has joined #xwiki | ||
| 107 | 13:05 <jvdrean> has quit | ||
| 108 | 13:18 <heisenberg_> I have created an individual sheet for an application w/in minutes which works beatifully. now I want to display a user's full name. how can I access that? I have got it's username which I could use as parameter. but which function/method to call? | ||
| 109 | 13:33 <vmassol> heisenberg_: in the future this will be found in the user module. Right now it's in oldcore: $xwiki.getUserName | ||
| 110 | 13:33 <vmassol> I found it by googling ;) | ||
| 111 | 13:33 <vmassol> led me to http://comments.gmane.org/gmane.comp.web.wiki.xwiki.user/13306 | ||
| 112 | 13:33 <heisenberg_> what was your google request? :-) | ||
| 113 | 13:34 <vmassol> xwiki user "full name" | ||
| 114 | 13:35 <vmassol> hmmm | ||
| 115 | 13:35 <vmassol> I've checked the source and it returns HTML | ||
| 116 | 13:35 <heisenberg_> uh, I had some similar ones which didn't lead me to my desired result | ||
| 117 | 13:35 <heisenberg_> okay? | ||
| 118 | 13:35 <vmassol> wait checking more | ||
| 119 | 13:35 <heisenberg_> that's not what I wanted :-) | ||
| 120 | 13:36 <heisenberg_> you actually commented on that entry in 2010 ;) | ||
| 121 | 13:36 <heisenberg_> ... assuming you're vincent ;) | ||
| 122 | 13:36 <vmassol> ok you should call: | ||
| 123 | 13:36 <vmassol> public String getUserName(String user, boolean link) | ||
| 124 | 13:37 <vmassol> passing false as the second param | ||
| 125 | 13:37 <vmassol> to not have a link generated around the name | ||
| 126 | 13:37 <heisenberg_> ok | ||
| 127 | 13:37 <heisenberg_> and the user param is my XWiki.username? | ||
| 128 | 13:37 <vmassol> there's even a method to control the formatting | ||
| 129 | 13:37 <vmassol> * @param user Fully qualified username as retrieved from $context.user (XWiki.LudovicDubost) | ||
| 130 | 13:37 <vmassol> * @param format formatting to be used ("$first_name $last_name", "$first_name") | ||
| 131 | 13:37 <vmassol> * @param link false to not add an HTML link to the user profile | ||
| 132 | 13:37 <vmassol> * @return The first name and last name fields surrounded with a link to the user page | ||
| 133 | 13:37 <vmassol> */ | ||
| 134 | 13:37 <vmassol> public String getUserName(String user, String format, boolean link) | ||
| 135 | 13:37 <vmassol> yes | ||
| 136 | 13:38 <vmassol> ah that's cool | ||
| 137 | 13:38 <heisenberg_> wow, have a link to this doc? | ||
| 138 | 13:38 <vmassol> all props that are in a user's XWikiUSers class are available | ||
| 139 | 13:38 <vmassol> the format is actually a Velocity snippet | ||
| 140 | 13:39 <heisenberg_> ok | ||
| 141 | 13:39 <vmassol> the doc is available here: | ||
| 142 | 13:39 <vmassol> http://platform.xwiki.org/xwiki/bin/view/DevGuide/API | ||
| 143 | 13:40 <vmassol> http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/platform/xwiki-platform-oldcore/3.5/xwiki-platform-oldcore-3.5-javadoc.jar/!/com/xpn/xwiki/api/XWiki.html#getUserName(java.lang.String, boolean) | ||
| 144 | 13:40 <heisenberg_> great, thanks a lot! | ||
| 145 | 13:40 <vmassol> it's linked from the dev guide home page: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WebHome | ||
| 146 | 13:41 <vmassol> "XWiki API Reference" | ||
| 147 | 13:41 <vmassol> it's not the full API though, we need to improve that | ||
| 148 | 13:41 <vmassol> it's only the api for the oldcore module | ||
| 149 | 13:41 <heisenberg_> kk | ||
| 150 | 13:42 <vmassol> however full apis can be found in http://maven.xwiki.org/releases | ||
| 151 | 13:42 <vmassol> just pick the version and modules you wish to check api for and then click on the javadoc suffixed file | ||
| 152 | 13:42 <heisenberg_> tnx (I need to find out about all these things like nexus and maven...) | ||
| 153 | 13:42 <vmassol> but we really need an "API center" | ||
| 154 | 13:43 <vmassol> where we can search for all apis | ||
| 155 | 13:43 <vmassol> that would be great | ||
| 156 | 13:43 <heisenberg_> yes...! | ||
| 157 | 13:43 <vmassol> and probably not that hard to do | ||
| 158 | 13:44 <heisenberg_> I count on u :-) | ||
| 159 | 13:45 <vmassol> that's too easy! | ||
| 160 | 13:45 <vmassol> you should contribute it yourself, xwiki.org is an open wiki | ||
| 161 | 13:45 <vmassol> :) | ||
| 162 | 13:46 <heisenberg_> you mean about the API search or about the meanings of maven and nexus and their connection to xwiki? | ||
| 163 | 13:46 <vmassol> I mean about creating an "API Center" | ||
| 164 | 13:47 <vmassol> the best is to implement it as an application (XAR) | ||
| 165 | 13:47 <vmassol> so that users can install it in the their wiki and so that we can also install it on xwiki.org | ||
| 166 | 13:47 <heisenberg_> sorry, I currently spent enough time (my boss says more than allowed) on customizing our business wiki. I don't think he'd be as glad as you about contributing in that way. but when I find time, I'll contribute, I promise. | ||
| 167 | 13:48 <heisenberg_> anyway, I need to read the section about commiting own code (patches, extensions etc.) because we will be developing some... | ||
| 168 | 13:48 <vmassol> ok, tell you boss that he needs to contribute at least as much as he gets benefits from using xwiki freely | ||
| 169 | 13:48 <vmassol> :) | ||
| 170 | 13:48 <vmassol> cool | ||
| 171 | 13:51 <heisenberg_> yeah, my words. but my boss comes from a brick and mortar business and is not too much into this IT and wiki stuff. so I need to convince him by simple but cheap solutions (and cheap on this hand also means not spending too much time to customize etc.) | ||
| 172 | 13:51 <vmassol> sure, make him something that works nicely and from which he derives value | ||
| 173 | 13:52 <vmassol> then explain that nothing is free and if he wishes his new features to continue to work and be improved/maintained he'll need to contribute something (money, code, bugreports, etc) so that the xwiki projects carries on living | ||
| 174 | 13:57 <CIA-160> Vincent Massol cts * r12ae3a3 https://github.com/xwiki/xwiki-rendering/commit/12ae3a3e87d697a8edf8f09278f3b5c67ad9214c / (18 files in 10 dirs): XRENDERING-187: Implement a Rendering Compatibility Test Suite ... | ||
| 175 | 13:57 <jvelo> vmassol: re API center : a prototype could be done in groovy quite easily | ||
| 176 | 13:58 <vmassol> tmortagne: committed a very first version if you wish to check it out | ||
| 177 | 13:58 <vmassol> otp | ||
| 178 | 13:58 <jvelo> introspecting service + older API objects | ||
| 179 | 13:58 <heisenberg_> vmassol: that's been my strategic approach from the beginning :-) | ||
| 180 | 14:01 <vmassol1> has joined #xwiki | ||
| 181 | 14:02 <vmassol> has quit | ||
| 182 | 14:14 <jvdrean1> has quit | ||
| 183 | 14:23 <jvdrean> has joined #xwiki | ||
| 184 | 14:27 <heisenberg_> any1 successfully implemented the Mutipage Table of Contents extension? (http://extensions.xwiki.org/xwiki/bin/view/Extension/Multipage+Table+Of+Contents) | ||
| 185 | 14:41 <+tmortagne> vmassol1: yep seen it, will look at it in detail and work a bit on xdom+xml/current syntax after release is done | ||
| 186 | 14:42 <+tmortagne> sdumitriu: any news about http://jira.xwiki.org/browse/XE-1154 ? | ||
| 187 | 14:47 <heisenberg_> has quit | ||
| 188 | 14:49 <+sburjan> Hello. I have managed to get Agent7 (Windows for IE8 testing) operational. Can someone configure me or help me on how to configure binding a job on it ? (we will only build and run ui-tests - selenium 2) tests | ||
| 189 | 14:53 <vmassol1> @sburjan: ok I'v created a label | ||
| 190 | 14:53 <vmassol1> "windows" on agent7 | ||
| 191 | 14:54 <vmassol1> ATM I see that UI tests are bound to agent1 and 2 | ||
| 192 | 14:54 <vmassol1> I'll add agent7 now | ||
| 193 | 14:54 <vmassol1> done | ||
| 194 | 14:54 <+sburjan> we should find a way to have them run (only ui-tests) | ||
| 195 | 14:55 <+sburjan> cool | ||
| 196 | 14:55 <vmassol1> need to read to check how to use labels | ||
| 197 | 14:55 <+sburjan> so we need to wait for a build ATM, right ? | ||
| 198 | 14:57 <vmassol1> ok tying to job | ||
| 199 | 14:57 <vmassol1> it's alrrady tied | ||
| 200 | 14:57 <+sburjan> I have recovered my admin rights to CI | ||
| 201 | 14:57 <vmassol1> whih means that right now only ui tests will run on it | ||
| 202 | 14:58 <+sburjan> but I can't find in the config menu where the job binding is done | ||
| 203 | 14:58 <vmassol1> sburjan: 1) this agent is only avail to tied jobs | ||
| 204 | 14:59 <vmassol1> 2) check http://ci.xwiki.org/job/xwiki-enterprise-test-ui/configure you'll see it's tied to agent1, 2 and 7 | ||
| 205 | 14:59 <+sburjan> AHA ! | ||
| 206 | 14:59 <vmassol1> but I think this means that agent1 will be favored, then if busy then agent2 and if busy then agent7 | ||
| 207 | 15:00 <+sburjan> which is not good ... | ||
| 208 | 15:00 <vmassol1> it's ok | ||
| 209 | 15:00 <vmassol1> we can also schedule a build on it at a given tme every day if we want | ||
| 210 | 15:01 <vmassol1> I don't think we want to try builds on it all the time | ||
| 211 | 15:01 <vmassol1> now I don't know how to trigger a build on a given agent | ||
| 212 | 15:01 <vmassol1> reading up | ||
| 213 | 15:01 <+sburjan> could we trigger a job start on agent 7 to see if it something fails ? | ||
| 214 | 15:01 <rogerreid> has joined #xwiki | ||
| 215 | 15:02 <rogerreid> hi, how can I set the default editing mode to WYSIWYG for a specific page? | ||
| 216 | 15:05 <vmassol1> sburjan: I'm going to force build on agent7 now and start a build | ||
| 217 | 15:06 <vmassol1> failed: http://ci.xwiki.org/job/xwiki-enterprise-test-ui/1201/console | ||
| 218 | 15:06 <vmassol1> is now known as <vmassol> | ||
| 219 | 15:06 <vmassol> sburjan: you should try it locally first | ||
| 220 | 15:06 <vmassol> by executing the exact same command | ||
| 221 | 15:06 <vmassol> "Cannot run program "/usr/bin/git" (in directory "C:\Jenkins\workspace\xwiki-enterprise-test-ui"): CreateProcess error=3, The system cannot find the path specified" | ||
| 222 | 15:07 <vmassol> so git is not available in jenkins' agent PATH | ||
| 223 | 15:09 <rogerreid> what is the statement to set the default editing mode to WYSIWYG for a specific page? | ||
| 224 | 15:09 <rogerreid> can someone help? | ||
| 225 | 15:09 <+sburjan> vmassol: ok, let me fix that | ||
| 226 | 15:10 <+sburjan> rogerreid: http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing | ||
| 227 | 15:10 <vmassol> rogerreid: that's not how it works | ||
| 228 | 15:10 <vmassol> editing mode is configured per user type/user | ||
| 229 | 15:10 <vmassol> s/user type// | ||
| 230 | 15:10 <vmassol> what you can do is for a given xclass property make it use wysiwyg by default | ||
| 231 | 15:11 <vmassol> (that property has to be textarea) | ||
| 232 | 15:12 <+sburjan> vmassol: this is a little bit odd, because I can git from the command prompt on the agent. | ||
| 233 | 15:14 <vmassol> sburjan: you need to run under the same user as the agent runs of course | ||
| 234 | 15:15 <vmassol> can you check that? | ||
| 235 | 15:16 <+sburjan> yes.. checking | ||
| 236 | 15:18 <+sburjan> ok, seems that all users in the system have the path to git, because I logged in as Administrator also, and I am able to git from Administrator too | ||
| 237 | 15:18 <+sburjan> because I used the git installer, and that creates the path for all users | ||
| 238 | 15:19 <vmassol> well that's not true for the java agent obviously | ||
| 239 | 15:19 <vmassol> :) | ||
| 240 | 15:19 <vmassol> hmm | ||
| 241 | 15:20 <vmassol> from the console log it tries to do: Error performing command: /usr/bin/git --version | ||
| 242 | 15:20 <vmassol> I don't know if this is really what it does or a generic message | ||
| 243 | 15:20 <vmassol> it's what it does | ||
| 244 | 15:20 <vmassol> "Cannot run program "/usr/bin/git" " | ||
| 245 | 15:20 <+sburjan> well that path can't exist on a windows OS | ||
| 246 | 15:20 <+sburjan> maybe if we install cygwin, but i've read that there are people who are able to use it without cygwin | ||
| 247 | 15:20 <vmassol> wait | ||
| 248 | 15:21 <vmassol> have you read the doc first? | ||
| 249 | 15:21 <rogerreid> vmassol: so I cannot set a default editing mode for a specific xwiki page? | ||
| 250 | 15:22 <vmassol> sburjan: you should read https://www.google.fr/search?sourceid=chrome&ie=UTF-8&q=jenkins+git+windows | ||
| 251 | 15:22 <vmassol> rogerreid: that has no meaning in xwiki | ||
| 252 | 15:22 <vmassol> editor is a user choice | ||
| 253 | 15:23 <vmassol> but | ||
| 254 | 15:23 <vmassol> as I said you can have a default editor for a given xclass property but it's only default, if hte user chosses a different editor hell' get the editor he chooses | ||
| 255 | 15:23 <vmassol> so just to understand your use case rogerreid: | ||
| 256 | 15:24 <vmassol> - you want for ex have a default of wiki editor for a given space/pages and wysiwyg editor for a different space/pages? | ||
| 257 | 15:24 <vmassol> (knowing that user can choose their editors of course) | ||
| 258 | 15:24 <vmassol> (in which case their choice overrides the default) | ||
| 259 | 15:24 <vmassol> is that what you'd like? | ||
| 260 | 15:26 <vmassol> this is currently not possible since default editor choice is for the whole wiki and for a given user (by default simple users have the wysiwyg editor defined) | ||
| 261 | 15:26 <+sburjan> vmassol: can you try to start now the build again ? | ||
| 262 | 15:26 <vmassol> sburjan: btw did you get an email from the failed build? | ||
| 263 | 15:26 <vmassol> ah yes I got it | ||
| 264 | 15:27 <+sburjan> yes. got it too | ||
| 265 | 15:28 <vmassol> sburjan: same error | ||
| 266 | 15:28 <vmassol> you should try it first on the machine | ||
| 267 | 15:28 <vmassol> it's a pain to reconfigure it everytime | ||
| 268 | 15:29 <+sburjan> what should I try ? | ||
| 269 | 15:29 <vmassol> hold on | ||
| 270 | 15:29 <vmassol> I'll confgure a new plugin on jenkins | ||
| 271 | 15:30 <+sburjan> the git is installed using the git windows installer and it is installed on C:/Program Files/Git | ||
| 272 | 15:30 <vmassol> sburjan: have you read all the docs I mentioned? | ||
| 273 | 15:31 <+sburjan> I read from those threads, yes | ||
| 274 | 15:31 <vmassol> so? | ||
| 275 | 15:31 <vmassol> what's the result? | ||
| 276 | 15:32 <+sburjan> reading this https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin ATM | ||
| 277 | 15:35 <+sburjan> ok, I see. so might be a ssh issue (but afair we don't use ssh clone method on agents) | ||
| 278 | 15:35 <vmassol> there's no ssh issue | ||
| 279 | 15:35 <vmassol> Cannot run program "/usr/bin/git" | ||
| 280 | 15:35 <vmassol> that's the issue | ||
| 281 | 15:36 <vmassol> continue reading! :) | ||
| 282 | 15:38 <vmassol> sburjan: there's now the choice to decide on which agent to run: http://ci.xwiki.org/job/xwiki-enterprise-test-ui/build?delay=0sec | ||
| 283 | 15:39 <vmassol> but don't use that too much, you need to understand first what's the problem | ||
| 284 | 15:39 <vmassol> whenever the build fails it sends a false positive to everyone and that's very bad! | ||
| 285 | 15:39 <+sburjan> still trying to understand | ||
| 286 | 15:39 <vmassol> so you should make it work locally first | ||
| 287 | 15:39 <vmassol> or disable sending notifications for now | ||
| 288 | 15:41 <+sburjan> how do I make it work locally ? cloning a repo locally works.. like git clone git://github.com/xwiki/xwiki-enterprise.git works | ||
| 289 | 15:47 <+sburjan> ok, let me re-install git to C:\ .. it's safer .. white spaces in PATH names are not recommended either way | ||
| 290 | 15:54 <vmassol> sburjan: I don't tihnk it has anytthing to do with that | ||
| 291 | 15:54 <vmassol> again | ||
| 292 | 15:54 <vmassol> it's looking for /usr/bin/git | ||
| 293 | 15:55 <+sburjan> I know.. but It might some config from master | ||
| 294 | 15:56 <+sburjan> still trying to figure it out | ||
| 295 | 16:01 <+sburjan> vmassol: maybe I have to add a environment variable from the slave configuration | ||
| 296 | 16:01 <+sburjan> http://ci.xwiki.org/computer/agent-7/configure | ||
| 297 | 16:01 <vmassol> link? | ||
| 298 | 16:01 <+sburjan> like TOol Locations | ||
| 299 | 16:01 <vmassol> show me the url to the doc | ||
| 300 | 16:01 <+sburjan> http://ci.xwiki.org/computer/agent-7/configure | ||
| 301 | 16:02 <rogerreid> vmassol: yes, you understood me correctly. I have created an app, and each app page has a) the basic app information you can edit by form editor and b) a regular wiki page. a) is automatically added into each header of b). | ||
| 302 | 16:02 <rogerreid> when now a regular user goes to that page he shall be able to edit the wiki page content but not the app's content | ||
| 303 | 16:02 <+sburjan> vmassol: https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Gotchas | ||
| 304 | 16:02 <rogerreid> so I would need to set a default editor to WYSIWYG instead of default form editor | ||
| 305 | 16:06 <vmassol> sburjan: it's not a clone issue | ||
| 306 | 16:06 <vmassol> it's https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin- that you need to read | ||
| 307 | 16:07 <vmassol> indeed you should set | ||
| 308 | 16:07 <+sburjan> it's a path issue, master thinks git path is is /urt/bin/git | ||
| 309 | 16:07 <vmassol> GIT_HOME | ||
| 310 | 16:08 <vmassol> bbiab | ||
| 311 | 16:17 <+sburjan> vmassol: I have added the GIT_HOME environment path. no white spaces in path names. Except that, everything else is related to ssh. what am I missing ? | ||
| 312 | 16:20 <+sburjan> I'm also reading: "go to to the Jenkins configuration settings (not the project settings, the global ones) and change the Git path to a fully qualified path" .. but there is already one "/usr/bin/git" .. which is for the master configuration | ||
| 313 | 16:21 <+sburjan> "List of Git installations on this system" | ||
| 314 | 16:21 <+sburjan> so these doesn't seem git paths for slave agents | ||
| 315 | 16:25 <CIA-160> Vincent Massol cts * r0e8494f https://github.com/xwiki/xwiki-rendering/commit/0e8494ff62fea6e63591d03269ffc28d9885b9d6 / (14 files in 8 dirs): XRENDERING-187: Implement a Rendering Compatibility Test Suite ... | ||
| 316 | 16:31 <+sburjan> any clues ? | ||
| 317 | 16:37 <CIA-160> Vincent Massol cts * rcbc3484 https://github.com/xwiki/xwiki-rendering/commit/cbc3484c0390c623d0a1d4c0868e7437a6bfd25c / (4 files in 3 dirs): XRENDERING-187: Implement a Rendering Compatibility Test Suite ... | ||
| 318 | 16:51 <+sburjan> i give up | ||
| 319 | 16:52 <lucaa> has joined #xwiki | ||
| 320 | 16:53 <+lucaa> hi guys | ||
| 321 | 16:53 <+lucaa> sdumitriu: what's the status of 3.5.1, is it done packed and released? | ||
| 322 | 17:02 <+tmortagne> lucaa: no | ||
| 323 | 17:02 <+tmortagne> it's blocked by http://jira.xwiki.org/browse/XE-1154 | ||
| 324 | 17:03 <+tmortagne> (same as 4.0) | ||
| 325 | 17:03 <+lucaa> but 1154 doesn't have affects nor fix for 3.5.1 | ||
| 326 | 17:03 <+lucaa> can we unrelease things on jira and mark 3.5.1 as unreleased and put this issue with fix for 3.5.1? | ||
| 327 | 17:04 <+lucaa> because from a tools pov, 3.5.1 is as good as released: on maven it's released, on jira it's released | ||
| 328 | 17:04 <+tmortagne> because it has been tested by Daniel on 4.0RC1 et sdumitriu forgot to put 3.5.1 related infos on it | ||
| 329 | 17:04 <+lucaa> ok, i'll handle all that | ||
| 330 | 17:04 <+lucaa> thanks | ||
| 331 | 17:05 <+tmortagne> it's released on jira and on maven because sdumitriu actually started the release | ||
| 332 | 17:05 <+tmortagne> but it was before finding this issue | ||
| 333 | 17:06 <+lucaa> yes, but the time we fix it, we should mark that's it's not actually considered done and it's blocked by an issues | ||
| 334 | 17:06 <+lucaa> *an issue | ||
| 335 | 17:11 <+tmortagne> sure | ||
| 336 | 17:17 <+sburjan> vmassol: only place I can find "/usr/bin/git" is in Jenkins Global Configuration -> git plugin. But I don't think I should touch that | ||
| 337 | 17:23 <jack5_> has joined #xwiki | ||
| 338 | 17:24 <jack5_> does anybody know how can I make a link to my custom panel that displays documentIndex with specific spacename? | ||
| 339 | 17:24 <+tmortagne> sburjan: you can setup this in the agent configuration | ||
| 340 | 17:25 <+tmortagne> what's in global is just the default basicaly | ||
| 341 | 17:25 <+tmortagne> since all other agents have the same configuration | ||
| 342 | 17:25 <jack5_> I have created this: [[Main.AllDocs||queryString="view=attachments"]] but how do I filter the search to specific space? | ||
| 343 | 17:25 <+sburjan> tmortagne: yes, I was thinking about that, let me try .. hope I won't generate more spam | ||
| 344 | 17:26 <+sburjan> on the page vmassol gave me they don't specify nothing about setting this up in the agent config, they only talk about global config | ||
| 345 | 17:27 <+tmortagne> sburjan: ok but you have the exact same things on both | ||
| 346 | 17:27 <+tmortagne> you just override the global one on the egent | ||
| 347 | 17:27 <+tmortagne> agent | ||
| 348 | 17:27 <+tmortagne> they only talk about global one because that's what people do by default when there is only one agent | ||
| 349 | 17:28 <+sburjan> tmortagne: yes.. I know. But I'm very scared not to do something that will impact all agents. Trying setting git up in the agent config, fingers crossed :) | ||
| 350 | 17:30 <+tmortagne> sburjan: if you setup only agent-7 you are not goin to impact other egents | ||
| 351 | 17:30 <+tmortagne> agents | ||
| 352 | 17:31 <+lucaa> tmortagne: since you're here, do you know what's the difference between xwiki-manager-ui and xwiki-manager-ui-all ? | ||
| 353 | 17:31 <+lucaa> ui-all is with workspaces, ui is without? | ||
| 354 | 17:31 <+tmortagne> lucaa: did you looked at http://manager.xwiki.org/xwiki/bin/view/Main/Download ? | ||
| 355 | 17:31 <+lucaa> no, I didn't | ||
| 356 | 17:31 <+lucaa> sorry | ||
| 357 | 17:31 <+lucaa> let's | ||
| 358 | 17:32 <+tmortagne> you have exactly the ssame thing for enterprise | ||
| 359 | 17:33 <+lucaa> so xem without workspaces doesn't exist? | ||
| 360 | 17:33 <+tmortagne> *-ui is the proper project, the one you would install with extension manager and which declare dependencies, *-ui-all is a package with *-ui an all its dependencies | ||
| 361 | 17:33 <+lucaa> at all? | ||
| 362 | 17:33 <+sburjan> tmortagne: failed again, don't know what I've done wrong, it seems the global config is used even I specified git home on the agent | ||
| 363 | 17:34 <CIA-160> Marius Dumitru Florea master * r048f294 https://github.com/xwiki/xwiki-platform/commit/048f29446bbc43763227e83b730f4ef55fb574d1 / xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-ui/src/main/resources/XWiki/ExtensionManagerMacros.xml : XWIKI-7764: Install/Uninstall extensions asynchronously ... | ||
| 364 | 17:34 <+tmortagne> lucaa: if you mean everything but worskspaces like the old XEM no it does not exists | ||
| 365 | 17:34 <+tmortagne> sburjan: looking | ||
| 366 | 17:34 <+lucaa> tmortagne: yes, everything without workspaces, like the old XEM :) | ||
| 367 | 17:35 <+tmortagne> that's not what XEM is anymore | ||
| 368 | 17:35 <+lucaa> but I should be able to make it manually, by using the appropriate dependencies, I would guess, no? | ||
| 369 | 17:35 <+sburjan> tmortagne: I might have forgot to save the config ... | ||
| 370 | 17:36 <+tmortagne> yes you can take manager-ui + appmanager + wikimanager xars | ||
| 371 | 17:36 <+tmortagne> ( lucaa ) | ||
| 372 | 17:36 <+lucaa> tmortagne: and xe | ||
| 373 | 17:36 <+lucaa> xe ui-all | ||
| 374 | 17:36 <+tmortagne> unless manager-ui does noy work well without workspaces I don't know, you will have to ask Edy | ||
| 375 | 17:37 <+tmortagne> sure | ||
| 376 | 17:37 <+lucaa> yes, that's what I fear | ||
| 377 | 17:37 <+lucaa> that manager-ui doesn't work without workspaces | ||
| 378 | 17:37 <+lucaa> although it should because in the workspaces itself there is a link to the old wiki manager | ||
| 379 | 17:37 <+sburjan> tmortagne: ok, now path is taken into consideration, but I get another error | ||
| 380 | 17:37 <+sburjan> Jenkins doesn't love me today | ||
| 381 | 17:41 <+tmortagne> sburjan: ok at least it's better than before ;) | ||
| 382 | 17:42 <+sburjan> maybe to I have to specify also the full path, like C:\Git\bin\git.exe.Should I try this way ? | ||
| 383 | 17:42 <+tmortagne> sburjan: on what job are you testing ? | ||
| 384 | 17:42 <+sburjan> tmortagne: and I select agent-7 from here: http://ci.xwiki.org/job/xwiki-enterprise-test-ui/build?delay=0sec | ||
| 385 | 17:42 <+tmortagne> sburjan: you should do the same as we do for linux setup I guess | ||
| 386 | 17:43 <+sburjan> which is ? | ||
| 387 | 17:43 <+tmortagne> the global setup | ||
| 388 | 17:43 <+tmortagne> /usr/bin/git | ||
| 389 | 17:43 <+tmortagne> so thats the full path | ||
| 390 | 17:43 <+tmortagne> to the executable | ||
| 391 | 17:44 <+sburjan> ok, go the git from /usr/bin/git is a file, not a directory ? | ||
| 392 | 17:44 <+tmortagne> yes | ||
| 393 | 17:44 <+sburjan> ok, let me try with full path, including file name | ||
| 394 | 17:45 <+tmortagne> hmm | ||
| 395 | 17:45 <+tmortagne> actually looks like it's not the same configuration actually | ||
| 396 | 17:45 <+tmortagne> the global has "Path to Git executable" | ||
| 397 | 17:45 <+tmortagne> but "Home" should be the folder | ||
| 398 | 17:46 <+tmortagne> but home is not C:\Git\bin\ | ||
| 399 | 17:46 <+tmortagne> it's C:\Git\ I think | ||
| 400 | 17:46 <+tmortagne> ( sburjan ) | ||
| 401 | 17:46 <+sburjan> tmortagne: it got passed that stage: http://ci.xwiki.org/job/xwiki-enterprise-test-ui/1206/console | ||
| 402 | 17:46 <+sburjan> but still failed | ||
| 403 | 17:46 <+tmortagne> sburjan: that's a maven error, not git | ||
| 404 | 17:47 <+tmortagne> I guess you have the same issue with maven | ||
| 405 | 17:47 <+sburjan> yepp.. so I guess I have to do the same for maven too, right ? with the paths | ||
| 406 | 17:47 <+tmortagne> you have to set it up the same way | ||
| 407 | 17:47 <+sburjan> now one question: do I have to use thesettings.xml specific to xwiki, right ? | ||
| 408 | 17:47 <+tmortagne> you have to do the same for all tols | ||
| 409 | 17:47 <+tmortagne> tools | ||
| 410 | 17:48 <+tmortagne> yes you have | ||
| 411 | 17:48 <+sburjan> okay.. thanks.. trying now | ||
| 412 | 17:48 <+tmortagne> take the one from other agents | ||
| 413 | 17:48 <+sburjan> sorry for the noise mails I generate | ||
| 414 | 17:48 <+tmortagne> it's ok | ||
| 415 | 17:48 <+sburjan> I don't have access to the agents, so I'll have to use the one from the website I guess | ||
| 416 | 17:52 <vmassol> sburjan: you should remove notification when you're testing to avoid false positives | ||
| 417 | 17:53 <vmassol> the last error is easy, it's maven config that is not correct, same stuff as git | ||
| 418 | 17:55 <rogerreid> has quit | ||
| 419 | 17:59 <CIA-160> Marius Dumitru Florea master * rb0ea673 https://github.com/xwiki/xwiki-platform/commit/b0ea6732a61a6b866f1d4ef0e68303ff83b84ad2 / xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-ui/src/main/resources/XWiki/ExtensionManagerMacros.xml : [misc] Defer the submit when the user selects a different repo so that IE9 is able to properly focus the search input. - http://git.io/Igt04A | ||
| 420 | 18:01 <+mflorea> tmortagne: did you fix the clirr error re MergeUtils? | ||
| 421 | 18:02 <+tmortagne> mflorea: nop, did not seen actually, doing it now | ||
| 422 | 18:02 <+mflorea> thanks | ||
| 423 | 18:05 <CIA-160> tmortagne master * r0af6f3a https://github.com/xwiki/xwiki-platform/commit/0af6f3a3214c9085bdfe057dd4650438afe5d47f / xwiki-platform-core/pom.xml : XWIKI-7761: The string merging is not very good during XAR merge ... | ||
| 424 | 18:05 <+tmortagne> mflorea: done, thanks for the warning | ||
| 425 | 18:05 <+mflorea> ;) | ||
| 426 | 18:15 <+sburjan> vmassol: It's building !!!! Did you add the -Piexplore profile ? | ||
| 427 | 18:18 <+tmortagne> problem is that you can't just put -Piexplorer since the same job is used for both | ||
| 428 | 18:19 <+tmortagne> either we duplicate the job or we find a way to not explicitly indicate the browser to use in the command | ||
| 429 | 18:19 <vmassol> it's worse than that tmortagne, we shouldn't rely on this agent for our releases since it can say ok but it's skipping lots of tests | ||
| 430 | 18:19 <+tmortagne> indeed | ||
| 431 | 18:20 <+tmortagne> so we should probably have a special job then | ||
| 432 | 18:20 <vmassol> yep | ||
| 433 | 18:20 <+tmortagne> until all test are enabled | ||
| 434 | 18:20 <vmassol> we can trigger it automatically once per night | ||
| 435 | 18:20 <+tmortagne> since I guess we are supposed to make them all work | ||
| 436 | 18:20 <vmassol> yes | ||
| 437 | 18:21 <vmassol> well ATM it should be triggered manually only till it builds fine | ||
| 438 | 18:21 <vmassol> and with no emails till it builds fine | ||
| 439 | 18:21 <+tmortagne> putting back notification for the job | ||
| 440 | 18:23 <jack5_> has quit | ||
| 441 | 18:24 <+sburjan> ok, so you're gonna create a special job for this so we can use the -Piexplore param ? | ||
| 442 | 18:25 <+sburjan> ATM I guess the build is stuck.. because I don't see anything new on the console | ||
| 443 | 18:27 <+sburjan> ok, at least it builds | ||
| 444 | 18:27 <+sburjan> thanks for helping vmassol, tmortagne | ||
| 445 | 18:27 <+sburjan> see you tomorrow, have a nice evening | ||
| 446 | 18:28 <vmassol> sburjan: he's not helping me | ||
| 447 | 18:28 <vmassol> he's helping you | ||
| 448 | 18:28 <vmassol> :) | ||
| 449 | 18:28 <+sburjan> I know :) | ||
| 450 | 18:29 <+sburjan> I'll check if the git home issue is reported on their bug tracking tool :) | ||
| 451 | 18:30 <sburjan> has quit | ||
| 452 | 18:35 <jvdrean> has quit | ||
| 453 | 18:58 <jamie_wiki> has quit | ||
| 454 | 19:04 <+tmortagne> vmassol: "he's not helping me" always nice to ear :P | ||
| 455 | 19:05 <vmassol> :) | ||
| 456 | 19:09 <+sburjan`> :) | ||
| 457 | 19:09 <CIA-160> tmortagne master * rc81f594 https://github.com/xwiki/xwiki-manager/commit/c81f594a2a24019692fb4973f95c4817b41bb91b / xwiki-manager-distribution/xwiki-manager-ui-all/pom.xml : Remove useless dependency - http://git.io/6gU0fg | ||
| 458 | 19:11 <jvdrean> has joined #xwiki | ||
| 459 | 19:25 <abusenius> has joined #xwiki | ||
| 460 | 19:37 <mflorea> has quit | ||
| 461 | 20:04 <lucaa> has quit | ||
| 462 | 20:15 <cjd> has quit | ||
| 463 | 20:21 <cjd> has joined #xwiki | ||
| 464 | 20:58 <CIA-160> Vincent Massol master * r27f850d https://github.com/xwiki/xwiki-platform/commit/27f850d44060825d6ae47a2ddd9ff4434a43d37c / (2 files in 2 dirs): XWIKI-3967: Allow using Groovy scripts without Programming Rights ... | ||
| 465 | 21:00 <CIA-160> Vincent Massol cts * rc16dc10 https://github.com/xwiki/xwiki-rendering/commit/c16dc109b8c29413a1ef913670a75b0f579b26d4 / xwiki-rendering-test/src/main/resources/simple/bold/bold1.xdom.txt : XRENDERING-187: Implement a Rendering Compatibility Test Suite ... | ||
| 466 | 21:05 <@cjd> Is the non-pr groovy still able to access private fields? | ||
| 467 | 21:06 <vmassol> cjd: right now I doubt you can do anything useful to but I can add a test for that | ||
| 468 | 21:06 <vmassol> do you have an example that I can put in the unit test? | ||
| 469 | 21:06 <@cjd> new Random().unsafe.putAddress(0,0) comes to mind but no random... | ||
| 470 | 21:06 <vmassol> wdym by "no random"? | ||
| 471 | 21:07 <@cjd> can't import it since it's a java.util... | ||
| 472 | 21:07 <vmassol> indeed better pick something from java.lang | ||
| 473 | 21:08 <vmassol> should be easy | ||
| 474 | 21:08 <@cjd> "Hello World".value[0] | ||
| 475 | 21:08 <@cjd> should be char 'H' | ||
| 476 | 21:08 <vmassol> ok better I'll test that once my IDE has restarted | ||
| 477 | 21:08 <@cjd> With that and the xcontext, I could get anything | ||
| 478 | 21:10 <@cjd> One idea (not meaning to weigh you down) is to make a .groovy file which is parsed to define the configurator, that way if we discover a hole in the security, we can publicise a 1 liner which people can use to patch it | ||
| 479 | 21:10 <vmassol> yep that's my idea | ||
| 480 | 21:10 <@cjd> cool | ||
| 481 | 21:10 <vmassol> for configuring it | ||
| 482 | 21:11 <@cjd> I've always been a fan of configuration as script | ||
| 483 | 21:13 <vmassol> cjd: works | ||
| 484 | 21:14 <@cjd> works as in "it's blocked"? | ||
| 485 | 21:15 <CIA-160> Vincent Massol master * r2db02bf https://github.com/xwiki/xwiki-platform/commit/2db02bfa2980d796f1bb5d5fa2408836c488bc4c / xwiki-platform-core/xwiki-platform-groovy/src/test/java/org/xwiki/groovy/internal/SecureGroovyCompilationCustomizerTest.java : XWIKI-3967: Allow using Groovy scripts without Programming Rights ... | ||
| 486 | 21:15 <vmassol> yep | ||
| 487 | 21:16 <@cjd> cool, that makes groovy much nicer in general | ||
| 488 | 21:16 <@cjd> the only other thing I would consider is a time limit on script execution | ||
| 489 | 21:16 <vmassol> already done | ||
| 490 | 21:16 <vmassol> :) | ||
| 491 | 21:16 <@cjd> cool | ||
| 492 | 21:16 <vmassol> it's already configurable | ||
| 493 | 21:17 <vmassol> ofc we can only time out on groovy code itself | ||
| 494 | 21:17 <vmassol> not on java calls | ||
| 495 | 21:18 <@cjd> What would probably make the most sense is a global time limit on threads since a request shouldn't take more than maybe 10 seconds | ||
| 496 | 21:18 <vmassol> cjd: fyi https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki-commons-groovy/src/main/java/org/xwiki/groovy/internal/TimedInterruptGroovyCompilationCustomizer.java | ||
| 497 | 21:18 <@cjd> of course that breaks things like import | ||
| 498 | 21:18 <@cjd> cool | ||
| 499 | 21:19 <@cjd> Today I've been playing with a DocumentReference(Resolver|Serializer) design which maps to Long so we can implement the crappy apis which only ask for a numeric id number. | ||
| 500 | 21:20 <@cjd> Move all the uglyness to one place | ||
| 501 | 21:20 <vmassol> I'm not following. What Long? | ||
| 502 | 21:20 <@cjd> there are some APIs which only give you the document's id number | ||
| 503 | 21:21 <@cjd> so this would let us get the proper document reference from it | ||
| 504 | 21:21 <vmassol> I see | ||
| 505 | 21:21 <vmassol> so DRR.resolve(long) —> DocumentReference | ||
| 506 | 21:21 <@cjd> yeap | ||
| 507 | 21:21 <vmassol> k | ||
| 508 | 21:21 <@cjd> using a cache and then a lookup against the database | ||
| 509 | 21:21 <vmassol> not sure where we need this but cool | ||
| 510 | 21:22 <@cjd> I need it for rewriting HibernateStore, which is what I'm doing for the cassandra compatibility stuff | ||
| 511 | 21:22 <vmassol> ok | ||
| 512 | 21:22 <@cjd> also it's needed for deleted attachments | ||
| 513 | 21:22 <@cjd> in that case it's attachment reference... | ||
| 514 | 21:22 <vmassol> cool that you're wrtitng reusable building blocks | ||
| 515 | 21:23 <@cjd> I try.. | ||
| 516 | 21:23 <vmassol> I know you don't like reuse but it's nice :) | ||
| 517 | 21:23 <@cjd> Someone I met who used to be a CS professor said: You need to do things 3 times, once to learn how to do it, once to learn how to do it right and once to learn how to do it well. | ||
| 518 | 21:24 <vmassol> yep | ||
| 519 | 21:24 <@cjd> I do like reuse, I just like to only make things reusable when I see a clear opertunity for reuse. | ||
| 520 | 21:24 <vmassol> first time: you do teh crappy stuff | ||
| 521 | 21:24 <vmassol> second time: you find yourself having to do again what you did the 1st time | ||
| 522 | 21:24 <@cjd> It's always a balance against code readibility | ||
| 523 | 21:25 <vmassol> third time: oh oh, now I really need to factorize this | ||
| 524 | 21:25 <vmassol> personally I prefer to do this in 2 steps rather than 3 ;) | ||
| 525 | 21:25 <vmassol> definitely | ||
| 526 | 21:25 <vmassol> I also refactor the second time usually | ||
| 527 | 21:25 <@cjd> She said that in all her years, she got it down to 2 and a half | ||
| 528 | 21:25 <vmassol> unless I 100% know I'm going to need it reusable | ||
| 529 | 21:26 <vmassol> :) | ||
| 530 | 21:26 <@cjd> I've written a few things with reuse in mind then come time to reuse it, I find I developed it all backwards for the real use cases | ||
| 531 | 21:26 <vmassol> yes happens | ||
| 532 | 21:26 <vmassol> especially when you don't have unit tests ;) | ||
| 533 | 21:27 <vmassol> (unit tests are a user of your code and shows you issue when using it as consumer) | ||
| 534 | 21:27 <@cjd> Indeed, they offer you a chance to see if you're making a mess. | ||
| 535 | 21:27 <@cjd> Too many mocks is IMO a bad sign. | ||
| 536 | 21:27 <vmassol> ofc you need to be critic with your unit tests | ||
| 537 | 21:27 <vmassol> yep totally agree | ||
| 538 | 21:27 <vmassol> too many mocks is a smell | ||
| 539 | 21:27 <@cjd> /nod | ||
| 540 | 21:28 <vmassol> now the question is when is too many | ||
| 541 | 21:28 <@cjd> I've learned quite a bit on my own project since I got to do everything all the different wrong ways. | ||
| 542 | 21:28 <vmassol> would be cool to have a common agreement on that in the coding team btw… IMO around 4-5 is max | ||
| 543 | 21:29 <@cjd> Found out that garbage collection is not necessary to maintainable code, and actually there are other things which the garbage collector can't do for you. | ||
| 544 | 21:29 <vmassol> when you have more it means your code is doing too much at once and you should extract some code by creating another class somehow | ||
| 545 | 21:30 <@cjd> IMO dependency loops and global variables are the 2 biggest threats to a project. | ||
| 546 | 21:30 <vmassol> if you do TDD you'll find it much easier to not have too many mocks | ||
| 547 | 21:30 <vmassol> (I don't do that often though… I still need to learn) | ||
| 548 | 21:30 <@cjd> I've done TDD in a few cases, it really comes in handy where the bug is hard to find but easy to show. | ||
| 549 | 21:31 <@cjd> In a lot of cases I've decided it would be incumbering, I tend to write >200 lines then go to the compiler. | ||
| 550 | 21:31 <vmassol> well if you do TDD you don't have bugs ;) (not unit testing once at least- doesn't work it works) | ||
| 551 | 21:32 <vmassol> s/doesn't work/doesn't prove | ||
| 552 | 21:32 <@cjd> well.. there are always bugs which just evade testing | ||
| 553 | 21:32 <vmassol> sure | ||
| 554 | 21:32 <@cjd> And in some cases I've found a bug which was a typo and I thought "if I tested for this, I would need a test for every line of code" | ||
| 555 | 21:33 <vmassol> and then test your tests ;) | ||
| 556 | 21:33 <@cjd> heh yeap | ||
| 557 | 21:34 <@cjd> One thing I think we need to guard against is dependency injection of "magic boxes" aka where one module injects this thing and puts something in it and then another module injects the thing and takes something out. | ||
| 558 | 21:34 <@cjd> Since this makes a sneeky hidden dependency. | ||
| 559 | 21:36 <vmassol> need to parse this slowly.. | ||
| 560 | 21:37 <vmassol> you have an example? | ||
| 561 | 21:37 <@cjd> If it's done explicitly, it's obviously very ugly. | ||
| 562 | 21:37 <vmassol> you should raise a jira issue if you think we have this somewhere so that we remember to think about it/fix it | ||
| 563 | 21:38 <@cjd> I don't have an example in the code | ||
| 564 | 21:38 <tmortagne> has quit | ||
| 565 | 21:38 <@cjd> it's something that I think we need to think about all the time, since dependency injection of singletons gives us the power to create a whole lot of global state. | ||
| 566 | 21:39 <@cjd> The obvious example of setting a value in context type thing then expecting that value to be there when you get it somewhere else has an awful smell so I wouldn't expect to see it. | ||
| 567 | 21:40 <@cjd> What is more insidious is a stateful object where it's state is altered in some subtle way by one module then it's state is expected to be that way by another module. | ||
| 568 | 21:40 <@cjd> That is something which if you're not thinkint about the risk of magic boxes, you could end up falling in the trap. | ||
| 569 | 21:41 <@cjd> And of course now module 2 has a dependency on module 1 since it needs module 1 to alter the state of module 3, which they both inject. | ||
| 570 | 21:45 <jvelo_> has joined #xwiki | ||
| 571 | 21:47 <jvelo> has quit | ||
| 572 | 21:47 <jvelo_> is now known as <jvelo> | ||
| 573 | 21:49 <vmassol> now I need to find a solution for PermissionCheckerListener and not checking for PR if the groovy secure customizer is active | ||
| 574 | 21:49 <vmassol> ok I have an idea | ||
| 575 | 21:51 <vmassol> my idea is to add a hasPermission() method in PrivilegedScriptMacro | ||
| 576 | 21:51 <vmassol> to make the logic customizable | ||
| 577 | 21:51 <vmassol> doing a POC now | ||
| 578 | 22:21 <+sburjan`> lol, I see the build is still running on jenkins | ||
| 579 | 22:23 <rrodriguez> has joined #xwiki | ||
| 580 | 23:06 <vmassol> has quit | ||
| 581 | 23:56 <abusenius> has quit |