Suggestion: Replace Hashie::Mash with OpenStruct
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by locating the Slack client’s Hashie::Mash usage, especially recursive hashes within Slack::Messages::Message, and compare the existing behavior with OpenStruct. The work is complete only when the replacement preserves the required message behavior and the project has tests covering the affected client responses.
Written by the indexing model from the issue text.
Description
Hashie has generally been noted as having lackluster performance, large memory overhead, and results in a few pitfalls. For instance, see https://www.schneems.com/2014/12/15/hashie-considered-harmful.html.
OpenStruct objects can provide much of the same benefits (e.g. attributes accessible by symbol or string keys, as well as method calls) with less overhead and easier understanding. I tried doing this myself, but some of the Slack client is partially dependent on some strange behavior around Hashie::Mash (particularly on recursive hashes within a Slack::Messages::Message) - this could all be changed, but I felt it was getting to be a larger effort that should have community buy-in before being done. As a result, I figured I would raise this suggestion here. Thanks!
- Dominant language
- Ruby
- Stars
- 1.3k
- Forks
- 222
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from slack-ruby/slack-ruby-client
-
new feature question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
slack-ruby/slack-ruby-client#586 · 3 comments ·
-
bug?
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
slack-ruby/slack-ruby-client#579 · 3 comments ·
-
new feature web api
Difficulty 3/5 1-2 days Newbie friendliness 42/100
slack-ruby/slack-ruby-client#482 · 5 comments ·
-
new feature
Difficulty 4/5 3-5 days Newbie friendliness 35/100
slack-ruby/slack-ruby-client#414 · 14 comments ·
-
confirmed bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
slack-ruby/slack-ruby-client#409 · 5 comments ·
All issues in slack-ruby/slack-ruby-client
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bensheldon/good_job#1816 · 5 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·