-
Notifications
You must be signed in to change notification settings - Fork 21
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
Deprecate eltype-specific convert methods #131
Conversation
Codecov Report
@@ Coverage Diff @@
## master #131 +/- ##
==========================================
+ Coverage 60.50% 60.95% +0.45%
==========================================
Files 9 9
Lines 400 397 -3
==========================================
Hits 242 242
+ Misses 158 155 -3
Continue to review full report at Codecov.
|
+1 for this fix after coming across the same issue. |
These are technically pirating and cause quite a few invalidations. Now that we have generic broadcasting they are no longer necessary.
dc65d29
to
f984124
Compare
I declare open season on making more disruptive changes. Here's my plan:
const depwarnidx = (i = 1; T = Base.JLOptions; while i <= fieldcount(T) fieldname(T, i) === :depwarn && break; global i += 1; end; fieldoffset(T, i) + 1)
function forced_depwarn(msg, sym)
oldval = unsafe_load(cglobal(:jl_options, UInt8), depwarnidx)
unsafe_store!(cglobal(:jl_options, UInt8), Int8(true), depwarnidx)
ret = try
Base.depwarn(msg, sym)
finally
unsafe_store!(cglobal(:jl_options, UInt8), oldval, depwarnidx)
end
return ret
end Personally I think we need to do that, given that most users probably say |
Great thanks for fixing this! Patch level updates sound like a good idea to me. Forcing depwarn printouts (or at least some kind of I'm a major fan of Images.jl btw, and likely to build a lot of application code using Images in the future. |
Great to hear! Don't hesitate to advertise your work to us! |
These are technically pirating and cause quite a few invalidations. Now that we have generic broadcasting they are no longer necessary. xref JuliaGraphics/ColorTypes.jl#196.
This first submission of the PR does not fix depwarns in the tests, because I want to see if everything passes before doing so.
Also xref #122. We should merge these two at around the same time, along with any other deprecations, to reduce the number of times we annoy users.