Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for activesupport 7 #368

Merged
merged 3 commits into from
Jan 24, 2022
Merged

Conversation

scottyp-env
Copy link
Contributor

It's not causing us a problem right now, presumably because one of the other gems is doing this require 'active_support'. But if that ever changes a future dev is going to get a surprise so let's keep things nice for ourselves.

It's not causing us a problem right now, presumably because one of the
other gems is requireing active_support. But if that ever changes a
future dev is going to get a surprise so let's keep things nice for
ourselves.
@orien
Copy link
Member

orien commented Jan 24, 2022

What's changed in version 7 that requires this new require?

@ricobl
Copy link

ricobl commented Jan 24, 2022

What's changed in version 7 that requires this new require?

It's suggested here @orien:

https://guides.rubyonrails.org/active_support_core_extensions.html#stand-alone-active-support

Core extensions cannot be directly required anymore, instead it needs minimum dependencies to be loaded via require 'activesupport'.

Here's how a traceback can look like:

NameError: uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/xml_mini.rb:184:in `current_thread_backend'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/xml_mini.rb:103:in `backend='
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/xml_mini.rb:201:in `<module:ActiveSupport>'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/xml_mini.rb:11:in `<top (required)>'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/array/conversions.rb:3:in `require'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/array/conversions.rb:3:in `<top (required)>'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/duration.rb:3:in `require'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/duration.rb:3:in `<top (required)>'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/time/calculations.rb:3:in `require'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/time/calculations.rb:3:in `<top (required)>'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/string/conversions.rb:4:in `require'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/string/conversions.rb:4:in `<top (required)>'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/string.rb:3:in `require'
/usr/local/bundle/gems/activesupport-7.0.1/lib/active_support/core_ext/string.rb:3:in `<top (required)>'
# ...

Copy link

@ricobl ricobl left a comment

Choose a reason for hiding this comment

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

Thanks for this @scottyp-env!

@scottyp-env scottyp-env merged commit 5059e76 into master Jan 24, 2022
@scottyp-env scottyp-env mentioned this pull request Jan 24, 2022
@orien orien deleted the support-activesupport-7 branch February 3, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants