-
Notifications
You must be signed in to change notification settings - Fork 16
Fix some tests and suppress warnings in Julia 0.7 #31
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
Codecov Report
@@ Coverage Diff @@
## master #31 +/- ##
==========================================
+ Coverage 94.02% 96.09% +2.06%
==========================================
Files 5 4 -1
Lines 201 205 +4
==========================================
+ Hits 189 197 +8
+ Misses 12 8 -4
Continue to review full report at Codecov.
|
Thanks for doing this! |
src/settable.jl
Outdated
@@ -2,7 +2,12 @@ export @settable | |||
using MacroTools: prewalk, splitdef, combinedef | |||
|
|||
macro settable(ex) | |||
esc(settable(ex)) | |||
M = try |
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.
Is there a reason, why you use try
instead of if VERSION < v"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.
I was thinking it'd be safer for earlier revisions of Julia master and I was lazy to find at which revision __module__
was introduced. But I used if VERSION < v"0.7-"
elsewhere so it's better to stick with it for consistency. I'll fix it.
@@ -22,8 +35,10 @@ end | |||
include("test_kwonly.jl") | |||
end | |||
|
|||
@static if VERSION < v"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.
Is the problem QuickTypes not working with 0.7
or is there a problem with our macros, do you know?
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.
QuickTypes.jl itself doesn't work with the nighly at the moment. I don't know if our macro has any problems. I tried to fix QuickTypes.jl but it's tricky so I thought I'd skip testing for now.
test/test_core.jl
Outdated
v = randn(3) | ||
@set! v[:] = 1 | ||
@test_skip @set! v[:] .= 0 |
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.
Why @test_skip
and not @test_broken
?
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.
@test_broken
requires the expression to return false
but @set! v[:] .= 0
actually throws at the moment. @test_skip
doesn't execute the body so effectively it's commenting out the expression. I thought it's slightly better than commenting out since it shows up in the test result and we can remember that there is something to fix. But @test_skip
is not super correct to use it here since @set! v[:] .= 0
will not return true
. I suppose I should have leave informative comments there.
First two commits for make test working. The rest is for suppressing deprecated warnings.