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

Add json as an explicit dependency #1589

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

deivid-rodriguez
Copy link
Contributor

Description

This is similar to #1573, but for json.

In this case, I'm not getting a warning about json but about ostruct, i.e., it's not json that's being removed as a default gem in Ruby 3.5, but ostruct:

/home/deivid/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.

You can add ostruct to your Gemfile or gemspec to silence this warning.

ostruct is getting loaded by json though, and json is getting loaded by faraday.

json has fixed the problem by autoloading the class that uses ostruct at flori/json@b507f9e. However, I can't really pick up the fix, since json is not a explicit dependency of faraday, so the default version of it always get loaded.

So the only thing remaining to fix the issue would be for faraday to declare its dependency on json. That way, Bundler will be aware of the dependency and a bundle update json can be used to pick up a json version that does not load ostruct and thus avoid the warning.

Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olleolleolle olleolleolle merged commit 9e5c8a1 into lostisland:main Sep 11, 2024
7 checks passed
@deivid-rodriguez deivid-rodriguez deleted the json-explicit-dep branch September 11, 2024 11:11
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.

2 participants