Skip to content

lib: import active_support before cherry-picking imports#77

Merged
1 commit merged intomasterfrom
unknown repository
Oct 10, 2023
Merged

lib: import active_support before cherry-picking imports#77
1 commit merged intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@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.

1 participant