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

Fix standalone requiring #474

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

factyy
Copy link
Contributor

@factyy factyy commented Jun 11, 2024

It seems that right now you cannot simply require 'graphiti' without requiring active_support prior to it.

You get the following output:

...gems/activesupport-7.1.3.4/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>': undefined method `deprecator' for module ActiveSupport (NoMethodError)

  deprecate to_default_s: :to_s, deprecator: ActiveSupport.deprecator
                                                          ^^^^^^^^^^^
Did you mean?  deprecate_constant

It looks like the problem is caused by the following code:

require "active_support/core_ext/string"

This PR just places require "active_support/deprecation" on top of the list and adds require "active_support/deprecator" on the next line to satisfy dependencies which seems to solve the issue

Edit: this issue is probably Rails 7 and newer only due to internal changes in ActiveSupport

@factyy
Copy link
Contributor Author

factyy commented Jun 11, 2024

Looks like there are backward compatibility issues. Will fix them and patch this PR

@factyy
Copy link
Contributor Author

factyy commented Jun 11, 2024

@jkeen , this PR is ok to review now. Please take a look :)

@jkeen jkeen merged commit bb2a488 into graphiti-api:master Jun 11, 2024
36 checks passed
@jkeen
Copy link
Collaborator

jkeen commented Jun 11, 2024

@factyy Thanks!

Copy link

🎉 This PR is included in version 1.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants