| 2011-05-25 04:26:41 utc | biv | hey jmettraux |
| 2011-05-25 04:26:47 utc | jmettraux | hello |
| 2011-05-25 04:27:13 utc | biv | hang on, gisting something |
| 2011-05-25 04:27:45 utc | biv | https://gist.github.com/990323 |
| 2011-05-25 04:28:25 utc | biv | is there something special I have to do to escape from the cursor block? The code runs through all of the archive_catalog_integrations as it should, then it just stops doing anything |
| 2011-05-25 04:28:54 utc | biv | it's like it pauses in the iterator or in the cursor (which is why I put the break statement there) |
| 2011-05-25 04:29:13 utc | jmettraux | if you could determine where it pauses... |
| 2011-05-25 04:29:52 utc | jmettraux | engine.noisy = true |
| 2011-05-25 04:29:58 utc | biv | ok |
| 2011-05-25 04:30:04 utc | jmettraux | makes the engine shout yellow to the stdout |
| 2011-05-25 04:30:28 utc | biv | running it now |
| 2011-05-25 04:30:39 utc | jmettraux | _break is not necessary since it's a cursor |
| 2011-05-25 04:30:48 utc | biv | yeh, I know |
| 2011-05-25 04:30:54 utc | biv | that was just me trying to make it leave the cursor |
| 2011-05-25 04:30:59 utc | biv | experiment |
| 2011-05-25 04:31:04 utc | biv | getting loads of yellow txt |
| 2011-05-25 04:31:15 utc | jmettraux | where does it stop ? |
| 2011-05-25 04:31:23 utc | biv | it's still running |
| 2011-05-25 04:31:35 utc | jmettraux | iterating ? |
| 2011-05-25 04:31:36 utc | biv | will let you know where |
| 2011-05-25 04:31:43 utc | jmettraux | ah ok |
| 2011-05-25 04:31:46 utc | biv | it has to scan a whole lot of xml files before it can iterate |
| 2011-05-25 04:31:49 utc | jmettraux | ok |
| 2011-05-25 04:31:54 utc | jmettraux | back after lunch |
| 2011-05-25 04:32:01 utc | biv | enjoy |
| 2011-05-25 04:38:25 utc | biv | ok, thanks, the noisy flag helped me find my mistake |
| 2011-05-25 04:38:27 utc | biv | have it working now |
| 2011-05-25 04:41:39 utc | jmettraux | ah, great |
| 2011-05-25 11:58:08 utc | MCamou | hi everyone |
| 2011-05-25 11:58:21 utc | MCamou | Having a problem with Rufus-Cloche and JRuby 1.6.1+ |
| 2011-05-25 11:59:31 utc | MCamou | in cloche.rb:307 we have |
| 2011-05-25 11:59:42 utc | MCamou | file = File.new(fn) rescue nil |
| 2011-05-25 11:59:45 utc | MCamou | followed by |
| 2011-05-25 11:59:51 utc | MCamou | file.flock(File::LOCK_EX) unless @nolock |
| 2011-05-25 12:00:06 utc | MCamou | however, according to http://jira.codehaus.org/browse/JRUBY-5627 |
| 2011-05-25 12:00:17 utc | jmettraux | hello Mario, which platform ? |
| 2011-05-25 12:00:35 utc | MCamou | JRuby on OS X and Mac |
| 2011-05-25 12:00:58 utc | MCamou | (btw… hi John :) |
| 2011-05-25 12:01:05 utc | jmettraux | :-) |
| 2011-05-25 12:01:07 utc | MCamou | according to the JRuby bug report |
| 2011-05-25 12:01:23 utc | MCamou | some operating systems allow setting LOCK_EX on files opened for read only. However, this is not specified in http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html. In fact, on Solaris, when trying to get an exclusive lock on a file opened only for read, the OS will return EBADF. So this isn't really a MRI vs JVM issue, but an OS issue. Any code that depends on this behavior in MRI is not portable. |
| 2011-05-25 12:01:52 utc | MCamou | I meant… JRuby on OS X and Linux :) |
| 2011-05-25 12:03:04 utc | jmettraux | ok, cloche is not trying to open files that are read-only |
| 2011-05-25 12:03:31 utc | MCamou | no, but by default File.new(fn) will open the file read-only right? |
| 2011-05-25 12:03:40 utc | MCamou | or at least that's what I gathered :) |
| 2011-05-25 12:04:22 utc | jmettraux | true |
| 2011-05-25 12:04:30 utc | jmettraux | well |
| 2011-05-25 12:04:34 utc | jmettraux | no |
| 2011-05-25 12:05:02 utc | jmettraux | ah yes |
| 2011-05-25 12:05:10 utc | jmettraux | http://www.ruby-doc.org/core/classes/File.html#M000070 |
| 2011-05-25 12:05:22 utc | jmettraux | sorry, was confusing .new and .open |
| 2011-05-25 12:05:34 utc | MCamou | heh…that happens |
| 2011-05-25 12:05:58 utc | jmettraux | what happens when you change File.new(fn) to File.new(fn, 'w') ? |
| 2011-05-25 12:06:06 utc | MCamou | let's see... |
| 2011-05-25 12:06:40 utc | MCamou | hmmmm |
| 2011-05-25 12:06:49 utc | MCamou | IOError: not opened for reading |
| 2011-05-25 12:06:50 utc | MCamou | read at org/jruby/RubyIO.java:2696 |
| 2011-05-25 12:06:50 utc | MCamou | do_get at /home/devel/.gem/jruby/1.8/gems/rufus-cloche-0.1.21/lib/rufus/cloche.rb:276 |
| 2011-05-25 12:07:36 utc | jmettraux | ok, let's try File.new(fn, 'rw') |
| 2011-05-25 12:08:03 utc | MCamou | I think it should be 'r+' |
| 2011-05-25 12:08:11 utc | MCamou | http://www.ruby-doc.org/core/classes/IO.html |
| 2011-05-25 12:08:13 utc | MCamou | let's see... |
| 2011-05-25 12:08:21 utc | jmettraux | ok |
| 2011-05-25 12:08:58 utc | MCamou | bingo! |
| 2011-05-25 12:09:01 utc | MCamou | r+ works |
| 2011-05-25 12:09:03 utc | jmettraux | great |
| 2011-05-25 12:09:33 utc | jmettraux | let me update rufus-cloche |
| 2011-05-25 12:09:37 utc | MCamou | great! |
| 2011-05-25 12:09:54 utc | MCamou | thanks a zillion |
| 2011-05-25 12:09:57 utc | jmettraux | (I have to test on MRI and co first) |
| 2011-05-25 12:10:05 utc | jmettraux | thanks for all the investigation |
| 2011-05-25 12:10:23 utc | MCamou | thanks to you for the quick response! (as always :) ) |
| 2011-05-25 12:10:45 utc | jmettraux | seems to work very well |
| 2011-05-25 12:12:51 utc | MCamou | nice |
| 2011-05-25 12:14:01 utc | jmettraux | preparing new gem |
| 2011-05-25 12:14:13 utc | MCamou | that was fast! :) |
| 2011-05-25 12:19:41 utc | jmettraux | https://rubygems.org/gems/rufus-cloche released, many thanks !! |
| 2011-05-25 12:21:21 utc | MCamou | thanks to you! |
| 2011-05-25 12:21:40 utc | jmettraux | how long did it take to find the issue ? |
| 2011-05-25 12:22:04 utc | MCamou | well, at first I thought it was a JRuby problem |
| 2011-05-25 12:22:36 utc | MCamou | but while waiting for an answer in the JRuby IRC I googled a bit more and found the link I sent you earlier |
| 2011-05-25 12:23:01 utc | jmettraux | precious |
| 2011-05-25 12:23:08 utc | MCamou | so… make it about half an hour or so |
| 2011-05-25 12:23:30 utc | MCamou | plus about 10 minutes to fix :) |
| 2011-05-25 12:23:40 utc | MCamou | including investigation |
| 2011-05-25 12:24:06 utc | jmettraux | 40 minutes, not bad :-) |
| 2011-05-25 12:24:09 utc | MCamou | nope! |
| 2011-05-25 12:25:20 utc | MCamou | hmmmm…ruote.gemspec references rufus-cloche >= 0.1.21 |
| 2011-05-25 12:25:47 utc | MCamou | I assume I can safely update it to 1.0.1 right? or is it 1.0.2 now? |
| 2011-05-25 12:26:00 utc | jmettraux | 1.0.1, safely |
| 2011-05-25 12:26:12 utc | jmettraux | please tell me if there is something wrong with it |
| 2011-05-25 12:26:17 utc | MCamou | yep |
| 2011-05-25 12:26:24 utc | MCamou | you'll be the first to know := |
| 2011-05-25 12:26:25 utc | MCamou | :) |
| 2011-05-25 12:26:39 utc | jmettraux | :-) |