ruby-i18n / i18n

Internationalization (i18n) library for Ruby
MIT License
977 stars 408 forks source link

Revert "Fix missing requires of i18n/core_ext/hash" #602

Closed radar closed 2 years ago

radar commented 2 years ago

Reverts ruby-i18n/i18n#574

This was breaking the master build.

jordan-brough commented 2 years ago

@radar are you planning to release this as v1.9.1? And possibly yank v1.9.0? The latter seems broken to me:

$ gem install i18n
Fetching i18n-1.9.0.gem
Successfully installed i18n-1.9.0
1 gem installed

$ irb
001 > require 'i18n'
=> true
002 > I18n::Backend::Chain
<.../ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require': cannot load such file -- i18n/core_ext/hash (LoadError)

I noticed b/c we tried to update i18n in our app and it caused the above exception.

dvzrv commented 2 years ago

An update would be highly appreciated, as I can not build (and test) this when attempting to create the package on Arch Linux.

dvzrv commented 2 years ago

Out of general curiosity: How did this not make all tests in CI fail since August and more specifically when that commit was added via pull request in https://github.com/ruby-i18n/i18n/pull/574? :thinking:

radar commented 2 years ago

@dvzrv Please be aware that I am the sole maintainer and located in Australia. When you posted your comment, the local time was 6:27am. The PR you're pointing to was created in August, but was only merged ~22hrs ago.

@jordan-brough I can yank 1.9.0 so that it's uninstallable, after I release a 1.9.1.

dvzrv commented 2 years ago

Please be aware that I am the sole maintainer and located in Australia. When you posted your comment, the local time was 6:27am. The PR you're pointing to was created in August, but was only merged ~22hrs ago.

Ah good point! Didn't notice that :) I have applied it for the package on Arch Linux. Thanks for merging! :heart:

kwisatz commented 2 years ago

How is #574 supposed to be resolved in environments that exhibit this problem. E.g. in one of our decidim installations, we do see the same problem:

decidim@marklar:~/decidim$ bundle exec rails db:migrate --trace                                            
** Invoke db:migrate (first_time)                                                                                  
** Invoke db:load_config (first_time)                                                                              ** Invoke environment (first_time)
** Execute environment                                                                                             rails aborted!      
NameError: uninitialized constant I18n::HashRefinements                                                            /home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li
b/decidim/term_customizer/i18n_backend.rb:9:in `<class:I18nBackend>' 
[…]
radar commented 2 years ago

Refinements were removed here: https://github.com/ruby-i18n/i18n/pull/573

Either change your code to remove the reference to refinements, or use a version of i18n that still has them. On 31 Jan 2022, 02:38 +1100, David Raison @.***>, wrote:

How is #574 supposed to be resolved in environments that exhibit this problem. E.g. in one of our decidim installations, we do see the same problem: @.***:~/decidim$ bundle exec rails db:migrate --trace

** Invoke db:migrate (first_time)

Invoke db:load_config (first_time) Invoke environment (first_time)

** Execute environment rails aborted!

NameError: uninitialized constant I18n::HashRefinements /home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li

b/decidim/term_customizer/i18n_backend.rb:9:in `'

[…]

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you modified the open/close state.Message ID: @.***>

radar commented 2 years ago

I’m out and about now, just on my phone. I’ll need to double check this as #573 has other issues that are reported against it. Seems like I might be missing something here on my little screen. On 31 Jan 2022, 02:38 +1100, David Raison @.***>, wrote:

How is #574 supposed to be resolved in environments that exhibit this problem. E.g. in one of our decidim installations, we do see the same problem: @.***:~/decidim$ bundle exec rails db:migrate --trace

** Invoke db:migrate (first_time)

Invoke db:load_config (first_time) Invoke environment (first_time)

** Execute environment rails aborted!

NameError: uninitialized constant I18n::HashRefinements /home/decidim/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/bundler/gems/decidim-module-term_customizer-0e823f4f768f/li

b/decidim/term_customizer/i18n_backend.rb:9:in `'

[…]

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you modified the open/close state.Message ID: @.***>