Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using MultiJson instead of json_pure #157

Merged
merged 1 commit into from Dec 5, 2012
Merged

Conversation

rwz
Copy link
Contributor

@rwz rwz commented Dec 5, 2012

We use engineyard gem as a dependency in our rails app and have problems with json_pure in its dependencies.

Because our app is quite big, we use a lot of other gems, many of which depend on json gem. This produces situations, where you don't really know what implementation you're using and what exactly gets loaded when you do 'require "json"'.

Also, we had a very hard-to-track bug related to that. The problem was that we couldn't recreate it in development, cause it was using different "json" from production.

Well, anyway. Depending on multi_json seems to be a great choice for you guys, mostly because it doesn't break things in apps like ours. Also, it uses pure-ruby single-file implementation called okjson if nothing more speedy is available, so folks on jruby or rubinius won't be left behind by this change.

Somewhat relevant: engineyard/engineyard-serverside-adapter#3

@martinemde
Copy link
Contributor

You just made me notice we don't actually use multi_json anywhere in engineyard gem anymore. All the json stuff was extracted to engineyard-cloud-client (the api client gem). I'm going to remove the dep on any json library from engineyard rather than merge this. I did merge your engineyard/engineyard-serverside-adapter#3 pull request.

What are you using the engineyard gem for in your app? Would using the cloud-client gem directly work? There's a lot of CLI related cruft in the engineyard gem, so it's best not to include it into your app when possible. However, I realize people do this anyway, so I'd like to make it as compatible as possible.

I will make the modifications to engineyard/engineyard-cloud-client to use MultiJson. You're absolutely right that this is the right library to use in almost all cases. Thank you for your pull requests.

@martinemde
Copy link
Contributor

Actually, engineyard-cloud-client already uses multi_json, so removing the dep from engineyard gem, and merging your adapter pull request, is all that needs to happen. The dep on multi_json will come through from engineyard-cloud-client.

Thanks again for pointing this out. I'll get a new release of engineyard gem out soon. I just have a little thing to fix in serverside before I can release.

@martinemde martinemde reopened this Dec 5, 2012
martinemde added a commit that referenced this pull request Dec 5, 2012
Using MultiJson instead of json_pure
@martinemde martinemde merged commit d509d67 into engineyard:master Dec 5, 2012
@martinemde
Copy link
Contributor

I decided to merge this anyway. I was thinking I could remove the usage of json in the tests, but I can't easily do so. Merged now. Thanks again.

@rwz
Copy link
Contributor Author

rwz commented Dec 6, 2012

Well, if it's only needed in tests, it's safe to move multi_json to from runtime dependencies to development dependencies, right?

@rwz
Copy link
Contributor Author

rwz commented Dec 6, 2012

Oh, I've just noticed you already did that.

@martinemde
Copy link
Contributor

Yep, I just merged your pull request and then made that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants