-
Notifications
You must be signed in to change notification settings - Fork 983
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
Fix 1.9 syntax error #1086
Fix 1.9 syntax error #1086
Conversation
0.1x is supposed to be 1.9-compat
Not sure how to fix the CI. |
0.17.1 is incompatible with 1.9, so, until lostisland/faraday#1086 or similar is released, we need to stay on 0.17 for 1.9.
@BanzaiMan GitHub actions doesn't support 2.3 any longer. On master, that element of the ci matrix was dropped, to go green. Such a PR is needed in this branch, too. |
Support for github action of ruby 2.3 was removed. Now according to https://github.com/actions/setup-ruby/blob/master/action.yml theminimal version is 2.4.
Not sure why GitHub thinks 2.3 is still required and expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what we're trying to fix here, but
- I'm not sure Ruby 1.9 should still be supported in 0.1x
- The proposed change is incompatible with the existing code
@@ -85,7 +85,7 @@ def initialize(exc = 'timeout', response = nil) | |||
|
|||
# Raised by Faraday::Response::RaiseError in case of a nil status in response. | |||
class NilStatusError < ServerError | |||
def initialize(_exc, response: nil) | |||
def initialize(_exc, response = nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is NOT the same thing as def initialize(_exc, response: nil)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, that's true. However, I will point out that this is the same call signature as that of TimeoutError
on line 80. If this is not the right way, then TimeoutError
should also be revisited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it be rewritten to accept a hash parameter? Like that:
def initialize(_exc, params)
response = params[:response]
Well, according to the 0.1x README we do 😃! But no tests are executed against 1.9 anymore, so hard to catch this sort of things 🤔 |
https://github.com/lostisland/faraday/pull/1086/files#diff-1b35e95f85a819bcd3c16d920ecdcffeR112-R113 has |
Unfortunately I was unable to get 1.9 working again on our GitHub Actions CI, so it's hard to say if we can or can't merge this PR. @BanzaiMan are you still using Ruby 1.9 together with the latest Faraday version? |
@iMacTia > are you still using Ruby 1.9 together with the latest Faraday version? Looks to me that #1094 supersedes this, so I'll close this now. |
Description
0.1x is supposed to be 1.9-compat, so change this method signature to reflect it.
Todos
List any remaining work that needs to be done, i.e:
Additional Notes
https://travis-ci.com/travis-ci/travis.rb/jobs/263075645#L271