Conversation
|
I have something locally that hacks around to_indices. It does a lot of other, much crazier things, though. I'll push it as a separate PR… and you can take a look. |
|
OK, I think the breakages are mostly fixed, though I noticed a couple of small issues in Base julia that needed fixing. (JuliaLang/julia#20686) Also, I switched to Unitful for the README and tests. Most urgent because of JuliaLang/julia#20671, but I think it's also the future so we might as well switch. It passes tests locally if I have the master branch of Unitful checked out, but it doesn't on the current release. (CC @ajkeller34.) |
|
OK to merge and tag? Locally, this passes on both 0.5 and 0.6 (I have master checked out on Unitful). |
|
Sure, since it's a test-only dependency that makes sense. I'd prefer to not have CI broken for too long, so if a tag isn't expected for a while I'd like to |
|
I hope to tag Unitful today or tomorrow, since it looks like Attobot has made that a whole lot easier. Which reminds me, I still have that open PR on AxisArrays... sorry for the delay, I just haven't found the time. I hope to return to it soon, and am also excited to see what happens with #56 or #58. |
| convert(T, first(v) + (i-1)*step(v)) | ||
| end | ||
| # When running with "--check-bounds=yes" (like on Travis), the bounds-check isn't elided | ||
| @inline function Base.unsafe_getindex{T}(v::Range{T}, i::Integer) |
There was a problem hiding this comment.
Because this was easier than going back and reverting that portion of JuliaLang/julia#14957.
There was a problem hiding this comment.
The point of JuliaLang/julia#14957 was to centralize/simplify, but for ranges there do turn out to be cases where you want to perform the computation even when bounds-checking is forced on. Since a certain number of unsafe_getindex calls have crept back into range.jl, maybe it's not unreasonable to add them back systematically.
There was a problem hiding this comment.
I'd rather have unsafe_getindex be removed completely and use a new name for the range computation since it's not really unsafe (in terms of memory or validity) at all. For this use-case we really don't want this function to apply at all to non-ranges. But this really isn't a high priority for me — unsafe_getindex is an undocumented function that's rarely used these days.
I think this gets most of the recent depwarns & breakages. Will require a new Compat tag (JuliaLang/Compat.jl#329). Also doesn't fix
Wouldn't mind a little collaboration in fixing that particular problem 😄. If anyone is interested, feel free to grab this and run with it.