-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[BUG]: The type of the dependency on faraday-retry is irritating and unclear. #1567
Comments
👋 Hey Friends, this issue has been automatically marked as |
I did not test this, but I suppose it would be possible to create an empty meta gem (e.g.
I don’t really like this solution since it introduces a new gem, but I guess it would work. Unless gems start allowing dependency-version-conditional additional dependencies, I don’t really see any way other than that, requiring |
What happened?
When using the gem with
faraday > 2
without havingfaraday-retry
installed,octokit.rb
always prints this warning message.According to #1486, there are currently 2 ways to disable the warning:
OCTOKIT_SILENT=true
faraday-retry
The first option has the side effect of disabling any warning from
octokit.rb
, which is clearly not my intention. The second option requires me to install a gem, but this appears to actually be kind of optional. I had no issues yet withoutfaraday-retry
and usages test if its constants are defined:octokit.rb/lib/octokit/default.rb
Lines 36 to 42 in fb01ac2
In case I do not want to use
faraday-retry
for whatever reason, I will therefore always be left with that annoying warning.From this perspective, it is not clear what kind of dependency
octokit.rb
actually has onfaraday-retry
. It is not required, cannot be listed in the gemspec sincefaraday ~> 1.0
is also supported, but also is not fully optional since the exclusion affects all programs usingoctokit.rb
by printing a warning.If it is optional, I would expect to at most get a post-install message of the warning (probably rather a README entry), but not a forced warning. If it is required, I would expect
require 'octokit.rb'
to raise the warning message as an error whenrequire 'faraday/retry'
raises aLoadError
.Implementing either of those options seems quite trivial, contrary to what was claimed in #1486 in this comment. Did I miss something there?
I’ld happily create a PR, although I have no idea which options would be preferred, if any.
Versions
octokit.rb = 6.1.1
,faraday = 2.7.4
withoutfaraday-retry
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: