GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove dependency on logger by eregon · Pull Request #1062 · ruby-concurrency/concurrent-ruby

Conversation

@eregon

@eregon eregon commented Sep 4, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • To fix the Ruby 3.3.5 warnings: "Logger" warning with Ruby 3.3.5 #1061
  • concurrent-ruby only uses 7 constants from Logger, so just copy those over.

This should be fully compatible and address the warnings.
Only if one uses the long-deprecated Concurrent.create_stdlib_logger they might need to add logger to their Gemfile.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ioquatix, BenjaminDigeon, camilohollanda, tricknotes, and wensiyuanseven reacted with thumbs up emoji
All reactions
  • 👍 5 reactions
@eregon
Remove dependency on logger
9857ee4
* To fix the Ruby 3.3.5 warnings:
  ruby-concurrency#1061
* concurrent-ruby only uses 7 constants from Logger, so just copy those over.
@eregon eregon mentioned this pull request Sep 4, 2024
"Logger" warning with Ruby 3.3.5 #1061
Closed
ioquatix
ioquatix approved these changes Sep 4, 2024
View reviewed changes

@ioquatix ioquatix left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks okay to me, but I'd personally try to remove logging as a concern of this library.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kbrock

kbrock commented Oct 7, 2024

Copy link
Copy Markdown
Contributor

@ioquatix What did you just ask?

  1. Can we drop the method that creates @logger It was introduced to prevent a deadlock and do we still need it? 1
  2. Can drop global logger and have log be a no-op if @logging does not exist? 2
  3. Can we drop all references to the log method? [3]
  4. Other.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eregon
eregon merged commit d7ce956 into ruby-concurrency:master Oct 7, 2024
@ioquatix

ioquatix commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

Probably (1) and (3) - basically remove it entirely.

kbrock reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

naitoh added a commit to naitoh/doorkeeper that referenced this pull request Jan 16, 2025
@naitoh
concurrent-ruby 1.3.5 don't work on Rails 7.0
c3f351b
> NameError:
>  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

See: ruby-concurrency/concurrent-ruby#1062
@naitoh naitoh mentioned this pull request Jan 16, 2025
Bump the range of supported Ruby versions doorkeeper-gem/doorkeeper#1760
Merged
@Fryguy

Fryguy commented Jan 16, 2025

Copy link
Copy Markdown

The release of this seems to have broken Rails 7.0 codebases with

rake aborted!
NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

    Logger::Severity.constants.each do |severity|
    ^^^^^^
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_silence.rb:5:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger.rb:3:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support.rb:29:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/railties-7.0.8.7/lib/rails.rb:7:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/sprockets-rails-3.5.2/lib/sprockets/railtie.rb:1:in `<top (required)>'
/Users/jfrey/dev/manageiq-ui-classic/lib/manageiq/ui/classic/engine.rb:2:in `<top (required)>'

I think ActiveSupport::LoggerThreadSafeLevel happened to be depending on Logger implicitly, so the fix is likely to just update Rails to require 'logger' there. I'll send a PR over there for the fix. Workaround locally is to add the require early.

toby-brilliant, nytoan, caposaric, josienb, yesthesoup, biow0lf, mishina2228, toshimaru, T-unity, eggplants, and 3 more reacted with thumbs up emoji
All reactions
  • 👍 13 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fryguy

Fryguy commented Jan 16, 2025

Copy link
Copy Markdown

See rails/rails#54264

swiknaba reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nytoan

nytoan commented Jan 16, 2025

Copy link
Copy Markdown

The release of this seems to have broken Rails 7.0 codebases with

