-
Notifications
You must be signed in to change notification settings - Fork 268
Support OTP >=24 #253
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
shuieryin
wants to merge
25
commits into
comtihon:master
Choose a base branch
from
shuieryin:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Support OTP >=24 #253
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
bb76baf
Update rebar.config
shuieryin 39309a6
updated return type
shuieryin 0b86209
fix return type issue
shuieryin 0e04818
fix return type issue
shuieryin 9c47fdb
updated plugin
shuieryin 32ffc9d
remove plugin
shuieryin 2e5457b
remove plugin
shuieryin 26123b4
revert plugin
shuieryin a46cf67
revert plugin
shuieryin 4c05576
remove plugin
shuieryin 8f9f1cd
fix return type
shuieryin 430b56e
remove plugin
shuieryin b3523c0
fix return type
shuieryin 53d5f1b
fix return type
shuieryin 308a2dc
fix return type
shuieryin f8ccbf6
revert plugin
shuieryin ac6052c
remove plugin
shuieryin d012e2b
fix insert return type
shuieryin 0a15ab3
remove plugin
shuieryin ca47e96
Create rebar.config
shuieryin 224b054
pull updates from source
shuieryin e18b6d1
Merge branch 'master' of https://github.com/comtihon/mongodb-erlang
shuieryin d985603
Merge branch 'master' into fork
7e760cd
compatible with otp 25
5815081
call pbkdf2:pbkdf2 for OTP < 24
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
We probably want to follow the pattern in #232 to avoid breaking the library on older releases of OTP. That is,
crypto:pbkdf2_hmacis new in OTP 24 and missing from older versions, so if we run this patch on OTP 23 we'll crash for the same reason this fix exists.Checking for OTP version
mongodb-erlang/src/support/mc_utils.erl
Lines 14 to 19 in 5881a8b
Conditionally using newer functions
mongodb-erlang/src/support/mc_utils.erl
Lines 75 to 79 in 5881a8b
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.
updated, didn't know crypto in OTP < 24 doesn't have pbkdf2_hmac, thanks for the info
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.
My read on the docs is that it came in with OTP 24.2, with crypto 5.0.5
Come to think of it, do we need to check for 24.2 even? I guess OTP 24.0 and OTP 24.1 won't have it either. I'm not sure off-hand how to check for the minor version and I hope we can do it in the macro so this doesn't have to be a runtime check.
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 find a predefined macro returns the minor/patch version
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 find a predefined macro returns the minor/patch version