-
Notifications
You must be signed in to change notification settings - Fork 33
Fix all v0.7 deprecations and errors, and convert tests to testsets #108
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
Alas, the github diff view really falls apart when you add a leading tab to every line in a file.... I'm going to remove the extra indentation so that the actual diff is more obvious. |
Codecov Report
@@ Coverage Diff @@
## master #108 +/- ##
=========================================
+ Coverage 89.52% 100% +10.47%
=========================================
Files 4 3 -1
Lines 191 111 -80
=========================================
- Hits 171 111 -60
+ Misses 20 0 -20
Continue to review full report at Codecov.
|
REQUIRE
Outdated
@@ -1,2 +1 @@ | |||
julia 0.6 | |||
Compat 0.35 | |||
julia 0.7- |
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.
julia 0.7-alpha
.
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.
ok, done
Remove the deprecations while we're at it? |
Ok, I've removed the deprecations. The only thing we might still want to do is change some of the |
As per that discourse thread, looks like we need to use some more constructors (and maybe define them). Other than that, this LGTM. |
Ok, I changed all the existing |
This PR fixes all deprecation warnings and errors on v0.7-alpha and changes the minimum required Julia version to v0.7-. The only errors were caused by an ambiguity resulting from the Char -> AbstractChar change, which was easy to fix. Most of the remaining deprecation warnings were because of the removed fallback from constructors to
convert()
. In this case, I fixed them by explicitly callingconvert
where appropriate. You could, instead, define(::Type{T<:Number})(x::Fixed) = convert(T, x)
to restore the missing constructors. I guess it's really just a matter of deciding what the "canonical" way of doing this is.There were also a lot of depwarns in the tests themselves because a bunch of global variables were being accidentally overwritten in for-loops. I fixed that by adding labeled testsets, which puts each test in a local scope (which should reduce the chances of one test accidentally using variables from another) and also helps document the tests themselves. I guessed at the labels, but I think I mostly got them right.