-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Fix full error messages #662
Conversation
8da1678
to
2536dee
Compare
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 for the PR! There's one thing to tweak though. Please let me know if it's something you could take of.
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.
Would need to warn about scope & signature changes?
# @return String | ||
# | ||
# @api public | ||
def message_text(message, path, locale: nil, full: false, **opts) |
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.
message_text was marked as public on the API documentation:
For compatibility reason a changing the scope to private and their signature would potentially break systems using this internally.
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.
That's a good point. I'll return the method back with the original signature, so the bug fix could be shipped in a patch version.
There is something to consider though:
-
the interface is not consistent
#message
and#call
expectpath
as a keyword argument
#message_text
expects it as a positional argument -
should
#message
and#message_text
be public at all? Isn't it enough to have one public#call
method?
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.
@stind these shouldn't be public, it's a mistake in the yard docs, so don't worry about it. I'm 100% sure nobody is using this.
0983fca
to
c57af00
Compare
907e8aa
to
9faa04b
Compare
9faa04b
to
9962922
Compare
Here is an overview of what got changed by this pull request: Issues
======
+ Solved 1
Complexity decreasing per file
==============================
+ lib/dry/validation/messages/resolver.rb -1
Clones added
============
- spec/integration/messages/resolver_spec.rb 2
See the complete overview on Codacy |
Fixes #661