-
Notifications
You must be signed in to change notification settings - Fork 9
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
Draft: Get rid of deprecation warnings #45
base: master
Are you sure you want to change the base?
Conversation
Shall I move static if (__VERSION__ < 2096)
alias approxEqual = std.math.approxEqual;
else
bool approxEqual(T, U, V)(T lhs, U rhs, V maxRelDiff = 1e-2, V maxAbsDiff = 1e-5)
{
return std.math.isClose(lhs, rhs, maxRelDiff, maxAbsDiff); // mimic old sloppy approxEqual for now
} to a common place? Say, |
What I understand from this:
It seems to me for the modules you did manage to fix you would want to use the Instead of hijacking For the modules you didn't manage to fix you should not hide the deprecation warnings, however horrid they are. |
I think I've found a way to automate the precision refactoring of the |
yes |
Gonna try update the constants now and hopefully get rid of the |
Gets rid of deprecation warnings via:
body
=>do
approxEqual
=>isClose
: I started updating all those darn floating point literals to a better precision to fitisClose
's requirements but I got fed up with it because it wasted a lot of time and I couldn't find a way to automated it. So I added anapproxEqual
that mimics old deprecated version to make tests pass without warnings nor unittest failures. But kept the constants refactorings. I can continue updating the rest of literals if needed but I'd rather not. :)dstats-test-library
Ready for review now, @John-Colvin .
For reference see https://dlang.org/changelog/2.096.0.html#deprecate-approxEqual.