IRC Archive for channel #xwiki on 22 March 2012

Last modified by Vincent Massol on 2012/10/18 19:22

00:05 <florinciu1> has quit
00:24 <abusenius> has quit
01:00 <polx> has quit
02:28 <CraigInnes> has joined #xwiki
03:24 <DrLou> has joined #xwiki
03:35 <DrLou> has quit
03:43 <Faryshta> has quit
03:58 <faryshta_> has quit
04:17 <faryshta> has joined #xwiki
04:17 <CraigInnes> has quit
04:23 <sdumitriu> has quit
04:30 <sburjan_> has joined #xwiki
04:31 <sburjan`> has quit
04:31 <sburjan_> is now known as <sburjan`>
04:59 <faryshta> has quit
05:22 <faryshta> has joined #xwiki
05:26 <ssavi> has joined #xwiki
05:30 <ssavi> has left #xwiki
06:01 <Denis1> has joined #xwiki
06:03 <Denis> has quit
06:23 <faryshta> has quit
06:35 <polx> has joined #xwiki
06:37 <faryshta> has joined #xwiki
07:11 <vikus> has joined #xwiki
07:12 <florinciu> has joined #xwiki
07:13 <vikus> I am unable to send mail to [email protected]
07:13 <vikus> i subscribed to list already
07:17 <vikus> florinciu: I checkout GSOC project ideas and want to contribute in it. How can I start ?
07:18 <mflorea> has joined #xwiki
07:18 <+florinciu> hi. a mail on the list is a good start
07:18 <+florinciu> do you get a particular error when trying to send the mail?
07:23 <vikus> yeah
07:24 <vikus> You are not allowed to post to this mailing list, and your message has been automatically rejected.
07:24 <vikus> this one
07:26 <+mflorea> Hi vikus
07:27 <vikus> I want to work on project "Complete overhaul of the linking UI"
07:27 <vikus> I want to know whats the better way to start /
07:27 <+mflorea> that's great
07:27 <vikus> *?
07:28 <+mflorea> you have to send a mail on devs mailing list to describe a bit yourself and to let others know that you want to work on this project
07:28 <+florinciu> vikus: was your subscription complete? did you receive the confirmation mail for the subscription?
07:28 <vikus> I already tried that , but unable to send mail on that.
07:29 <+mflorea> did you read
07:29 <+mflorea> did you register? you have to register first
07:30 <+florinciu> he mentioned he did just before you entered the room. :) but maybe the registration was not completed
07:30 <+mflorea> ok
07:30 <vikus> Yes , I read all this
07:31 <+mflorea> so did you receive the registration mail?
07:31 <vikus> yeas
07:32 <vikus> shows I am already subscribed
07:35 <+mflorea> ok, in this case you have to wait a bit until vmassol comes online, he's managing the devs mailing list and can check what happend with your mails. In the mean time you should download XWiki Enterprise, play with it and then setup your work environment, see
07:36 <+florinciu> just to make sure, you need to have two mails in your inbox. one titled "confirm <code>" and another one titled 'Welcome to the "devs" mailing list'
07:36 <+florinciu> if you have both of them it means your side of the registration is fine. otherwise something else is wrong and you shoudk check with vmassol
07:44 <sdumitriu> has joined #xwiki
07:44 <@sdumitriu> mflorea: I remembered why it's advanced install and not advanced search
07:44 <+mflorea> because it goes directly to install confirmation?
07:44 <@sdumitriu> Since it's supposed to be able to resolve an extension in a repository that's not searchable
07:45 <@sdumitriu> You can't search yet in
07:45 <@sdumitriu> So this is the only way of getting hold of, say, the php rendering macro
07:45 <+mflorea> sure, but we can trick the user into thinking that is an advanced search
07:47 <+mflorea> I want to ajaxify the install, so want to have the same display for extension coming both from searchable repos and non-searchable repos
07:49 <@sdumitriu> Sure, I agree
07:49 <+mflorea> do we need the confirmation for install?
07:49 <@sdumitriu> Just that you'll have to be sure you call resolve when it's an "advanced" search
07:50 <+mflorea> yep
07:50 <@sdumitriu> I'd say yes, since at this step XWiki tries at least to check that all the pieces are in place
07:50 <@sdumitriu> Otherwise you'll just get an error later on
07:50 <+mflorea> ok
07:51 <@sdumitriu> Most package managers do this
07:51 <@sdumitriu> "here's what I'm about to install, continue?"
07:51 <+mflorea> yep
07:52 <@sdumitriu> Going to bed now, bye
07:52 <+mflorea> just a sec
07:52 <+mflorea> :)
07:52 <@sdumitriu> K
07:52 <+mflorea> now, I'll have to implement the progress bar. ofc, the easiest is to pull the server for the job status at short time intervals. Is there any js lib that offers server push?
07:53 <@sdumitriu> WDYM by "js lib offers server push"?
07:53 <@sdumitriu> The server pushes
07:54 <+mflorea> i.e. like you establish a "connection" and whenever the job status changes the server pushes the new status to the client (js)
07:54 <@sdumitriu> I've been pondering about adding support for server push, continuous connections, comentd and the like
07:54 <@sdumitriu> But that's not something easy to do right now
07:54 <+mflorea> ok
07:54 <@sdumitriu> Since that's servlet 3.0
07:55 <+mflorea> in this case I'll do the easy way
07:55 <@sdumitriu> And the initial feeling was that we should postpone that for 5.x
07:55 <+mflorea> ok
07:55 <@sdumitriu> Anything else?
07:55 <+mflorea> nop, thanks and good night :)
07:55 <@sdumitriu> Thanks
07:55 <@sdumitriu> Good luck
07:55 <+mflorea> ;)
07:55 <sdumitriu> has quit
07:58 <deepanshum> has joined #xwiki
08:00 <vmassol> has joined #xwiki
08:19 <tmortagne> has joined #xwiki
08:19 <vikus> has quit
08:49 <jvdrean> has joined #xwiki
08:52 <+tmortagne> looks like there is an issue with Design space
08:52 <+tmortagne> they all display blank content
08:53 <+tmortagne> I guess someone associated an empty sheet with the class or something like that
08:53 <+tmortagne> was working well just two days ago
08:56 <+tmortagne> vmassol: you broke pretty much all design pages
08:56 <+tmortagne> the problem is that the content of thoses design pages is not in a object but right after the include, the sheet is just displaying the informations
08:56 <+tmortagne> so now it's all that is displayed...
08:57 <+tmortagne> removing the ClassSheetBinding for now
08:58 <vmassol> good morning
08:58 <vmassol> tmortagne: what did I do?
08:58 <+tmortagne> vmassol: you associated a sheet with the class
08:58 <vmassol> nope
08:58 <vmassol> ofc not :)
08:58 <+tmortagne> that's what the history say
08:58 <vmassol> all I did was add a comment on marius page
08:59 <+tmortagne> not today
08:59 <+tmortagne> was two days ago
08:59 <vmassol> I haven't even looked at the design space in that timeframe…. strange
09:00 <vmassol> it's definitly not me
09:00 <vmassol> it looks like a bug
09:00 <vmassol> but I wonder who did this
09:00 <+tmortagne> ok that's weird then, someone definitely associated a sheet with the design page anyway, I removed it now
09:01 <vmassol> fixing the ircbot functional tests btw
09:01 <vmassol> took me a while to get to it because my IDE was misbehaving
09:01 <vmassol> had to rollback to an earlier version of it....
09:01 <vmassol> I'm now set up correclty again...
09:02 <+tmortagne> looks like there is  an history bug in any case since now it's saying that I added the Sheet in when I removed the tag object :)
09:02 <+tmortagne> so I don't know exactly when exactly it as been added
09:03 <rrodriguez> has quit
09:03 <+tmortagne> there is a modification on 2010/12/20 10:36 so it's definitely the one but it's associated to you so it's weird
09:03 <+tmortagne> hmm no
09:03 <+tmortagne> not the onne
09:03 <+tmortagne> just looked at the day...
09:03 <vmassol> ok found the issue
09:03 <vmassol> fixing
09:03 <+tmortagne> so the page has been modified without any history
09:04 <+tmortagne> so no way to know when this has been done
09:05 <CIA-120> Vincent Massol master * r366f0c7 / xwiki-platform-core/xwiki-platform-ircbot/xwiki-platform-ircbot-test/xwiki-platform-ircbot-test-tests/src/test/it/org/xwiki/ircbot/test/ui/ : XWIKI-7571: Rewrite the IRC Bot Application to Improve its maintenance and stability ...
09:07 <rrodriguez> has joined #xwiki
09:12 <rrodriguez> has quit
09:39 <vmassol> tmortagne/mflorea: one thing we need to change in the EM UI is the asynchronousness
09:39 <vmassol> right now it takes for ages to to click on "add extension"
09:39 <polx> has quit
09:39 <vmassol> because it queries the remote repos
09:39 <vmassol> and if a repo is slow or if there are several repos it's really long
09:39 <vmassol> would be great to have an empty list that fills in asynchronously
09:39 <+mflorea> sure
09:39 <vmassol> just an idea...
09:40 <vmassol> everytime I clik on add extension I think about this :)
09:40 <+mflorea> I'm on async install right now. Will handle the async search afterwards
09:40 <vmassol> cool
09:42 <sburjan`> has quit
09:42 <sburjan`> has joined #xwiki
09:42 <+tmortagne> not blocking the page like in a livetable should be easy, filling it in live will be harder I think and would probably not bring much value since what's expensive is actually the connection to the server
09:51 <vmassol> also i think we'll need to have a separate instance of e.x.o on a server/VM at some point in order to have max perfs
09:53 <vmassol> I'm trying to install the bot using the EM
09:53 <vmassol> it worked yesterday when I did this from my local repo, I'm now trying using remote repos only
09:53 <vmassol> I get: Caused by: class org.xwiki.extension.ResolveException: Could not find extension dependency [org.pircbotx:pircbotx-1.6]
09:53 <vmassol> which is strange since it's in our nexus repo
09:53 <vmassol>;quick~pircbotx
09:55 <vmassol> ah my bad
09:55 <vmassol> tmortagne: you might want to provide a warning for this maybe in the console:
09:55 <vmassol> extension.repositories=maven-xwiki:maven:
09:55 <vmassol>
09:55 <vmassol> extension.repositories=maven-xwiki:maven:
09:55 <vmassol> I've used the same id for the last entry
09:56 <+tmortagne> indeed a warning would be better
09:59 <vmassol> tmortagne: wouldn't it be nice to cache extensions locally and sync them regularly?
09:59 <vmassol> cache extension == do the same as maven does with the index zip I mean
10:00 <vmassol> if we start to have lots of people using the EM it might be a good thing to do
10:00 <vmassol> it would provide immediate list of avail extensions
10:01 <vmassol> and a scheduler job could refresh that list regulary (once a day) or we could have a sync button for the user to force a sync
10:02 <+tmortagne> well having local index of extensions to search in was my plan at first since that could support anything, has better perf, and allow doing cross server search, but I have been told it was not good for the server statistics...
10:03 <vmassol> I don't understand
10:03 <+tmortagne> ( )
10:03 <vmassol> users who install stuff would still go to the server
10:03 <vmassol> so we would still have stats
10:03 <+tmortagne> vmassol: ludo wanted search stats
10:03 <+tmortagne> no install stats
10:03 <+tmortagne> not
10:03 <+tmortagne> know what people are searching
10:04 <+tmortagne> s/know/knowing/
10:04 <vmassol> sure but 1) he's not the one deciding for the project alone ;) and 2) we need to tell him what it costs
10:04 <vmassol> I don't think it matters what peple search for
10:05 <vmassol> if they find something they like they'll install it
10:05 <vmassol> and that has higher value
10:05 <vmassol> we could also have a feedback form
10:05 <vmassol> when they search something locally and don't find it
10:05 <vmassol> we propose to filla textarea to explain what they're looking for and cannot find
10:05 <vmassol> this will give the project information about stuff users want but can't find
10:06 <vmassol> whatever is filled could be posted direclty in a Wanted Extension wiki page on e.x.o
10:10 <vmassol> I'll ping ludovic
10:13 <vmassol> tmortagne: ok I chatted with ludovic
10:17 <vmassol> and he's ok
10:17 <vmassol> all he'd like is to have install stats
10:18 <vmassol> he's ok to not have search stats
10:18 <+tmortagne> ok
10:20 <sburjan> has joined #xwiki
10:46 <vmassol> tmortagne: btw it's strange that the search is so slow, it should be fast (e.x.o is doing ok and a REST call without the UI should be super fast), something to investigate when you get some time...
10:47 <vmassol> ok I'm done with the documentation of the new IRC Bot:
10:47 <vmassol> enjoy :)
10:48 <+sburjan> do we have the new bot here ? or we have to wait until upgrade ?
10:48 <vmassol> no
10:48 <vmassol> we need 4.0M2
10:48 <vmassol> … unfortunately....
10:48 <+sburjan> gonna be soon then :)
10:49 <+sburjan> vmassol: I also fixed the Windows issue we had with our tests (I'm sure you saw the commit)
10:49 <vmassol> cool
10:49 <+sburjan> so last step is to start excluding tests on IE8
10:49 <+sburjan> I'll run test locally until I manage to excude all tests that fail so our build passes on IE8
10:49 <+sburjan> and then I will create a pull request
10:50 <+sburjan> and ofc, create  a jira issue for this
10:50 <+sburjan> for the IE8 exclude
10:53 <+sburjan> only problem I might run into might be the way Selenium reports IE8's version.. if it also takes in consideration the minor versions that might be a problem. Because then I'll have to specify the exact version, which might not be good since other users can have another version of IE8.
10:58 <vmassol> ofc
10:58 <vmassol> which is exactly why I suggested to you to use a regex
10:58 <+sburjan> exactly :)
10:59 <+sburjan> If i run into this problem, I'll have to add the regex part. but I need to learn it before, because I never used it before
11:05 <+sburjan> I will use compound annotations because I'll do the same for IE9 and Chrome (when the time comes).. and I'm sure we'll have tests which will have more than one ignored browsers. wdyt ?
11:16 <+tmortagne> vmassol: is not very fast for me right now at least
11:16 <vmassol> sure but it's ok especially with a REST query
11:16 <vmassol> it takes like 5-6 seconds when I click on add extension
11:16 <vmassol> I doubt it takes 5-6 seconds for a REST query to
11:17 <vmassol> in any case we need to be sure
11:17 <vmassol> that the issue is only with
11:18 <+tmortagne> sure
11:33 <+sburjan> we have a broken link here, don't know if we ever had a velocity checkstyle file
11:52 <vmassol> sburjan: have you tested your bat file modification on several windows version?
11:55 <+sburjan> no, only on windows xp.
11:55 <+sburjan> is it failing on other windows versions ?
11:55 <vmassol> I hope not
11:55 <+sburjan> we'll find out soom, when we're gonna do the IE9, which is gonna be on a Windows 7
11:55 <+sburjan> *soon
11:55 <vmassol> ok
11:56 <vmassol> there are lots of ways to test for params for windows
11:56 <vmassol> I just want to be sure that the one you have chosen works fro all versions
11:57 <+sburjan> but that code isn't specific to windows XP, I googled about it, and Windows Server, Windows 7 has the same syntax
11:57 <+sburjan> but yes, It was indended to work on all versions of windows
11:57 <vmassol> ok
11:59 <+sburjan> and I'm 95% it works an all newer windows versions :)
12:17 <evalica> has joined #xwiki
12:18 <fmancinelli> has joined #xwiki
12:29 <mflorea> has quit
12:33 <Enygma`> has joined #xwiki
13:04 <CIA-120> Eduard Moraru feature-annotations-merged-with-comments * ra69dfbc / xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/migration/hibernate/ : XWIKI-7540: Merge Annotations with Comments. ...
13:14 <vmassol> evalica: maybe we could link to the logo contest on this page too?
13:14 <vmassol> s/log contest/logo contest page/
13:14 <+evalica> vmassol:  k
13:16 <mflorea> has joined #xwiki
13:19 <deepanshum> has quit
13:30 <vmassol> evalica: the images seem all broken on
13:40 <+sburjan> seems we have some tests failing on Windows + Firefox 11: Tests run: 174, Failures: 2, Errors: 32, Skipped: 0
13:41 <+sburjan> also seems that attachments test don't work on FF either, so it's not only a IE issue
13:47 <deepanshum> has joined #xwiki
14:07 <vishnu> has joined #xwiki
14:13 <arunreddy> has joined #xwiki
14:19 <vishnu> hi
14:20 <vishnu> I am trying to checkout xwiki, but I'm lost :(
14:20 <sdumitriu> has joined #xwiki
14:22 <vishnu> hi sdumitriu
14:22 <@sdumitriu> Hi vishnu
14:22 <@sdumitriu> How
14:23 <@sdumitriu> How's it going
14:25 <vishnu> I am trying to checkout xwiki, but I'm lost :(
14:25 <vishnu> do I need to have some credentials to do so?
14:26 <vmassol> no
14:26 <@sdumitriu> Nope
14:26 <@sdumitriu> But it depends what URL you're using
14:27 <@sdumitriu> Make sure you're not using the developer URL
14:30 <vishnu> I used git to checkout
14:31 <vmassol> vishnu: try googling about git/github
14:36 <DrLou_> has joined #xwiki
14:48 <CIA-120> Vincent Massol master * rbce5a1a / xwiki-platform-core/xwiki-platform-test/src/main/java/org/xwiki/test/ui/browser/ : XWIKI-7625: Allow to skip tests using annotation and allow version to be mentioned in annotation when skipping a test ...
14:49 <silviar1> has joined #xwiki
14:53 <vishnu> vmassol, sdumitriu : I have some experience of working on git and github during my last gsoc 2010
14:54 <vmassol> vishnu: cool, so what's the problem? :)
14:56 <vishnu> actually, I have tried to checkout with a url I found while browsing xwiki, which it didn't allow me to.
14:56 <vishnu>  I think I used wrong url to checkout, can you please guide me? :)
14:56 <vmassol> yes I can
14:56 <vmassol> just use the right url! :)
14:56 <vmassol> and there's no checkout to do
14:56 <vmassol> that's subversion
14:56 <vmassol> just a clone
14:56 <vishnu> :D
14:57 <vishnu> so, should I download from github?
14:57 <vishnu> directly?
14:57 <vmassol> there's no download
14:57 <vmassol> just a clone
14:57 <vmassol> please read up on git again
14:57 <vmassol> you seem to be lacking some basic knowledge
14:57 <vmassol> that you'll need
14:58 <vmassol> (and it's a git newbie telling you that ;) I'm just learning git myself)
14:59 <vishnu> oh! :)  cool!
15:04 <sburjan`> has quit
15:06 <vishnu> vmassol, I think I figured where I went wrong! :) Thanks for the help.
15:08 <vishnu> I went to xwiki github and using the url's I am cloning the xwiki-platform. But its saying the link is "git-read only". Is that a problem?
15:16 <arunreddy> has quit
15:19 <silviar> has joined #xwiki
15:19 <silviar1> has quit
15:20 <silviar1> has joined #xwiki
15:20 <silviar> has quit
15:20 <silviar1> has quit
15:21 <vishnu> has quit
15:24 <jamesxu> has joined #xwiki
15:27 <silviar> has joined #xwiki
15:33 <arunreddy> has joined #xwiki
15:42 <arunreddy> has quit
15:56 <+tmortagne> vmassol: for conflict resolution system I need to provide different versions of the document but even api.Document is not very safe for this since one can call save on it, I would like to add a boolean readonly parameter to api.Document that makes all modification/save related method to do nothing
15:56 <+tmortagne> sounds ok to you ?
15:57 <+tmortagne> basically it's just a new constructor and some if in methods doing modifications
15:58 <vmassol> I cannot answer in just a few seconds… touching Document needs some deep thinking :)
15:59 <vmassol> otp right now
16:00 <+tmortagne> sdumitriu: any though ?
16:00 <+tmortagne> I would like to avoid introducing an extend or Document or XWikiDocument that would be broken when anyone add a new method
16:02 <arunreddy> has joined #xwiki
16:13 <arunreddy> has quit
16:30 <arunreddy> has joined #xwiki
16:32 <@sdumitriu> Back from breakfast
16:32 <jamesxu> has quit
16:33 <@sdumitriu> tmortagne: Is that really needed?
16:34 <@sdumitriu> Where are these objects going to be exposed?
16:35 <+tmortagne> sdumitriu: you get them as data of a "question" asked by the running XAR install in its job status, right now you don't need programming right to this job status
16:35 <vmassol> hmm should we disallow closing issues by users in jira?
16:35 <vmassol> (that would prevent us having to regularly reopen issues to close them again properly)
16:35 <vmassol> wdyt?
16:35 <+tmortagne> vmassol: I think use can only close issue they created
16:35 <vmassol> tmortagne: I know
16:35 <+tmortagne> s/use/user/
16:36 <vmassol> but that doesn't change my question
16:36 <+tmortagne> does it happen that often ?
16:36 <@sdumitriu> vmassol: +1
16:36 <vmassol> every time they try to close one
16:36 <vmassol> ie when they conside rthe issue isn't valid
16:36 <vmassol> because otherwise it's us who close it
16:36 <@sdumitriu> Or when they consider their problem "fixed"
16:37 <+tmortagne> I mean user don't try to close issues very often
16:37 <+tmortagne> but as you want
16:37 <vmassol> ok I'll do it since I don't see a valid reason for them to close it, and it's in line with our rule of assignee set by us
16:37 <vmassol> they'll just comment to ask for the issue to be closed
16:38 <arunreddy> has quit
16:38 <vmassol> done
16:39 <vmassol> tmortagne: got a mail about they're considering it for gsoc apparently
16:40 <vmassol> (you've received it I guess as the reporter)
16:40 <+tmortagne> indeed I just received it
16:40 <+tmortagne> that would be nice even if I'm not sure we could reuse it directly with all our customizations
16:42 <+tmortagne> will continue with normal Document for now, anyway one need proper right to save the document so it's like it was a security breach
16:44 <vmassol> fun:
16:53 <CIA-120> Vincent Massol master * r7e4efe6 / xwiki-platform-core/xwiki-platform-test/src/main/java/org/xwiki/test/ui/browser/ : XWIKI-7625: Allow to skip tests using annotation and allow version to be mentioned in annotation when skipping a test ...
17:01 <silviar> has quit
17:08 <ssavi> has joined #xwiki
17:36 <vmassol> guys, just a reminder that 4.0M2 is planned for next Monday
17:36 <vmassol> ie we have 1 more working day (2 for some)
17:41 <@cjd>     /** Colon symbol. */
17:41 <@cjd>     private static final String COLON = ":";
17:41 <@cjd> IMO we should move away from this kind of thing
17:43 <@cjd> re the "#define TEN 10 // as if it might change" which ended up in the best code comments on stackoverflow
17:43 <vmassol> what do you suggest?
17:44 <vmassol> removing duplication checks?
17:44 <@cjd> Yes, remove them and ask that we use judgement.
17:48 <vmassol> cjd: where is this example from?
17:49 <@cjd> XWikiHibernateVersioningStore
17:50 <vmassol> I don't see any COLON there
17:50 <vmassol> is it something you're adding?
17:51 <@cjd> ahh, it was removed since 3.4
17:51 <@cjd> I'm looking at the older version
17:52 <@sdumitriu> Usually most of these can be replaced by ':' (char) which doesn't trigger duplication errors
17:53 <vmassol> and also usually you can use something like String.format
17:53 <@sdumitriu> I'm against removing the duplication checks, even though it caused me some pains
17:53 <vmassol> (which is why I wanted to see the real usage)
17:53 <@cjd>
17:54 <vmassol> cjd: is this on a branch?
17:54 <vmassol> (cause I can't see it locally in master)
17:54 <@cjd> It's on 3.4
17:55 <@cjd> could have been changed to += and the need would go away.
17:55 <vmassol> that code is bad
17:55 <vmassol> that's bad code to construct a serialized ref
17:55 <@cjd> ahh, indeed
17:56 <@cjd> Looks like Denis1 got it when he added Locale to references.
17:57 <@cjd> These kinds of checks help people who are new to the code not fall into obvious antipatterns, they arguably help veterine developers who might otherwise get lazy, but they also make for some really goofie workarounds once in a while.
18:00 <vmassol> cjd: to be honest I've always found good solution I think
18:00 <vmassol> and I have yet to find a case where there isn't a valid solution
18:01 <vmassol> (not saying it doesn't exist, I'm sure it does)
18:01 <Denis1> is now known as <Denis>
18:02 <@cjd> I think where that check rubbed me the wrong way was when the string was never going to change so calling it something else made no sense
18:02 <@sdumitriu> The one case that bothers me most is when catching several types of exceptions and having to write a different log message for each
18:02 <vmassol> yes
18:02 <vmassol> but
18:02 <+Denis> cjd: do not understand what you means, what do I have got ?
18:02 <@cjd> like you end up with a /** This is defined 800 other places, if you change it here everything breaks. */
18:02 <vmassol> what I'm saying is that in most cases you don't need to have a static at all
18:03 <@cjd> Denis: It was a silly piece of code (which was serializing in a bad way) and I'm pretty sure you removed it, which is good.
18:03 <vmassol> you either create a factory of some kind or simply factor in a method (better, introduce a new service if needed) or use String.format()
18:03 <vmassol> btw we're already exculding some common strings from the check
18:04 <vmassol> and we can add some others if we cant
18:04 <vmassol> s/cantwant/
18:04 <@cjd> hmm
18:04 <vmassol>     <module name="MultipleStringLiterals">
18:04 <vmassol>       <property name="ignoreStringsRegexp" value='^("")|("[0-9]")|(" ")|("\]")|("\] = \[")|("unchecked")$'/>
18:04 <vmassol> ahah
18:05 <vmassol> someone added this one (which I don't agree about :)):
18:05 <vmassol> ] = [
18:05 <vmassol> IMO this isn't valid to add as an exception
18:05 <vmassol> the soltuion to this one is the new SLF4J or String.format() IMO
18:05 <@cjd> I try to be careful about creating one time use objects because I understand the bigO jvm is not very good at dealing with lots of tiny garbage.
18:05 <vmassol> ah I read the opposite
18:06 <ssavi> has left #xwiki
18:06 <@cjd> Also it becomes an object which is being used as a function.
18:06 <vmassol> anyway String.format will create less small objects
18:07 <@cjd> actually for the sake of that silly example, another + ((key != null) ? "this" : "that") would have been better performance wise since IIRC it uses string builders to implement the + operator.
18:08 <@cjd> but it becomes a bit of an eyesore
18:09 <ssavi> has joined #xwiki
18:10 <ssavi> hi
18:10 <@cjd> howdy
18:11 <ssavi> I have a problem in getting responses to my mails though i 'm subscribed to devs list
18:13 <@cjd> are you getting any mail from the list?
18:13 <ssavi> yeah
18:13 <vmassol> cjd: found some statics for you in ResourceReference ;)
18:13 <ssavi> I 'm getting the other mails.
18:13 <@cjd> ssavi: I see 2 replies to your message, one from you. is that the same as what you see?
18:14 <ssavi> yeah..
18:14 <ssavi> i had to ask my friend to forward the mail to me
18:14 <ssavi> as I didn't get any
18:14 <ssavi> :(
18:14 <@sdumitriu> Maybe it was marked as spam by your mailbox?
18:16 <@cjd> yes, check your spam directory, in the mean time you can keep tabs on the list by going here:
18:16 <ssavi> Yeah.. I didn't think of checking my spam as non of my xwiki mails go into it. Thanks
18:16 <ssavi> It's in spam
18:16 <CIA-120> Vincent Massol master * ra9d5b57 / (2 files in 2 dirs): [Misc] Remove string concatenations -
18:17 <vmassol> in ResourceRefernce, what it means is that we're lacking a service to serialize key/value pairs in text
18:17 <vmassol> which btw would mean we would get consistent behavior everywhere if used
18:18 <vmassol> i.e. use [] around values
18:19 <@sdumitriu> Denis: There's a problem with the migration manager
18:19 <@sdumitriu> checkDatabase() checks if the database version is smaller than the largest *available* migrator
18:20 <+Denis> almost yes, what is your issue ?
18:20 <@sdumitriu> But only *needed* migrators will change the database version
18:20 <+Denis> please describe your use case ?
18:20 <@sdumitriu> So if the most recent migrator will return false to shouldExecute, then I always get an exception saying that the database needs migrations
18:23 <@sdumitriu> There are two possible fixes
18:23 <@sdumitriu> After running the migrations, set the version to the largest available migrator, even if it didn't run (because it didn't need to)
18:23 <@sdumitriu> Or when checking the database version, compare against the largest needed migrator, not against the largest available one
18:23 <@sdumitriu> WDYT?
18:24 <+Denis> I remember to have do such fix, a while ago, on 4.x
18:24 <@sdumitriu> OK, I'm looking at 3.5
18:24 <@sdumitriu> Since I have to write a Postgres only migrator
18:25 <+Denis> I have choose your first proposal, since there is not large usage of shouldExecute, which is mostly to skip migration that fix older broken migrator that has been fixed in the meantime
18:25 <@sdumitriu> I agree
18:26 <@sdumitriu> I'll merge your change on the 3.5 branch then
18:26 <+Denis> if you need it in 3.5, we can backport the fix
18:27 <@sdumitriu> This one?
18:27 <+Denis> right
18:27 <@sdumitriu> Hm, weird, I have the same code in 3.5 but it still fails
18:28 <@sdumitriu> Ah, I'm on a snapshot
18:28 <@sdumitriu> That could be the reason
18:28 <@sdumitriu> (older snapshot)
18:29 <evalica> has quit
18:36 <jvdrean> has quit
18:36 <evalica> has joined #xwiki
18:36 <@cjd> re ResourceReference, I would have used an iterator rather than having a static mutable hashmap sitting there.
18:37 <@cjd> Globals, even ones which are relitively safe such as that, go against everything I believe.
18:37 <vmassol> my solution for ResourceReference is this:
18:38 <evalica> has quit
18:40 <vmassol> (I'm adjusting it)
18:40 <vmassol> and the next step is to make it a reusable class
18:40 <@cjd> That looks nice. I've gotten to liking static functions when they don't touch the state of the object because it's a way for me to declare that.
18:41 <vmassol> do you have an example of what you mean?
18:43 <@cjd>
18:44 <vmassol> I know anonymous inner classes
18:44 <vmassol> but I don't undestand what you mean in this context
18:44 <@cjd> in that context, "static" is telling the reader: "you don't need to even look at the object state, everything you need to know about this function is between the { and the }
18:44 <@cjd> "
18:45 <vmassol> that's true and good… I think I'm lost :)
18:45 <@cjd> This is static methods, not static inner classes
18:46 <vmassol> ah static methds… yuck I hate them :)
18:46 <@cjd> Theoretically a static function could interact with static (global) state but I would never write anything with global mutable state so if it's my code, that won't happen.
18:46 <evalica> has joined #xwiki
18:47 <@cjd> I really like them because you can reason about them in isolation. You can also move them around.
18:47 <vmassol> they're simply bad design for me
18:47 <vmassol> ie a Class is missing in the design
18:48 <evalica> has quit
18:49 <@cjd> I am of the opinion that you shouldn't create an object to do a function's job. Sometimes you really need an object with long running state, other times using a class feels to me like hammering a square peg into a round hole.
18:49 <ssavi> has quit
18:50 <@cjd> I'm interested in learning a little bit of Haskell too.
18:51 <ssavi> has joined #xwiki
19:16 <ssavi> has quit
19:18 <fmancinelli> has quit
19:26 <CIA-120> Vincent Massol master * radcbf62 / (2 files in 2 dirs): [Misc] First pass at implementing a more generic version to implement ...
19:26 <vmassol> cjd: does this look good? Any idea of how to do better?
19:27 <vmassol> (assume that this will be moved to an ExtendedStringBuilder class with appendList, appendMap, etc)
19:28 <vmassol> (same concept as what commons lang did with )
19:28 <vmassol> (I'll probably look at extending their class)
19:29 <abusenius> has joined #xwiki
19:29 <vmassol> (need to look at their FormatFactory stuff)
19:30 <vmassol> oops  I meant
19:31 <vmassol> but actually thinking abut it using ExtendedMessageFormat might be a good idea :)
19:31 <vmassol> got to go, bb in 1 hour
19:43 <mflorea> has quit
19:48 <Enygma`> has quit
20:12 <@cjd> vmassol: just for the sake of science, here's how I would approach that kind of problem
20:12 <@cjd> I added a few extra comments to explain myself.
20:13 <@cjd> using + rather than ).append( on string constants theoretically should encourage the compiler to do constant folding
20:14 <@cjd> and there is some duplication in there but it's a tightrope walk between reasonably performance and readability
20:15 <@cjd> making the reader go to the top of the page does not help anything
20:20 <@cjd> note: I didn't compile that, which is clear from line 248
20:26 <tmortagne> has quit
20:28 <CIA-120> Andreas Jonsson feature-security-authorization * rcdf04d6 / xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/xwikivars.vm : Setting the random space and page names to constant values for better right service cache utilization. (+88 more commits...) -
21:01 <ssavi> has joined #xwiki
21:26 <fmancinelli> has joined #xwiki
21:44 <CIA-120> Sergiu Dumitriu master * rca10280 / xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/ : [misc] Applied codestyle -
21:44 <CIA-120> Sergiu Dumitriu master * rd3b67f0 / xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xwiki.postgresql.hbm.xml : XWIKI-7539: Hibernate versioning broken with non-ascii characters when using a PostgreSQL database ...
21:44 <CIA-120> Sergiu Dumitriu master * reeac01a / (3 files in 3 dirs): XWIKI-7564: Upgrade from a version before 3.3 fails when running on a PostgreSQL database ...
21:44 <CIA-120> Sergiu Dumitriu master * r24844a1 / xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/ : XWIKI-7644: Add support for PostgreSQL as a known DatabaseProduct ...
21:48 <CIA-120> Sergiu Dumitriu stable-3.5.x * r7d909ab / xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/ : XWIKI-7644: Add support for PostgreSQL as a known DatabaseProduct ...
21:48 <CIA-120> Sergiu Dumitriu stable-3.5.x * rad983a6 / (3 files in 3 dirs): XWIKI-7564: Upgrade from a version before 3.3 fails when running on a PostgreSQL database ...
21:48 <CIA-120> Sergiu Dumitriu stable-3.5.x * r5edc6ed / xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xwiki.postgresql.hbm.xml : XWIKI-7539: Hibernate versioning broken with non-ascii characters when using a PostgreSQL database ...
21:52 <CIA-120> Sergiu Dumitriu stable-3.5.x * r5857b5f / (2 files in 2 dirs): XE-1133: Use the PostgreSQL-specific mapping file when buiding the pgsql profile ...
21:52 <CIA-120> Sergiu Dumitriu master * r741b899 / (2 files in 2 dirs): XE-1133: Use the PostgreSQL-specific mapping file when buiding the pgsql profile ...
21:56 <evalica> has joined #xwiki
21:59 <evalica> has quit
22:00 <sdumitriu> has quit
22:00 <vmassol> cjd: new version:
22:01 <vmassol> now all we need to do is decide where we put that XWikiStyle class in commons...
22:03 <vmassol> I'll send a proposal mail
22:06 <@cjd> does XWikiStyle reference any of the state of the containing class?
22:07 <vmassol> not sure I understand
22:07 <vmassol> you can see the full code in my gist
22:08 <@cjd> After looking more carefully, it appears that it doesn't.
22:08 <@cjd> IE you could copy it into it's own .java file or into another class without breaking it.
22:09 <@cjd> private final String hi = "hi";  private class Inner { public void printHi() { System.out.println(hi); } } works IIRC
22:10 <@cjd> So I usually try to make inner classes static so they become nested classes and the reader knows there's nothing strange going on.
22:12 <vmassol> bbl
22:12 <@cjd> ok
22:15 <vmassol> has quit
22:29 <deepanshum> has quit
22:52 <sburjan> has quit
23:20 <fmancinelli> has quit
23:21 <abusenius> has quit
23:32 <ssavi> has quit
23:33 <vmassol> has joined #xwiki
23:36 <ssavi> has joined #xwiki
23:36 <ssavi> has left #xwiki

Get Connected