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 ostruct as an explicit dependency #77

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Conversation

RemoteCTO
Copy link
Contributor

This gem makes use of OpenStruct however this appears to be steadily being removed by default over time:

Without OpenStruct on the system it causes the errors when running migrations:

bin/rails aborted!
NameError: uninitialized constant Timescaledb::Connection::OpenStruct (NameError)

      query.map(&OpenStruct.method(:new))
                 ^^^^^^^^^^

Tasks: TOP => db:schema:dump

Ideally the implementation would be changed to switch OpenStruct with Struct, but this patches breakages in the meantime.

Force root namespace for OpenStruct

Explicit requires of openstruct
@CLAassistant
Copy link

CLAassistant commented Nov 10, 2024

CLA assistant check
All committers have signed the CLA.

@jonatas
Copy link
Collaborator

jonatas commented Nov 11, 2024

Thanks for bringing this improvement @RemoteCTO, I'll check it soon. As it depends on activesupport I was expecting it was not necessary, but that's a good call to make the dependencies clean!

@jonatas jonatas merged commit 15279bc into timescale:master Nov 28, 2024
4 checks passed
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