Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Oj causing MultiJSON build to fail #53

Closed
sferik opened this Issue December 10, 2012 · 23 comments

2 participants

Erik Michaels-Ober Peter Ohler
Erik Michaels-Ober

For some reason, the MultiJSON's continusous integration broke 7 months ago and didn't get fixed until today. At some point over the past 7 month, a new error related to Oj emerged. It may very well be a bug in MultiJSON, not in Oj. I'm having trouble reproducing it locally. I thought you might have an idea about what the issue is. It does seem to be related to Oj, since the JRuby specs, which skip Oj, are passing. Arguably, we should not skip the Oj specs on JRuby, but that's a different issue.

Anyway, let me know if you have any ideas.

Peter Ohler
Owner

Where can I find the test files? I did not see them in the multi_json/spec directory. I wonder if the problem is just the expected Exception.

Erik Michaels-Ober

The specs are the tests. You can run them with the command:

bundle exec rake spec
Peter Ohler
Owner

I forgot to do a pull. I see the file now.

Erik Michaels-Ober

I thought we set the correct exception in intridea/multi_json@7d90453 but maybe that changed.

Peter Ohler
Owner

hmm, I just ran the tests to see if I could find out why the ParseError was not matched and the tests ran clean. I wonder what is different on Travis.

By the way, you can still run the tests for JRuby. They should be fine. I don't think the bug I uncovered is relevant to the multi_json adapter.

Peter Ohler
Owner

Line numbers are all off on travis as well. Not very helpful. Maybe it is a Linux related difference. I will not have access to my Ubuntu box for a while. Are you able to test on Linux?

Erik Michaels-Ober

I'll re-enable the JRuby tests as soon as this issue is resolved (since the build will be failing anyway until then).

The specs all pass on my Mac, both under OS X and Linux using Vagrant. Have you ever tried Vagrant? It requires Oracle VM VirtualBox. I've found it the easiest way to get a Linux environment up and running on my Mac. You might want to give it a try. Maybe I need to use a different version of Linux. The one major difference between my Vagrant box and Travis is that Travis uses 32-bit Ubuntu 12.04 and I'm using the 64-bit version.

Peter Ohler
Owner

My Ubuntu machine is set up as a 64 server as well. Odd that we get the same results on all Ruby versions. Would it be possible to insert a puts() and another rescue for Exception to find out what class travis is getting?

Erik Michaels-Ober

Feel free to fork the repo, add whatever debugging output you want, and setup your fork to build on Travis. Unfortunately, I can't add you as a collaborator on the multi_json repo since I am not an admin.

Peter Ohler
Owner
Erik Michaels-Ober

Thanks Peter. Again, I suspect this is a bug in MultiJSON, not Oj. I really appreciate your help tracking it down. No big rush.

Peter Ohler
Owner

I'm having trouble getting travis to pick up my fork but in the mean time. You might want to change line 48 in multi_json.rb to the following to get rid of the variable not defined warning.

  return @adapter if instance_variable_defined?(:@adapter) && @adapter
Peter Ohler
Owner

Travis is coming out clean for the Oj errors for me.

https://travis-ci.org/ohler55/multi_json

Erik Michaels-Ober

Very strange. I just restarted the build: https://travis-ci.org/intridea/multi_json/builds/1200931

Erik Michaels-Ober

Still failing. Is it possible that adding this line fixed it?

rescue Exception => e

If so, it's strange the following line isn't being executed:

puts "*** #{e.class}: #{e.message}"
Peter Ohler
Owner

I took it out and it still works. Too strange.

Peter Ohler
Owner

I noticed the jruby tests are failing for me and not for you as well.

Peter Ohler
Owner

I wonder if travis is building a different branch for you.

Erik Michaels-Ober

Yeah, we basically have reverse build matrices. Everything that's passing for me is failing for you and vice versa.

Erik Michaels-Ober

Oh, strange, it looks like Travis is building an 8-month-old ref: intridea/multi_json@471b556

Peter Ohler
Owner

Problem solved. :-)

Erik Michaels-Ober sferik closed this December 10, 2012
Erik Michaels-Ober

Thanks for your help. I should have realized it was building old code.

Peter Ohler
Owner

Glad to be of help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.