[BUG]: The type of the dependency on faraday-retry is irritating and unclear. #1567
Open
1 task done
Labels
hacktoberfest
Issues for participation in Hacktoberfest
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
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: