Conversation
|
@mkon please have a look ;) |
ja2r.gemspec
Outdated
| s.files = Dir['{app,config,db,lib}/**/*', 'LICENSE', 'README.md'] | ||
|
|
||
| s.add_dependency 'activesupport', '>= 6.1', '< 8.0' | ||
| s.add_dependency 'logger', '~> 1.6' |
There was a problem hiding this comment.
Do we need logger as dependency? I did not find any use of logger. I removed it and tests worked just fine.
There was a problem hiding this comment.
Doesn't look like it. I've pushed a commit to remove it.
Not sure what I was doing yesterday :)
lib/ja2r.rb
Outdated
| @@ -1,3 +1,5 @@ | |||
| require 'logger' # Required for combination of old activesupport (< 7.1) and new ruby (> 3.3) | |||
There was a problem hiding this comment.
I think if someone uses old activesupport with new ruby they should require logger themself. It's not our dependency so we cannot require it.
There was a problem hiding this comment.
Totally agree.
I'm just adding this here to have the test matrix pass in that combination.
This happens when I remove it:
[ kmeyer at AM-FVFHF184Q05N in ja2r ] ruby-3.4.2@ja2r (branch:ruby-3.4*)
» ruby -v
ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [arm64-darwin24]
[ kmeyer at AM-FVFHF184Q05N in ja2r ] ruby-3.4.2@ja2r (branch:ruby-3.4*)
» bundle list | grep activesupport
* activesupport (6.1.7.10)
[ kmeyer at AM-FVFHF184Q05N in ja2r ] ruby-3.4.2@ja2r (branch:ruby-3.4*)
» bundle exec rspec
An error occurred while loading spec_helper.
Failure/Error: require 'active_support'
NameError:
uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
# /Users/kmeyer/.rvm/gems/ruby-3.4.2@ja2r/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in '<module:LoggerThreadSafeLevel>'
# /Users/kmeyer/.rvm/gems/ruby-3.4.2@ja2r/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:9:in '<module:ActiveSupport>'
# /Users/kmeyer/.rvm/gems/ruby-3.4.2@ja2r/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:8:in '<top (required)>'
# /Users/kmeyer/.rvm/gems/ruby-3.4.2@ja2r/gems/activesupport-6.1.7.10/lib/active_support/logger_silence.rb:5:in '<top (required)>'
# /Users/kmeyer/.rvm/gems/ruby-3.4.2@ja2r/gems/activesupport-6.1.7.10/lib/active_support/logger.rb:3:in '<top (required)>'
# /Users/kmeyer/.rvm/gems/ruby-3.4.2@ja2r/gems/activesupport-6.1.7.10/lib/active_support.rb:29:in '<top (required)>'
# ./lib/ja2r.rb:1:in '<top (required)>'
# ./spec/spec_helper.rb:5:in '<top (required)>'
No examples found.
Finished in 0.00002 seconds (files took 0.12414 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
Do you have another idea how to solve it? Should we blacklist some combinations in the test-matrix or maybe drop old active-support versions?
There was a problem hiding this comment.
You can maybe put it in the Gemfile (above gemspec), then it should be required automatically.
Alternatively just put the require in the spec helper also above Bundler.require
There was a problem hiding this comment.
Alright. I've added it to the Gemfile. With just requiring it manually it printed a warning as the gem will no longer be part of the default gems starting from Ruby 3.5
|
Thanks :) |
No description provided.