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

FYI: runtime dependency json 1.8.x #18

Closed
cdenneen opened this issue Mar 31, 2016 · 6 comments
Closed

FYI: runtime dependency json 1.8.x #18

cdenneen opened this issue Mar 31, 2016 · 6 comments
Labels

Comments

@cdenneen
Copy link

This is just as FYI:

This gem since Sept when 1.1.3 was accidentally released without json runtime dependency has allowed systems shipped with json in ruby packages (Centos 7 with version 1.7.7) to work just fine for json dependent gems (like aws-sdk).
With the the 1.2.x release the dependency is back and systems that don't have ruby-devel (or equivalent on Windows)

This inadvertently caused systems that didn't realize this dependency was necessary past 7 months in any sort of configuration management, autoscaling scenario, etc to fail because normal "gem install aws-sdk" now would fail because of the missing Ruby Devel dependency to build json with native extensions.

Note is systems built with things like Puppet Enterprise 201x.x.x are shipping with vendored ruby so if one is relying on installed aws-sdk within that using something like "pe_gem" most likely they wouldn't have a reason to have ruby installed on the system.

@puppetlabs @aws

@trevorrowe
Copy link
Contributor

I am open to a discussion on possible work-arounds. I added the explicit dependency back because Ruby 1.9 ships with an older version of JSON. This version can not parse JSON scalar literal values:

# in json 1.5.5 which ships with 1.9
JSON.parse('1') #=> raises an error

# in json 1.8.1+ which ships with 2.0+
JSON.parse('1') #=> 1

What if I replaced the hard dependency on json >= 1.8.1 and replaced it with the json_pure gem? I could add a small amount of code to attempt to load the normal json gem, and follow-up with a load of json pure.

I'll put together a pull request as an example.

@ScottAllSet
Copy link

This is a blocking issue for my company. We're using aws-sdk in Chef to deploy Windows applications. Thank you for looking into it.

@trevorrowe
Copy link
Contributor

I went ahead and merged the change and cut a 1.2.2 patch release.

@ScottAllSet
Copy link

Thank you!

@cdenneen
Copy link
Author

cdenneen commented Apr 1, 2016

@trevorrowe Thanks... my initial test seems to be good. I'll have my teams test their Windows and Linux builds that were failing but I think we are good with this fix. Thanks again!

@xeron
Copy link

xeron commented Apr 1, 2016

This PR fixed runtime/gem load issue for us, but now we're getting another one when using aws-sdk and json inside Chef:

TypeError: wrong argument type JSON::Pure::Generator::State (expected Data)

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

No branches or pull requests

4 participants