-
-
Notifications
You must be signed in to change notification settings - Fork 372
eachindex call incorrectly assumes that the returned index is IndexLinear #4479
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
…near I am not sure if other calls to `eachindex` in Plots.jl have the same problem. The fix should resolve https://discourse.julialang.org/t/plots-borking-on-sentinelarrays-produced-by-csv-read/89505, but maybe there are other cases in the code when the same issue would be raised (I have checked the `eachindex` calls, but often I was not sure if the type on which it is called returns `IndexLinear` by default or not).
|
This fix assumes that |
|
Also, more generally - it would be good to confirm that |
Codecov ReportBase: 90.51% // Head: 90.51% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #4479 +/- ##
=======================================
Coverage 90.51% 90.51%
=======================================
Files 40 40
Lines 7635 7635
=======================================
Hits 6911 6911
Misses 724 724
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
x-ref JuliaLang/julia#47389 |
|
Thanks, git blame shows that this isn't due to a recent change. Some tests (and maybe @bkamins, you don't mind me pushing in your |
sure - it will be much faster for someone knowing the internals to make these things correct than me. Thank you! |
|
Thanks, I'm trying to understand the failing example to cook up a test. |
|
Thanks for the examples. |
|
Yes - that is why this PR only fixes SentinelArrays.jl issue. For OffsetArrays.jl a decision would need to be made what is the desired behavior. |

I am not sure if other calls to
eachindexin Plots.jl have the same problem. The fix should resolve https://discourse.julialang.org/t/plots-borking-on-sentinelarrays-produced-by-csv-read/89505, but maybe there are other cases in the code when the same issue would be raised (I have checked theeachindexcalls, but often I was not sure if the type on which it is called returnsIndexLinearby default or not).