-
Notifications
You must be signed in to change notification settings - Fork 533
RUBY-3252 Show user friendly error if no ffi #2730
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
Conversation
Changes and error message lgtm |
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.
Elegant solution! Just the one comment about the specs.
|
||
describe Mongo::Crypt do | ||
describe '.validate_ffi!' do | ||
context 'when ffi is available' do |
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.
Should there be something here to test for the cases where FFI is not installed? Or skip when it isn't?
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.
I couldn't come up with a reasonable complex solution for testing this case. We have gem 'ffi' in our standard set of dependencies for testing. So, we would need a dedicated configuration just to test this feature; I think this is an overhead.
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.
Ah! That makes sense. I'll trust that you've thought about this a lot more than I have. :) Thanks for the explanation. Maybe a comment in that spec, explaining the situation, would be helpful to future-us?
|
||
describe Mongo::Crypt do | ||
describe '.validate_ffi!' do | ||
context 'when ffi is available' do |
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.
Ah! That makes sense. I'll trust that you've thought about this a lot more than I have. :) Thanks for the explanation. Maybe a comment in that spec, explaining the situation, would be helpful to future-us?
* RUBY-3252 Show user friendly error if no ffi * Cleanup * Remove one test * Add comment explaining why test is omited
https://jira.mongodb.org/browse/RUBY-3252