oj dependency breaks support for JRuby
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 67/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- json, ruby
- Domain
- build-system
Research direction
Start by reproducing the reported gem install shopify_api failure on JRuby and locate the project's oj dependency declaration and JSON usage. Confirm the dependency change preserves the existing behavior by running the available test suite and verifying that the gem installs successfully on JRuby.
Written by the indexing model from the issue text.
Description
Issue summary
Before opening this issue, I have:
- Upgraded to the latest version of the package
shopify_apiversion:- Ruby version:
- Operating system:
[ ] Setlog_level: :debugin my configuration, if applicable- Found a reliable way to reproduce the problem that indicates it's a problem with the package
- Looked for similar issues in this repository
[ ] Checked that this isn't an issue with a Shopify API- If it is, please create a post in the Shopify community forums or report it to Shopify Partner Support
Expected behavior
The gem should install.
Actual behavior
The gem does not install because the oj dependency requires C extension support.
Steps to reproduce the problem
- Run
gem install shopify_apion JRuby
Debug logs
$ gem install shopify_api
Fetching oj-3.17.6.gem
Fetching shopify_api-16.3.0.gem
Fetching sorbet-runtime-0.6.13466.gem
Fetching openssl-4.0.2-java.gem
Fetching hash_diff-1.1.1.gem
Fetching httparty-0.24.2.gem
Successfully installed sorbet-runtime-0.6.13466
Successfully installed openssl-4.0.2-java
Building native extensions. This could take a while...
ERROR: Error installing shopify_api:
ERROR: Failed to build gem native extension.
current directory: /Users/headius/work/jruby/lib/ruby/gems/shared/gems/oj-3.17.6/ext/oj
The dependency on oj is both problematic and unnecessary; the json library has been greatly optimized over the past couple of years, and there's little reason to depend upon an external library anymore. Further, json also includes optimized support for JRuby.
I suggest removing the oj dependency and just using json.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 484
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/shopify-api-ruby
-
devtools-gardener
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Shopify/shopify-api-ruby#1456 · 3 reactions ·
-
automated
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Shopify/shopify-api-ruby#1460 ·
-
devtools-gardener
Difficulty 5/5 Over a week Newbie friendliness 35/100
Shopify/shopify-api-ruby#1455 ·
-
devtools-gardener
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Shopify/shopify-api-ruby#1453 ·
-
automated
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Shopify/shopify-api-ruby#1452 ·
All issues in Shopify/shopify-api-ruby
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100