`Gem::Version.new`, `#bump`, and `#release` do not work in ractor
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with lib/rubygems/version.rb, especially Gem::Version.new, #bump, and #release, and review how their class variables are used. Reproduce the reported Ractor::IsolationError in a non-main Ractor, then add or update the relevant RubyGems tests to cover those methods in Ractors. Done means the methods work in the reported Ractor scenarios without the class-variable isolation error, with focused tests passing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
reproduction:
Gem::VERSION # => "4.0.23"
Ractor.new { Gem::Version.new(1) }
# => #<Thread:0x0000000122ea71d0 run> terminated with exception (report_on_exception is true):
# => ~/.asdf/installs/ruby/4.0/lib/ruby/4.0.0/rubygems/version.rb:201:in 'Gem::Version.new':
# => can not access class variables from non-main Ractors (@@all from Gem::Version) (Ractor::IsolationError)
relevant code: https://github.com/ruby/rubygems/blob/f033df93676007227d1ae0bd7326008e6396b3e9/lib/rubygems/version.rb#L212-L220
i guess this hasn't become apparent yet because gem versions are usually initialized at load-time? it could, however, be an issue for a few gems that do things like if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0') at runtime.
same for #bump and #release:
Ractor.new(Gem::Version.new(1), &:bump)
# => #<Thread:0x00000001206e3658 run> terminated with exception (report_on_exception is true):
# => ~/.asdf/installs/ruby/4.0/lib/ruby/site_ruby/4.0.0/rubygems/version.rb:236:in 'Gem::Version#bump':
# => can not access class variables from non-main Ractors (@@bump from Gem::Version) (Ractor::IsolationError)
Ractor.new(Gem::Version.new(1), &:release)
# => #<Thread:0x00000001206c0b80 run> terminated with exception (report_on_exception is true):
# => ~/.asdf/installs/ruby/4.0/lib/ruby/site_ruby/4.0.0/rubygems/version.rb:314:in 'Gem::Version#release':
# => can not access class variables from non-main Ractors (@@release from Gem::Version) (Ractor::IsolationError)
- Lingua principale
- Ruby
- Stelle
- 4k
- Fork
- 2k
- Merge medio
- 1g 5h
- PR unite (30g)
- 36
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ruby/rubygems
-
Broken linkAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
-
Gem::Package::TarReader silently ignores pax/GNU extension headersForse già presa @akasakariko l’ha presa 3 giorni fa. ApertaRubyGems
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
ruby/rubygems#9988 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`bundle install` exits 0 even when a git gem's submodules fail to cloneForse già presa @mattyb l’ha presa 12 giorni fa. ApertaBundler
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
Gem.load_plugins loads same plugin multiple times from different Gem.path entriesForse già presa @sourya2704 l’ha presa 8 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
ruby/rubygems#9945 · 4 commenti · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ruby/rubygems
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
zold-io/zold-ruby-sdk#85 ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100