cloudfoundry / cloudfoundry/cf-uaa-lib

`httpclient` dependency causing deprecation warnings about failure in Ruby 3.4.0

Open
#94 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
19
Forks
32
Avg merge
21h 8m
Merged PRs (30d)
3

Description

The httpclient dependency of cf-uaa-lib hasn't had updates in 4+ years and using cf-uaa-lib on Ruby 3.3.x results in the following warnings:

~/.gem/ruby/3.3.5/gems/httpclient-2.8.3/lib/httpclient/auth.rb:11: warning: ~/.rubies/ruby-3.3.5/lib/ruby/3.3.0/mutex_m.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add mutex_m to your Gemfile or gemspec to silence this warning.
Also please contact the author of httpclient-2.8.3 to request adding mutex_m into its gemspec.

While a short term fix of adding mutex_m as a gem dependency will resolve the warning it might be prudent to switch to Ruby's standard HTTP client https://github.com/ruby/net-http since httpclient doesn't appear to be maintained any longer.

This was recently done in bosh: https://github.com/cloudfoundry/bosh/pull/2557

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the cf-uaa-lib dependency declaration and the code that uses httpclient. Reproduce the Ruby 3.3.x deprecation warning, then compare adding mutex_m with replacing httpclient using Ruby's net/http, referring to the linked bosh change. Done means the warning is resolved and the client remains functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.