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
Since hashie/mash can be required alone, require its dependencies #368
Since hashie/mash can be required alone, require its dependencies #368
Conversation
Personally, I am against this. We're working around people requiring |
But looking at the codebase I see that we're doing similar things in trash, https://github.com/intridea/hashie/blob/master/lib/hashie/trash.rb#L2. @jrafanie Can you please update CHANGELOG? I think we don't need anything in UPGRADING, I'll just cut another release after this is merged/built/tested. |
Ok, will do |
b460601
to
e89ac50
Compare
Done @dblock. While I agree, this is less than ideal, maybe you can make a checklist of things we want to enforce in the next breaking "release" and add this to the list. If we're using autoload everywhere and want to enforce that, let's do it with a changelog entry in 3.5 or 4.0. omniauth is a really popular library so you're going to get lots of grief from people hitting this. |
@@ -28,7 +28,7 @@ scheme are considered to be bugs. | |||
|
|||
### Fixed | |||
|
|||
* Your contribution here. | |||
* [#368](https://github.com/intridea/hashie/pull/368): hashie/mash can be required alone, require it's dependencies - [@jrafanie](https://github.com/jrafanie/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo it's
-> its
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add a period at the end of this, quote hashie/mash
and remove the trailing slash from jrafanie/
;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, should be be correct now. 🙇
I understand wanting to remove undesirable parts of your API, but this seems to have broken FaradayMiddleware::Mashify (https://github.com/lostisland/faraday_middleware/blob/master/lib/faraday_middleware/response/mashify.rb), so probably deprecating before breaking changes would be helpful. |
@jrafanie if you think something should be checklisted for a release that needs to go into RELEASING.md (PR as usual) and needs to be easy to do. |
e89ac50
to
66386b3
Compare
Fixes hashie#367 While it's probably not something hashie wants to allow, previously this was possible so we shouldn't break this when going 3.4.4 to 3.4.5. As an example, omniauth requires hashie/mash alone: https://github.com/omniauth/omniauth/blob/d941c4bcb1eb52f3674dd46225808751dd6a1c2f/lib/omniauth/auth_hash.rb#L1 This appears to have been broken in hashie#358. Note, we can't write a test for this because we require 'hashie' in the spec_helper which properly defines the Hashie::Extensions::Array constant and autoloads the pretty_inspect here: https://github.com/intridea/hashie/blob/229ee36d7c6a07eff6d8a0434726e12b8c3a0223/lib/hashie.rb#L48 **Before** ``` 10:44:30 ~/Code/hashie (master) (2.3.1) + be irb irb(main):001:0> require 'hashie/mash' NameError: uninitialized constant Hashie::Extensions::Array Did you mean? Hashie::Array Array from /Users/joerafaniello/Code/hashie/lib/hashie/array.rb:3:in `<class:Array>' from /Users/joerafaniello/Code/hashie/lib/hashie/array.rb:2:in `<module:Hashie>' from /Users/joerafaniello/Code/hashie/lib/hashie/array.rb:1:in `<top (required)>' from /Users/joerafaniello/Code/hashie/lib/hashie/mash.rb:2:in `require' from /Users/joerafaniello/Code/hashie/lib/hashie/mash.rb:2:in `<top (required)>' ... ``` **After** ``` 10:44:40 ~/Code/hashie (master) (2.3.1) + be irb irb(main):001:0> require 'hashie/mash' => true irb(main):002:0> exit ```
66386b3
to
0feba44
Compare
This can be reverted when hashie/hashie#368 is merged and released.
Merged and released 3.4.6. Please double check that everything works now. |
@jrafanie Thanks for your help! |
Thanks @dblock 🙇 |
[3.4.6]: hashie/hashie@v3.4.5...v3.4.6 ### Fixed * [#368](hashie/hashie#368): Since `hashie/mash` can be required alone, require its dependencies - [@jrafanie](https://github.com/jrafanie). ## [3.4.5] - 2016-09-16 [3.4.5]: hashie/hashie@v3.4.4...v3.4.5 ### Added * [#337](hashie/hashie#337), [#331](hashie/hashie#331): `Hashie::Mash#load` accepts a `Pathname` object - [@gipcompany](https://github.com/gipcompany). ### Deprecated * [#366](hashie/hashie#366): Hashie is no longer tested on Ruby < 2 - [@dblock](https://github.com/dblock). ### Fixed * [#358](hashie/hashie#358): Fixed support for Array#dig - [@modosc](https://github.com/modosc). * [#365](hashie/hashie#365): Ensured ActiveSupport::HashWithIndifferentAccess is defined before use in #deep_locate - [@mikejarema](https://github.com/mikejarema). ### Miscellanous * [#366](hashie/hashie#366): Added Danger, PR linter - [@dblock](https://github.com/dblock). ## [3.4.4] - 2016-04-29 [3.4.4]: hashie/hashie@v3.4.3...v3.4.4 ### Added * [#349](hashie/hashie#349): Convert `Hashie::Mash#dig` arguments for Ruby 2.3.0 - [@k0kubun](https://github.com/k0kubun). ### Fixed * [#240](hashie/hashie#240): Fixed nesting twice with Clash keys - [@bartoszkopinski](https://github.com/bartoszkopinski). * [#317](hashie/hashie#317): Ensure `Hashie::Extensions::MethodQuery` methods return boolean values - [@michaelherold](https://github.com/michaelherold). * [#319](hashie/hashie#319): Fix a regression from 3.4.1 where `Hashie::Extensions::DeepFind` is no longer indifference-aware - [@michaelherold](https://github.com/michaelherold). * [#322](hashie/hashie#322): Fixed `reverse_merge` issue with `Mash` subclasses - [@marshall-lee](https://github.com/marshall-lee). * [#346](hashie/hashie#346): Fixed `merge` breaking indifferent access - [@docwhat](https://github.com/docwhat), [@michaelherold](https://github.com/michaelherold). * [#350](hashie/hashie#350): Fixed from string translations used with `IgnoreUndeclared` - [@marshall-lee](https://github.com/marshall-lee).
Fixes #367
While it's probably not something hashie wants to allow, previously
this was possible so we shouldn't break this when going 3.4.4 to 3.4.5.
As an example, omniauth requires hashie/mash alone
This appears to have been broken in #358.
Note, we can't write a test for this because we require 'hashie' in the spec_helper
which properly defines the Hashie::Extensions::Array constant and autoloads
the pretty_inspect here
Before
After