Skip to content

Remove ostruct dependency - #481

Merged
kerrizor merged 1 commit into
voormedia:masterfrom
BenTopping:remove-ostruct-dependency
Aug 14, 2026
Merged

Remove ostruct dependency#481
kerrizor merged 1 commit into
voormedia:masterfrom
BenTopping:remove-ostruct-dependency

Conversation

@BenTopping

@BenTopping BenTopping commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Changes:

  • Prefer pry-byebug over pry-nav
    • pry-nav pins pry to versions containing ostruct (<0.15)
    • pry-nav also has not received updates in > 5 years.
  • Remove ostruct
    • This gem has no runtime dependency on ostruct, only via pry < 0.15.

Context

Ostruct was recently added as a dependency but I don't think it needs to be. I raised a comment on the original pr but did not receive a reply.
I don't actively work on this repository so please let me know if the pry-byebug substitution is reasonable. Let me know if you have any questions or require any changes.

@kerrizor

Copy link
Copy Markdown
Collaborator

Hey @BenTopping! 👋

First off, I apologize for not responding to your comment on #435 back in June — that was an oversight on my part.

You're absolutely right on all counts here. I went back and checked: there's literally zero usage of OpenStruct anywhere in the rails-erd library code. The deprecation warning I was trying to fix in #435 was coming from pry (via pry-nav), not from rails-erd itself. I should have traced the actual source of the warning instead of just adding a runtime dependency to silence it.

Your fix is the correct approach:

  • ✅ Removes an unnecessary runtime dependency that was being pulled into every project using rails-erd
  • ✅ Updates pry-navpry-byebug (actively maintained vs 5+ years stale)
  • ✅ Addresses the root cause rather than papering over it

The .pryrc with the command aliases is a nice touch too — preserves the familiar s/n/f/c shortcuts.

I'll get this merged. Thanks for taking the time to investigate and submit the fix! 🎉

@kerrizor
kerrizor merged commit 21817bb into voormedia:master Aug 14, 2026
19 checks passed
kerrizor added a commit that referenced this pull request Aug 14, 2026
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.

2 participants