faraday: Breaking changes for fastlane in 0.16.2
Basic Info
- Faraday Version: 0.16.2
- Ruby Version:
- Windows: ruby 2.4.6p354 (2019-04-01 revision 67394) [x64-mingw32]
- Mac: Ruby 2.5
Issue description
Even with faraday 0.16.2 and the fixes of @BobbyMcWho there are test failures for fastlane:
Failures:
1) Spaceship::Portal::Persons should change role
Failure/Error: expect { person.change_role("member") }.to_not(raise_error)
expected no Exception, got #<RuntimeError: can't modify frozen String> with backtrace:
# ./spaceship/lib/spaceship/client.rb:811:in `force_encoding'
# ./spaceship/lib/spaceship/client.rb:811:in `log_response'
# ./spaceship/lib/spaceship/client.rb:846:in `block in send_request'
# ./spaceship/lib/spaceship/client.rb:620:in `with_retry'
# ./spaceship/lib/spaceship/client.rb:844:in `send_request'
# ./spaceship/lib/spaceship/client.rb:688:in `request'
# ./spaceship/lib/spaceship/portal/portal_client.rb:449:in `team_set_role'
# ./spaceship/lib/spaceship/portal/person.rb:45:in `change_role'
# ./spaceship/spec/portal/person_spec.rb:58:in `block (3 levels) in <top (required)>'
# ./spaceship/spec/portal/person_spec.rb:58:in `block (2 levels) in <top (required)>'
# ./spaceship/spec/portal/person_spec.rb:58:in `block (2 levels) in <top (required)>'
2) Spaceship::Tunes::IAPList IAPList can delete
Failure/Error: deleted = app.in_app_purchases.find("go.find.me").delete!
RuntimeError:
can't modify frozen String
# ./spaceship/lib/spaceship/client.rb:811:in `force_encoding'
# ./spaceship/lib/spaceship/client.rb:811:in `log_response'
# ./spaceship/lib/spaceship/client.rb:846:in `block in send_request'
# ./spaceship/lib/spaceship/client.rb:620:in `with_retry'
# ./spaceship/lib/spaceship/client.rb:844:in `send_request'
# ./spaceship/lib/spaceship/client.rb:688:in `request'
# ./spaceship/lib/spaceship/tunes/tunes_client.rb:1235:in `delete_iap!'
# ./spaceship/lib/spaceship/tunes/iap_list.rb:72:in `delete!'
# ./spaceship/spec/tunes/iap_list_spec.rb:28:in `block (3 levels) in <top (required)>'
3) Spaceship::Tunes::Members members creates a new member role: admin, apps: all
Failure/Error: Spaceship::Members.create!(firstname: "Helmut", lastname: "Januschka", email_address: "helmut@januschka.com")
RuntimeError:
can't modify frozen String
# ./spaceship/lib/spaceship/client.rb:811:in `force_encoding'
# ./spaceship/lib/spaceship/client.rb:811:in `log_response'
# ./spaceship/lib/spaceship/client.rb:846:in `block in send_request'
# ./spaceship/lib/spaceship/client.rb:620:in `with_retry'
# ./spaceship/lib/spaceship/client.rb:844:in `send_request'
# ./spaceship/lib/spaceship/client.rb:688:in `request'
# ./spaceship/lib/spaceship/tunes/tunes_client.rb:502:in `create_member!'
# ./spaceship/lib/spaceship/tunes/members.rb:26:in `create!'
# ./spaceship/spec/tunes/members_spec.rb:19:in `block (4 levels) in <top (required)>'
...
PR for reference: https://github.com/fastlane/fastlane/pull/15407
Note that our tests are not failing on ruby 2.3 on macOS and Ubuntu.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (10 by maintainers)
@janpio I suspect #1039 should fix the issues with frozen string literals in the body.
@janpio triggered https://travis-ci.org/lostisland/faraday_middleware/builds/595051325, you can see in logs that Faraday v0.17.0 is used and all tests are passing 🎉
@zspencer you might have to point at the 0.16.x branch in your gemfile if you need it right now, until the maintainers have a chance to release 0.16.3
I’m not at a place where I can get to a computer but from a cursory glance browsing through files on my phone it seems to me that somewhere in Faraday we’re setting the request body to a frozen string. if we can find where that request body is being set to a frozen string then that should fix the issue in fast lane