Ohai

Support multiple JSON libraries

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.3.4
  • Component/s: None
  • Labels:
    None

Description

We should support multiple JSON libraries, in decending order of preference:

YAJL
JSON
JSON-Pure

Activity

Hide
Joshua Timberman added a comment - 09/Jul/09 11:27 PM

Merged in addition of yajl from adamhjk/ohai-99.

Show
Joshua Timberman added a comment - 09/Jul/09 11:27 PM Merged in addition of yajl from adamhjk/ohai-99.
Hide
Gábor Vészi added a comment - 16/Aug/09 4:39 PM

In gentoo systems if you try to manage your gems with ebuilds, you can't have json and json_pure installed at the same time because they define some overlapping files. The only problem is, that some of chef's dependencies (like merb) are depending on json_pure, so it's impossible to install chef with portage (without any nasty hacks) while it depends on the json gem.

Show
Gábor Vészi added a comment - 16/Aug/09 4:39 PM In gentoo systems if you try to manage your gems with ebuilds, you can't have json and json_pure installed at the same time because they define some overlapping files. The only problem is, that some of chef's dependencies (like merb) are depending on json_pure, so it's impossible to install chef with portage (without any nasty hacks) while it depends on the json gem.
Hide
AJ Christensen added a comment - 01/Oct/09 1:26 AM

Gentoo should happily allow both json-pure and json to exist on a system - this seems very broken. You should generally always get both, but prefer the ext compiled version of JSON.

YAJL looks interesting, going to look into this.

Show
AJ Christensen added a comment - 01/Oct/09 1:26 AM Gentoo should happily allow both json-pure and json to exist on a system - this seems very broken. You should generally always get both, but prefer the ext compiled version of JSON. YAJL looks interesting, going to look into this.
Hide
Gábor Vészi added a comment - 01/Oct/09 7:43 AM

The problem is, that both the json and the json_pure gems install the following files:

/usr/bin/edit_json.rb
/usr/bin/prettify_json.rb
/usr/lib64/ruby/gems/1.8/bin/edit_json.rb
/usr/lib64/ruby/gems/1.8/bin/prettify_json.rb

If I forcefully install both json and json_pure, then uninstall json_pure, it will remove these files and will render the json gem useless too.

Show
Gábor Vészi added a comment - 01/Oct/09 7:43 AM The problem is, that both the json and the json_pure gems install the following files: /usr/bin/edit_json.rb /usr/bin/prettify_json.rb /usr/lib64/ruby/gems/1.8/bin/edit_json.rb /usr/lib64/ruby/gems/1.8/bin/prettify_json.rb If I forcefully install both json and json_pure, then uninstall json_pure, it will remove these files and will render the json gem useless too.
Hide
AJ Christensen added a comment - 02/Oct/09 4:44 AM

YAJL threw me a little and will be revisiting this after release.

Show
AJ Christensen added a comment - 02/Oct/09 4:44 AM YAJL threw me a little and will be revisiting this after release.
Hide
AJ Christensen added a comment - 06/Oct/09 11:57 AM

Fixed, merged.

Show
AJ Christensen added a comment - 06/Oct/09 11:57 AM Fixed, merged.

People

Vote (1)
Watch (1)

Dates

  • Created:
    19/Jun/09 4:18 PM
    Updated:
    06/Oct/09 11:58 AM
    Resolved:
    06/Oct/09 11:58 AM