Closed cljvf9 closed 6 years ago
@cljvf9 Thanks for this PR.
When running the tests, I still get a handful of deprecation warnings for this function.
include/dns_tests.hrl:222: Warning: crypto:rand_uniform/2 is deprecated and will be removed in a future release; use rand:uniform/1
include/dns_tests.hrl:226: Warning: crypto:rand_uniform/2 is deprecated and will be removed in a future release; use rand:uniform/1
include/dns_tests.hrl:230: Warning: crypto:rand_uniform/2 is deprecated and will be removed in a future release; use rand:uniform/1
include/dns_tests.hrl:234: Warning: crypto:rand_uniform/2 is deprecated and will be removed in a future release; use rand:uniform/1
As long as we're making the adjustments, would you make it in those places, as well?
thanks!
No problem, sorry I missed those. I noticed the warning when compiling this as a dependency for another project, so the tests were missed. Makes sense that these changes should all go together.
this changes the behavior of the seq ID, omitting 0 as a possible value, since rand:uniform/1 is from 1 to N, whereas the original values were from 0 to N.
That's worth keeping in mind. Thanks for bringing it up.
Will make another PR that fixes the type specs for this change, as well as validates (and potentially resolves) any issues that 1...N vs 0...N creates.
When compiling with OTP 21 the following warning shows up:
"Warning: crypto:rand_uniform/2 is deprecated and will be removed in a future release; use rand:uniform/1"
This is to satisfy that warning.