rake aborted!
NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

    Logger::Severity.constants.each do |severity|
    ^^^^^^
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger_silence.rb:5:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support/logger.rb:3:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/activesupport-7.0.8.7/lib/active_support.rb:29:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/railties-7.0.8.7/lib/rails.rb:7:in `<top (required)>'
/Users/jfrey/.gem/ruby/3.3.6/gems/sprockets-rails-3.5.2/lib/sprockets/railtie.rb:1:in `<top (required)>'
/Users/jfrey/dev/manageiq-ui-classic/lib/manageiq/ui/classic/engine.rb:2:in `<top (required)>'

I think ActiveSupport::LoggerThreadSafeLevel happened to be depending on Logger implicitly, so the fix is likely to just update Rails to require 'logger' there. I'll send a PR over there for the fix. Workaround locally is to add the require early.

same problem with cocoapods

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

naitoh added a commit to naitoh/doorkeeper that referenced this pull request Jan 17, 2025
@naitoh
Bump the range of supported Ruby versions
7e9d635
## Ruby 3.4 is out
### 1. Add Bundled gems for Ruby 3.4

https://bugs.ruby-lang.org/issues/20187

It has already been backported to the 7-0-stable branch, but is not included in 7.0.8.7.
- https://github.com/rails/rails/blob/7-0-stable/activesupport/activesupport.gemspec#L41-L43
- https://github.com/rails/rails/blob/v7.0.8.7/activesupport/activesupport.gemspec

### 2. concurrent-ruby 1.3.5 don't work on Rails 7.0

> NameError:
>  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

See: ruby-concurrency/concurrent-ruby#1062
naitoh added a commit to naitoh/doorkeeper-openid_connect that referenced this pull request Jan 17, 2025
@naitoh
Test against Ruby 3.4.
09dbbbb
## Ruby 3.4 is out
### 1. concurrent-ruby 1.3.5 don't work on Rails 7.0

> NameError:
>  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

See: ruby-concurrency/concurrent-ruby#1062
naitoh added a commit to naitoh/doorkeeper-openid_connect that referenced this pull request Jan 17, 2025
@naitoh
Test against Ruby 3.4.
7abb9c2
## Ruby 3.4 is out
### 1. concurrent-ruby 1.3.5 don't work on Rails 7.0

> NameError:
>  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

See: ruby-concurrency/concurrent-ruby#1062
@naitoh naitoh mentioned this pull request Jan 17, 2025
Bump the range of supported Ruby versions doorkeeper-gem/doorkeeper-openid_connect#219
Merged
naitoh added a commit to naitoh/doorkeeper-openid_connect that referenced this pull request Jan 17, 2025
@naitoh
Test against Ruby 3.4.
a7990d9
## Ruby 3.4 is out
### 1. concurrent-ruby 1.3.5 don't work on Rails 7.0

> NameError:
>  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

See: ruby-concurrency/concurrent-ruby#1062
@ericproulx ericproulx mentioned this pull request Jan 19, 2025
Require logger for concurrent-ruby 1.3.5 ruby-grape/grape#2525
Merged
@mkmn mkmn mentioned this pull request Jan 23, 2025
CI against Rails 7.2 kufu/activerecord-bitemporal#164
Merged
JPrevost added a commit to MITLibraries/thing that referenced this pull request Feb 21, 2025
@JPrevost
Rails 7.0.8.7
baf7ee5
Concurrent-ruby stopped requiring a dependency that is breaking in Rails 7.0 applications.
- ruby-concurrency/concurrent-ruby#1062

Rails has fixed this in 7.0 branch but as it is a bugfix and not a security issue they don't plan to release a point release at this time.
- rails/rails#54264

When we update to Rails 7.1, we can remove this pinned version of concurrent-ruby.
@JPrevost JPrevost mentioned this pull request Feb 21, 2025
Rails 7.0.8.7 MITLibraries/thing#1423
Merged
chocoby added a commit to chocoby/jp_prefecture that referenced this pull request Feb 22, 2025
@chocoby
Add explicit logger require for concurrent-ruby 1.3.5 compatibility
3feac61
ruby-concurrency/concurrent-ruby#1062
rails/rails#54264
@chocoby chocoby mentioned this pull request Feb 22, 2025
Add explicit logger require for concurrent-ruby 1.3.5 compatibility chocoby/jp_prefecture#72
Merged
@bacxadev bacxadev mentioned this pull request Feb 25, 2025
Fix uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger error rails/rails#54621
Merged
3 tasks done
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 14, 2025
@sbernhard
concurrent-ruby dropped logger dependency
425e9e1
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
@sbernhard sbernhard mentioned this pull request Apr 14, 2025
Refs #38357 - Support of ruby version 3.4 theforeman/smart-proxy#914
Merged
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 14, 2025
@sbernhard
concurrent-ruby dropped logger dependency
877c686
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 14, 2025
@sbernhard
concurrent-ruby dropped logger dependency
cf495af
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 14, 2025
@sbernhard
concurrent-ruby dropped logger dependency
09db810
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 14, 2025
@sbernhard
concurrent-ruby dropped logger dependency
d0037e1
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 14, 2025
@sbernhard
concurrent-ruby dropped logger dependency
7eb6be9
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 14, 2025
@sbernhard
concurrent-ruby dropped logger dependency
eee2712
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 17, 2025
@sbernhard
Fixed #38383 - concurrent-ruby dropped logger dependency
ab66b0b
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
sbernhard added a commit to ATIX-AG/smart-proxy that referenced this pull request Apr 17, 2025
@sbernhard
Fixes #38383 - concurrent-ruby dropped logger dependency
632c98f
Therefore we need to add the dependency to logger here.
See ruby-concurrency/concurrent-ruby#1062
@hybras hybras mentioned this pull request May 10, 2025
Add explicit logger dependency for ruby 3.5 asciidoctor/asciidoctor#4683
Closed
@adammathys adammathys mentioned this pull request Oct 21, 2025
Fix Github actions test runs solidusio-contrib/solidus_tracking#42
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ioquatix ioquatix ioquatix approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@eregon @kbrock @ioquatix @Fryguy @nytoan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.