digitalocean / digitalocean/droplet_kit
Use gem in Ruby 3 Ractor
- Dominant language
- Ruby
- Stars
- 521
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to use gem in Ruby 3 Ractor. I got few exceptions like this:
```
:694:in `take': thrown by remote Ractor. (Ractor::RemoteError)
.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/droplet_kit-3.15.0/lib/droplet_kit/client.rb:78:in `default_user_agent': can not access non-shareable objects in constant DropletKit::VERSION by non-main Ractor. (Ractor::IsolationError)
```
I think if you add `.freeze` on strings in the gem it will solve most of the issues
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting lib/droplet_kit/client.rb around default_user_agent and reproduce the reported Ruby 3 Ractor::IsolationError with the gem. Trace other non-shareable constants or strings used across Ractor boundaries; done means the reported Ractor usage no longer raises the isolation error.
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