Skip to content
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

fix indexing for OneTo on v1.7 #249

Merged
merged 3 commits into from
Jul 1, 2021
Merged

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jun 30, 2021

With JuliaLang/julia#40997 now merged and available on v1.7.0-beta2, we don't need to define indexing for OneTo with IdentityUnitRange in this package. This reduces type-piracy, and also doesn't overwrite the method from Base.

Also remove deprecated UnionAll declarations in Varrag in no_offset_view.

Tests now pass with --depwarn=error

@codecov
Copy link

codecov bot commented Jun 30, 2021

Codecov Report

Merging #249 (6aa8218) into master (4bd33fb) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #249      +/-   ##
==========================================
+ Coverage   95.26%   95.28%   +0.02%     
==========================================
  Files           5        5              
  Lines         422      424       +2     
==========================================
+ Hits          402      404       +2     
  Misses         20       20              
Impacted Files Coverage Δ
src/OffsetArrays.jl 98.23% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bd33fb...6aa8218. Read the comment docs.

Copy link
Member

@johnnychen94 johnnychen94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR actually solves two warnings:

Before:

$julia-1.7 --depwarn=error --project=.

julia> using OffsetArrays
[ Info: Precompiling OffsetArrays [6fe1bfb0-de20-5000-8ca7-80f57d26f881]
WARNING: Method definition getindex(Base.OneTo{T} where T<:Integer, Base.IdentityUnitRange{var"#s1"} where var"#s1"<:(Base.AbstractUnitRange{var"#s2"} where var"#s2"<:Integer)) in module Base at indices.jl:405 overwritten in module OffsetArrays at /Users/jc/Documents/Julia/OffsetArrays.jl/src/OffsetArrays.jl:513.
  ** incremental compilation may be fatally broken for this module **

ERROR: LoadError: Wrapping `Vararg` directly in UnionAll is deprecated (wrap the tuple instead).

Edit:

Oh, you already mentioned the Vararg deprecation :)

@jishnub jishnub merged commit f5cd050 into JuliaArrays:master Jul 1, 2021
@jishnub jishnub deleted the fixindexing branch July 1, 2021 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants