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

lib: import active_support before cherry-picking imports #77

Merged
1 commit merged into from Oct 10, 2023
Merged

lib: import active_support before cherry-picking imports #77

1 commit merged into from Oct 10, 2023

Conversation

ghost
Copy link

@ghost ghost commented Oct 10, 2023

With an update to activesupport-7.1.0 downstream libraries using hcloud-ruby ran into exceptions in activesupport. This seems to be the case, because we do not import active_support before any other imports from active_support.

According to the docs [1] one always has to first require "active_support", which imports the code needed by activesupport itself. And then we can import actual functionality by importing active_support/all, active_support/core_ext/hash/indifferent_access or something else.

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

With an update to `activesupport-7.1.0` downstream libraries using hcloud-ruby
ran into exceptions in activesupport. This seems to be the case, because
we do not import `active_support` before any other imports from
`active_support`.

According to the docs [1] one always has to first `require "active_support"`,
which imports the code needed by activesupport itself. And then we can import
actual functionality by importing `active_support/all`,
`active_support/core_ext/hash/indifferent_access` or something else.

[1] https://guides.rubyonrails.org/active_support_core_extensions.html#stand-alone-active-support
@ghost ghost marked this pull request as ready for review October 10, 2023 14:23
@ghost ghost merged commit cb1ffa3 into tonobo:master Oct 10, 2023
@ghost ghost deleted the active-support-import branch October 10, 2023 14:24
This pull request was closed.
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.

None yet

1 participant