8000 [dev] Hide Hashie Mash key-conflict warnings by StephenHulme · Pull Request #2330 · sanger/limber · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[dev] Hide Hashie Mash key-conflict warnings #2330

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

StephenHulme
Copy link
Contributor
@StephenHulme StephenHulme commented Apr 16, 2025

Reduces log length and developer frustration.

Changes proposed in this pull request

Implements: https://www.rubydoc.info/gems/hashie/Hashie%2FMash.quiet

  • Hide warning conflicts for keys: min, max, size, class in developer logs.
    2025-04-16 10:40:43 W, [2025-04-16T09:40:43.446142 #1]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
    2025-04-16 10:40:43 W, [2025-04-16T09:40:43.446582 #1]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
    2025-04-16 10:40:43 W, [2025-04-16T09:40:43.446950 #1]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
    2025-04-16 10:40:43 W, [2025-04-16T09:40:43.453127 #1]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
    2025-04-16 10:40:43 W, [2025-04-16T09:40:43.453510 #1]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

Copy link
codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.25%. Comparing base (c4c28b3) to head (3a4af07).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2330   +/-   ##
========================================
  Coverage    81.25%   81.25%           
========================================
  Files          478      478           
  Lines        18511    18511           
  Branches       278      278           
========================================
  Hits         15041    15041           
  Misses        3468     3468           
  Partials         2        2           
Flag Coverage Δ
javascript 74.77% <ø> (ø)
pull_request 81.25% <ø> (ø)
push 81.25% <ø> (ø)
ruby 91.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor
@BenTopping BenTopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we are only using Hashie::Mash here. Wondering if there is a replacement for it in vanilla ruby / rails and we can remove it entirely?

@StephenHulme
Copy link
Contributor Author

Looks like we are only using Hashie::Mash here. Wondering if there is a replacement for it in vanilla ruby / rails and we can remove it entirely?

That would be lovely. Unfortunately there doesn't seem to be a drop-in replacement, but I think we should be using strongly-typed config, rather than a very lenient hash structure. https://dry-rb.org/gems/dry-struct/1.6/ looks like a promising direction to go, unless there is something more Railsy.

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
0